程序包 org.bukkit

# 枚举 EntityEffect

java.lang.Object
java.lang.Enum<EntityEffect>
org.bukkit.EntityEffect

所有已实现的接口:
  `Serializable`, `Comparable<EntityEffect>`, `Constable`

public enum EntityEffect extends Enum<EntityEffect>
实体能发生的效果列表。

- ## 嵌套类概要

  ## 从类继承的嵌套类/接口 java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## 枚举常量概要

  枚举常量
  枚举常量
  说明
  `ARMOR_STAND_HIT`
  盔甲架被击中.
  `ARROW_PARTICLES`
  箭矢上的彩色粒子.
  `BREAK_EQUIPMENT_BOOTS`
  Entity breaks item in boot slot
  `BREAK_EQUIPMENT_CHESTPLATE`
  Entity breaks item in chestplate slot
  `BREAK_EQUIPMENT_HELMET`
  Entity breaks item in helmet slot
  `BREAK_EQUIPMENT_LEGGINGS`
  Entity breaks item in legging slot
  `BREAK_EQUIPMENT_MAIN_HAND`
  Entity breaks item in main hand
  `BREAK_EQUIPMENT_OFF_HAND`
  Entity breaks item in off hand
  `CAT_TAME_FAIL`
  Cat taming failed.
  `CAT_TAME_SUCCESS`
  Cat taming succeeded.
  `DEATH`
  已过时。
  已分为单独的效果
  `DOLPHIN_FED`
  Dolphin has been fed and is locating a structure.
  `EGG_BREAK`
  Spawns the egg breaking particles
  `ENTITY_DEATH`
  Plays the entity death sound and animation
  `ENTITY_POOF`
  蠹虫进入石头, 刷怪笼刷怪.
  `FANG_ATTACK`
  Plays the fang attack animation
  `FIREWORK_EXPLODE`
  烟花爆炸.
  `FOX_CHEW`
  Fox chews the food in its mouth
  `GOAT_LOWER_HEAD`
  Goat lowers its head for ramming
  `GOAT_RAISE_HEAD`
  Goat raises its head
  `GUARDIAN_TARGET`
  Guardian plays the attack sound effect.
  `HOGLIN_ATTACK`
  Plays the hoglin attack animation
  `HONEY_BLOCK_FALL_PARTICLES`
  Spawns honey block fall particles at the entity's feet
  `HONEY_BLOCK_SLIDE_PARTICLES`
  Spawns honey block slide particles at the entity's feet
  `HURT`
  已过时。
  请使用 `LivingEntity.playHurtAnimation(float)`
  `HURT_BERRY_BUSH`
  Entity hurt due to berry bush.
  `HURT_DROWN`
  Entity hurt due to drowning damage.
  `HURT_EXPLOSION`
  Entity hurt due to explosion damage.
  `IRON_GOLEM_ROSE`
  铁傀儡给予玫瑰(译注：应为poppy，即罂粟).
  `IRON_GOLEM_SHEATH`
  Iron golem puts away rose.
  `IRON_GOLEN_ATTACK`
  Plays the iron golem attack animation
  `LOVE_HEARTS`
  繁殖实体时的爱心.
  `PLAYER_BAD_OMEN_RAID`
  Player's bad omen effect removed to start or increase raid difficult.
  `RABBIT_JUMP`
  兔子跳跃.
  `RAVAGER_ATTACK`
  Plays the ravager attack animation
  `RAVAGER_STUNNED`
  Ravager has been stunned for 40 ticks.
  `RESET_SPAWNER_MINECART_DELAY`
  Resets a spawner minecart's delay to 200.
  `SHEEP_EAT`
  已过时。
  已分为单独的效果
  `SHEEP_EAT_GRASS`
  Plays the sheep eating grass animation
  `SHIELD_BLOCK`
  盾牌阻挡攻击.
  `SHIELD_BREAK`
  护盾损坏.
  `SNIFFER_DIG`
  Plays sniffer digging sound
  Sniffer must have a target and be in `Sniffer.State.SEARCHING` or `Sniffer.State.DIGGING`
  `SNOWBALL_BREAK`
  Spawns the snowball breaking particles
  `SPAWN_DEATH_SMOKE`
  Spawns death smoke particles
  `SQUID_ROTATE`
  Resets squid rotation.
  `SWAP_HAND_ITEMS`
  Entity swaps the items in their hand and offhand
  `TELEPORT_ENDER`
  Entity teleported as a result of chorus fruit or as an enderman
  `THORNS_HURT`
  Entity hurt by thorns attack.
  `TNT_MINECART_IGNITE`
  Causes the TNT minecart to ignite, does not play the ignition sound
  `TOTEM_RESURRECT`
  Totem prevents entity death.
  `VILLAGER_ANGRY`
  村民生气时.
  `VILLAGER_HAPPY`
  村民高兴时的粒子效果。
  `VILLAGER_HEART`
  村民的红心.
  `VILLAGER_SPLASH`
  Villager splashes particles during a raid.
  `WARDEN_ATTACK`
  Plays the warden attack animation
  `WARDEN_SONIC_ATTACK`
  Warden performs sonic attack animation
  Does not play the sound or fire the beam
  `WARDEN_TENDRIL_SHAKE`
  Warden shakes its tendrils
  `WITCH_MAGIC`
  女巫的魔法粒子效果.
  `WOLF_HEARTS`
  驯服实体成功时的红心.
  `WOLF_SHAKE`
  狼在湿水后抖动身体.
  `WOLF_SHAKE_STOP`
  Stops a wolf that is currently shaking
  `WOLF_SMOKE`
  驯服实体失败时的烟雾.
  `ZOGLIN_ATTACK`
  Plays the zoglin attack animation
  `ZOMBIE_TRANSFORM`
  僵尸被剧烈抖动转化为村民(译注：僵尸村民被喷溅虚弱药水并喂食金苹果转化为村民)。

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull Class<? extends Entity>`
  `getApplicable()`
  获取该效果能应用到的实体超类.
  `byte`
  `getData()`
  已过时。
  不安全的参数
  `boolean`
  `isApplicableTo(@NotNull Class<? extends Entity> clazz)`
  Checks if this effect is applicable to the given entity class.
  `boolean`
  `isApplicableTo(@NotNull Entity entity)`
  Checks if this effect is applicable to the given entity.
  `static EntityEffect`
  `valueOf(String name)`
  返回带有指定名称的该类型的枚举常量。
  `static EntityEffect[]`
  `values()`
  按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。

  ### 从类继承的方法 java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### 从类继承的方法 java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## 枚举常量详细资料

  - ### ARROW_PARTICLES

    public static final EntityEffect ARROW_PARTICLES
    箭矢上的彩色粒子.

  - ### RABBIT_JUMP

    public static final EntityEffect RABBIT_JUMP
    兔子跳跃.

  - ### RESET_SPAWNER_MINECART_DELAY

    public static final EntityEffect RESET_SPAWNER_MINECART_DELAY
    Resets a spawner minecart's delay to 200. Does not effect actual spawning delay, only the speed at which the entity in the spawner spins

  - ### HURT

    @Deprecated public static final EntityEffect HURT
    已过时。
    请使用 `LivingEntity.playHurtAnimation(float)`
    当怪物收到伤害.

    原文： When mobs get hurt.

  - ### DEATH

    @Deprecated public static final EntityEffect DEATH
    已过时。
    已分为单独的效果
    当怪物死亡.

    原文： When a mob dies.

    另请参阅:
      - `EGG_BREAK`
      - `SNOWBALL_BREAK`
      - `ENTITY_DEATH`

  - ### EGG_BREAK

    public static final EntityEffect EGG_BREAK
    Spawns the egg breaking particles

  - ### SNOWBALL_BREAK

    public static final EntityEffect SNOWBALL_BREAK
    Spawns the snowball breaking particles

  - ### ENTITY_DEATH

    public static final EntityEffect ENTITY_DEATH
    Plays the entity death sound and animation

    This will cause client-glitches!

  - ### FANG_ATTACK

    public static final EntityEffect FANG_ATTACK
    Plays the fang attack animation

  - ### HOGLIN_ATTACK

    public static final EntityEffect HOGLIN_ATTACK
    Plays the hoglin attack animation

  - ### IRON_GOLEN_ATTACK

    public static final EntityEffect IRON_GOLEN_ATTACK
    Plays the iron golem attack animation

  - ### RAVAGER_ATTACK

    public static final EntityEffect RAVAGER_ATTACK
    Plays the ravager attack animation

  - ### WARDEN_ATTACK

    public static final EntityEffect WARDEN_ATTACK
    Plays the warden attack animation

  - ### ZOGLIN_ATTACK

    public static final EntityEffect ZOGLIN_ATTACK
    Plays the zoglin attack animation

  - ### WOLF_SMOKE

    public static final EntityEffect WOLF_SMOKE
    驯服实体失败时的烟雾.

    原文： The smoke when taming a entity fails.

  - ### WOLF_HEARTS

    public static final EntityEffect WOLF_HEARTS
    驯服实体成功时的红心.

    原文： The hearts when taming a woentitylf succeeds.

  - ### WOLF_SHAKE

    public static final EntityEffect WOLF_SHAKE
    狼在湿水后抖动身体.

    原文： When a wolf shakes (after being wet).

    另请参阅:
      - `WOLF_SHAKE_STOP`

  - ### SHEEP_EAT

    @Deprecated public static final EntityEffect SHEEP_EAT
    已过时。
    已分为单独的效果
    羊吃草方块.

    原文： When a sheep eats a LONG_GRASS block.

    另请参阅:
      - `SHEEP_EAT_GRASS`
      - `TNT_MINECART_IGNITE`

  - ### SHEEP_EAT_GRASS

    public static final EntityEffect SHEEP_EAT_GRASS
    Plays the sheep eating grass animation

  - ### TNT_MINECART_IGNITE

    public static final EntityEffect TNT_MINECART_IGNITE
    Causes the TNT minecart to ignite, does not play the ignition sound

    This will cause client-glitches!

  - ### IRON_GOLEM_ROSE

    public static final EntityEffect IRON_GOLEM_ROSE
    铁傀儡给予玫瑰(译注：应为poppy，即罂粟).

    原文： When an Iron Golem gives a rose.

  - ### VILLAGER_HEART

    public static final EntityEffect VILLAGER_HEART
    村民的红心.

    原文： Hearts from a villager.

  - ### VILLAGER_ANGRY

    public static final EntityEffect VILLAGER_ANGRY
    村民生气时.

    原文： When a villager is angry.

  - ### VILLAGER_HAPPY

    public static final EntityEffect VILLAGER_HAPPY
    村民高兴时的粒子效果。

    原文： Happy particles from a villager.

  - ### WITCH_MAGIC

    public static final EntityEffect WITCH_MAGIC
    女巫的魔法粒子效果.

    原文： Magic particles from a witch.

  - ### ZOMBIE_TRANSFORM

    public static final EntityEffect ZOMBIE_TRANSFORM
    僵尸被剧烈抖动转化为村民(译注：僵尸村民被喷溅虚弱药水并喂食金苹果转化为村民)。

    原文： When a zombie transforms into a villager by shaking violently.

  - ### FIREWORK_EXPLODE

    public static final EntityEffect FIREWORK_EXPLODE
    烟花爆炸.

    原文： When a firework explodes.

  - ### LOVE_HEARTS

    public static final EntityEffect LOVE_HEARTS
    繁殖实体时的爱心.

  - ### SQUID_ROTATE

    public static final EntityEffect SQUID_ROTATE
    Resets squid rotation.

  - ### ENTITY_POOF

    public static final EntityEffect ENTITY_POOF
    蠹虫进入石头, 刷怪笼刷怪.

  - ### GUARDIAN_TARGET

    public static final EntityEffect GUARDIAN_TARGET
    Guardian plays the attack sound effect.

  - ### SHIELD_BLOCK

    public static final EntityEffect SHIELD_BLOCK
    盾牌阻挡攻击.

  - ### SHIELD_BREAK

    public static final EntityEffect SHIELD_BREAK
    护盾损坏.

  - ### ARMOR_STAND_HIT

    public static final EntityEffect ARMOR_STAND_HIT
    盔甲架被击中.

  - ### THORNS_HURT

    public static final EntityEffect THORNS_HURT
    Entity hurt by thorns attack.

  - ### IRON_GOLEM_SHEATH

    public static final EntityEffect IRON_GOLEM_SHEATH
    Iron golem puts away rose.

  - ### TOTEM_RESURRECT

    public static final EntityEffect TOTEM_RESURRECT
    Totem prevents entity death.

  - ### HURT_DROWN

    public static final EntityEffect HURT_DROWN
    Entity hurt due to drowning damage.

  - ### HURT_EXPLOSION

    public static final EntityEffect HURT_EXPLOSION
    Entity hurt due to explosion damage.

  - ### DOLPHIN_FED

    public static final EntityEffect DOLPHIN_FED
    Dolphin has been fed and is locating a structure.

  - ### RAVAGER_STUNNED

    public static final EntityEffect RAVAGER_STUNNED
    Ravager has been stunned for 40 ticks.

  - ### CAT_TAME_FAIL

    public static final EntityEffect CAT_TAME_FAIL
    Cat taming failed.

  - ### CAT_TAME_SUCCESS

    public static final EntityEffect CAT_TAME_SUCCESS
    Cat taming succeeded.

  - ### VILLAGER_SPLASH

    public static final EntityEffect VILLAGER_SPLASH
    Villager splashes particles during a raid.

  - ### PLAYER_BAD_OMEN_RAID

    public static final EntityEffect PLAYER_BAD_OMEN_RAID
    Player's bad omen effect removed to start or increase raid difficult.

  - ### HURT_BERRY_BUSH

    public static final EntityEffect HURT_BERRY_BUSH
    Entity hurt due to berry bush. Prickly!

  - ### FOX_CHEW

    public static final EntityEffect FOX_CHEW
    Fox chews the food in its mouth

  - ### TELEPORT_ENDER

    public static final EntityEffect TELEPORT_ENDER
    Entity teleported as a result of chorus fruit or as an enderman

  - ### BREAK_EQUIPMENT_MAIN_HAND

    public static final EntityEffect BREAK_EQUIPMENT_MAIN_HAND
    Entity breaks item in main hand

  - ### BREAK_EQUIPMENT_OFF_HAND

    public static final EntityEffect BREAK_EQUIPMENT_OFF_HAND
    Entity breaks item in off hand

  - ### BREAK_EQUIPMENT_HELMET

    public static final EntityEffect BREAK_EQUIPMENT_HELMET
    Entity breaks item in helmet slot

  - ### BREAK_EQUIPMENT_CHESTPLATE

    public static final EntityEffect BREAK_EQUIPMENT_CHESTPLATE
    Entity breaks item in chestplate slot

  - ### BREAK_EQUIPMENT_LEGGINGS

    public static final EntityEffect BREAK_EQUIPMENT_LEGGINGS
    Entity breaks item in legging slot

  - ### BREAK_EQUIPMENT_BOOTS

    public static final EntityEffect BREAK_EQUIPMENT_BOOTS
    Entity breaks item in boot slot

  - ### HONEY_BLOCK_SLIDE_PARTICLES

    public static final EntityEffect HONEY_BLOCK_SLIDE_PARTICLES
    Spawns honey block slide particles at the entity's feet

  - ### HONEY_BLOCK_FALL_PARTICLES

    public static final EntityEffect HONEY_BLOCK_FALL_PARTICLES
    Spawns honey block fall particles at the entity's feet

  - ### SWAP_HAND_ITEMS

    public static final EntityEffect SWAP_HAND_ITEMS
    Entity swaps the items in their hand and offhand

  - ### WOLF_SHAKE_STOP

    public static final EntityEffect WOLF_SHAKE_STOP
    Stops a wolf that is currently shaking
    另请参阅:
      - `WOLF_SHAKE`

  - ### GOAT_LOWER_HEAD

    public static final EntityEffect GOAT_LOWER_HEAD
    Goat lowers its head for ramming
    另请参阅:
      - `GOAT_RAISE_HEAD`

  - ### GOAT_RAISE_HEAD

    public static final EntityEffect GOAT_RAISE_HEAD
    Goat raises its head
    另请参阅:
      - `GOAT_LOWER_HEAD`

  - ### SPAWN_DEATH_SMOKE

    public static final EntityEffect SPAWN_DEATH_SMOKE
    Spawns death smoke particles

  - ### WARDEN_TENDRIL_SHAKE

    public static final EntityEffect WARDEN_TENDRIL_SHAKE
    Warden shakes its tendrils

  - ### WARDEN_SONIC_ATTACK

    public static final EntityEffect WARDEN_SONIC_ATTACK
    Warden performs sonic attack animation
    Does not play the sound or fire the beam

  - ### SNIFFER_DIG

    public static final EntityEffect SNIFFER_DIG
    Plays sniffer digging sound
    Sniffer must have a target and be in `Sniffer.State.SEARCHING` or `Sniffer.State.DIGGING`

- ## 方法详细资料

  - ### values

    public static EntityEffect[] values()
    按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。
    返回:
      按照声明该枚举类型的常量的顺序返回的包含这些常量的数组

  - ### valueOf

    public static EntityEffect valueOf(String name)
    返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)
    参数:
      `name` - 要返回的枚举常量的名称。
    返回:
      返回带有指定名称的枚举常量
    抛出:
      `IllegalArgumentException` - 如果该枚举类型没有带有指定名称的常量
      `NullPointerException` - 如果参数为空值

  - ### getData

    @Deprecated public byte getData()
    已过时。
    不安全的参数
    获取实体效果的数据值, 可能不是唯一的.

    原文： Gets the data value of this EntityEffect, may not be unique.

    返回:
      实体效果的数据值

  - ### getApplicable

    @NotNull public @NotNull Class<? extends Entity> getApplicable()
    获取该效果能应用到的实体超类.

    原文:Gets entity superclass which this affect is applicable to.

    返回:
      applicable class

  - ### isApplicableTo

    public boolean isApplicableTo(@NotNull @NotNull Entity entity)
    Checks if this effect is applicable to the given entity.
    参数:
      `entity` - the entity to check
    返回:
      true if applicable

  - ### isApplicableTo

    public boolean isApplicableTo(@NotNull @NotNull Class<? extends Entity> clazz)
    Checks if this effect is applicable to the given entity class.
    参数:
      `clazz` - the entity class to check
    返回:
      true if applicable