跳转至

Spell Effects

文档版本:1.21.0.24

Defines what mob effects to add and remove to the entity when adding this component.

架构

spell_effects:
{
  array "add_effects" : opt
  {
    string "<any array element>" : opt
    object "<any array element>" : opt
    {
      integer "amplifier" : opt
      boolean "ambient" : opt
      number "duration" : opt
      boolean "display_on_screen_animation" : opt
      string "effect" : opt
      boolean "visible" : opt
    }
  }
  array "remove_effects" : opt
  {
    ['string'] "<any array element>" : opt
  }
  string "remove_effects" : opt
}
add_effectsarray
List of effects to add to this entity after adding this component.
add_effects
<any array element>string
<any array element>object
<any array element>
amplifierinteger
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
ambientboolean
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.
durationnumber
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_animationboolean
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.
effectstring
The string identifier of the status effect to add. These are the same as used in the /effect command.
visibleboolean
Boolean value. When set to true, the effect will be visible to the player. Defaults to true.
remove_effectsarray
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_effectsstring
List of identifiers of effects to be removed from this entity after adding this component.