通用自定义数据

通用自定义数据

接口注入API,为自定义数据标签提供类似数据组件的功能。

基础库

通用自定义数据

通用自定义数据是一个为自定义数据标签提供类似数据组件功能的库。

目前功能尚不完整。

命令

  • /custom effect list [<entity>] 打印 entity 上的自定义效果列表。
  • /custom effect give <entity> <effect> [<duration|infinite>] [<amplifier>] 为 entity 添加自定义效果。
  • /custom effect clear [<entity>] [<effect>] 从 entity 移除自定义效果。

数据结构

Compound custom_data:父标签。
 |- String id:namespace:path。
 |- List modifiers
 |  \- Compound 一个修饰符。
 |    |- String attribute:namespace:path。
 |    |- Double base:任意值。
 |    |- String id:任意值。
 |    |- String operation:add_value、add_multiplied_base、add_multiplied_total。
 |    \- String slot:mainhand、offhand、feet、legs、chest、head。
 |- String rarity:任意值。
 \- List status_effects
  \- Compound 一个状态效果。
    |- String id:namespace:path。
    \- List episodes:无序的片段。
     \- Compound 一个片段。
       |- Int amplifier:任意值。
       \- Int duration:任意值。单位为刻。

Compound data:父标签。
 |- Byte explosion_radius:任意值。
 |- Short fuse:任意值。
 |- String id:namespace:path。
 |- List modifiers
 |  \- Compound 一个修饰符。
 |    |- String attribute:namespace:path。
 |    |- Double base:任意值。
 |    |- String id:任意值。
 |    |- String operation:add_value、add_multiplied_base、add_multiplied_total。
 |    \- String slot:mainhand、offhand、feet、legs、chest、head。
 |- String owner:UUID。
 \- List status_effects
  \- Compound 一个状态效果。
    |- String id:namespace:path。
    \- List episodes:实体上的片段按放大等级降序排列,并同时计时。
     \- Compound 一个片段。
       |- Int amplifier:任意值。
       \- Int duration:任意值。单位为刻。