Spell Effects¶
文档版本:1.21.50.25
Defines what mob effects to add and remove to the entity when adding this component.
架构¶
spell_effects:
{
array "add_effects" : opt
{
effect "<any array element>"
object "<any array element>" : opt
{
integer "amplifier" : opt
boolean "ambient" : opt
number "duration" : opt
boolean "display_on_screen_animation" : opt
effect "effect"
boolean "visible" : opt
}
}
array "remove_effects" : opt
{
['string'] "<any array element>" : opt
}
string "remove_effects" : opt
}
add_effects
:array- List of effects to add to this entity after adding this component.
add_effects
<any array element>
:effect
<any array element>
:object
<any array element>
amplifier
:integer- The level of the effect, same as used in the /effect command (0 for level I, 1 for level II, etc). Defaults to 0. NOTE: Values can be negative but its not an intentional feature
ambient
:boolean- Boolean value that should cause the particles emitted by the entity to be partially transparent. This does not work properly, resulting in this property having no effect. Defaults to false.
duration
:number- The amount of time in seconds the effect should last. This allows for fractional numbers. For example, instant effects should be set to 0.05 seconds (one tick).
display_on_screen_animation
:boolean- Boolean value. When set to true, applying this effect displays an animated graphic on-screen similar to the totem of undying effect. Obviously, this only works for players. Defaults to false.
effect
:effect- The string identifier of the status effect to add. These are the same as used in the /effect command.
visible
:boolean- Boolean value. When set to true, the effect will be visible to the player. Defaults to true.
remove_effects
:array- List of identifiers of effects to be removed from this entity after adding this component.
remove_effects
<any array element>
:['string']- identifier of the effect to be removed from this entity after adding this component.
remove_effects
:string- List of identifiers of effects to be removed from this entity after adding this component.