枚举 EntityDamageEvent.DamageCause
- 所有已实现的接口:
Serializable
,Comparable<EntityDamageEvent.DamageCause>
,Constable
- 封闭类:
- EntityDamageEvent
-
嵌套类概要
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
枚举常量概要
枚举常量说明在爆炸范围内受到的伤害.Damage caused when an entity steps onMaterial.CAMPFIRE
orMaterial.SOUL_CAMPFIRE
.实体接触仙人掌、钟乳石(石笋)或浆果丛等方块时受到的伤害.由于游戏规则:maxEntityCramming,一个实体和许多其他实体挤压受到的伤害.自定义伤害.龙息造成的伤害 (恶龙咆哮~).在水中耗尽空气受到的伤害.实体(例如:鱼)不在水中时受到的伤害.一个实体攻击另一个实体时受到的伤害.在实体爆炸范围内受到的伤害,例如苦力怕的爆炸.一个实体在横扫范围中攻击到另一个实体时受到的伤害.实体掉落高度大于 3 格时受到的伤害.被掉落中的方块砸中造成的伤害直接暴露在火中受到的伤害.由于烧伤造成的伤害.实体撞墙时造成的伤害.冻伤引起的伤害.实体站在Material.MAGMA_BLOCK
上时收到的伤害.Damage caused by /kill command直接暴露在熔浆受到的伤害.雷击造成的伤害.伤害药水或魔法造成的伤害.雪人由于融化受到的伤害.由于持续性毒药造成的伤害.被抛射物攻击时受到的伤害.来自Warden
音波攻击造成的伤害.当饥饿值为空时受到的伤害.被方块卡住受到的伤害.Damage caused by committing suicide.被荆棘反弹的攻击所造成的伤害(反伤).掉入虚空受到的伤害.凋零效果造成的伤害.Damage caused by the World Border -
方法概要
修饰符和类型方法说明返回带有指定名称的该类型的枚举常量。static EntityDamageEvent.DamageCause[]
values()
按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。
-
枚举常量详细资料
-
KILL
Damage caused by /kill commandDamage:
Float.MAX_VALUE
-
WORLD_BORDER
Damage caused by the World BorderDamage:
WorldBorder.getDamageAmount()
-
CONTACT
实体接触仙人掌、钟乳石(石笋)或浆果丛等方块时受到的伤害.伤害:动态改变.
原文: Damage caused when an entity contacts a block such as a Cactus, Dripstone (Stalagmite) or Berry Bush.
Damage: variable
-
ENTITY_ATTACK
一个实体攻击另一个实体时受到的伤害.伤害:动态改变.
原文: Damage caused when an entity attacks another entity.
Damage: variable
-
ENTITY_SWEEP_ATTACK
一个实体在横扫范围中攻击到另一个实体时受到的伤害.伤害:动态改变.
原文: Damage caused when an entity attacks another entity in a sweep attack.
Damage: variable
-
PROJECTILE
被抛射物攻击时受到的伤害.伤害:动态改变.
原文: Damage caused when attacked by a projectile.
Damage: variable
-
SUFFOCATION
被方块卡住受到的伤害.伤害:1.
原文: Damage caused by being put in a block
Damage: 1
-
FALL
实体掉落高度大于 3 格时受到的伤害.伤害: 掉落高度 - 3.0.
原文: Damage caused when an entity falls a distance greater than 3 blocks
Damage: fall height - 3.0
-
FIRE
直接暴露在火中受到的伤害.伤害: 1.
原文: Damage caused by direct exposure to fire
Damage: 1
-
FIRE_TICK
由于烧伤造成的伤害.伤害: 1.
原文: Damage caused due to burns caused by fire
Damage: 1
-
MELTING
雪人由于融化受到的伤害.伤害: 1.
原文: Damage caused due to a snowman melting
Damage: 1
-
LAVA
直接暴露在熔浆受到的伤害.伤害: 4.
原文: Damage caused by direct exposure to lava
Damage: 4
-
DROWNING
在水中耗尽空气受到的伤害.伤害: 2.
原文: Damage caused by running out of air while in water
Damage: 2
-
BLOCK_EXPLOSION
在爆炸范围内受到的伤害.伤害: 动态改变.
原文: Damage caused by being in the area when a block explodes.
Damage: variable
-
ENTITY_EXPLOSION
在实体爆炸范围内受到的伤害,例如苦力怕的爆炸.伤害: 动态改变.
原文: Damage caused by being in the area when an entity, such as a Creeper, explodes.
Damage: variable
-
VOID
掉入虚空受到的伤害.伤害: 每半秒4点.
原文: Damage caused by falling into the void
Damage: 4 for players
-
LIGHTNING
雷击造成的伤害.伤害: 5.
原文: Damage caused by being struck by lightning
Damage: 5
-
SUICIDE
Damage caused by committing suicide.Note: This is currently only used by plugins, default commands like /minecraft:kill use
KILL
to damage players.Damage: variable
-
STARVATION
当饥饿值为空时受到的伤害.伤害: 1.
原文: Damage caused by starving due to having an empty hunger bar
Damage: 1
-
POISON
由于持续性毒药造成的伤害.伤害: 1.
原文: Damage caused due to an ongoing poison effect
Damage: 1
-
MAGIC
伤害药水或魔法造成的伤害.伤害: 动态改变.
原文: Damage caused by being hit by a damage potion or spell
Damage: variable
-
WITHER
凋零效果造成的伤害.原文: Damage caused by Wither potion effect
-
FALLING_BLOCK
被掉落中的方块砸中造成的伤害注意: 不是所有方块都会造成伤害.
伤害: 动态改变.
原文: Damage caused by being hit by a falling block which deals damage
Note: Not every block deals damage
Damage: variable
-
THORNS
被荆棘反弹的攻击所造成的伤害(反伤).伤害: 1-4(荆棘).
原文: Damage caused in retaliation to another attack by the Thorns enchantment.
Damage: 1-4 (Thorns)
-
DRAGON_BREATH
龙息造成的伤害 (恶龙咆哮~).伤害: 动态改变.
原文: Damage caused by a dragon breathing fire.
Damage: variable
-
CUSTOM
自定义伤害.伤害: 动态改变.
原文: Custom damage.
Damage: variable
-
FLY_INTO_WALL
实体撞墙时造成的伤害.伤害: 动态改变.
原文: Damage caused when an entity runs into a wall.
Damage: variable
-
HOT_FLOOR
实体站在Material.MAGMA_BLOCK
上时收到的伤害.伤害: 1.
原文: Damage caused when an entity steps on
Material.MAGMA_BLOCK
.Damage: 1
-
CAMPFIRE
-
CRAMMING
由于游戏规则:maxEntityCramming,一个实体和许多其他实体挤压受到的伤害.伤害: 6.
原文: Damage caused when an entity is colliding with too many entities due to the maxEntityCramming game rule.
Damage: 6
-
DRYOUT
实体(例如:鱼)不在水中时受到的伤害.伤害: 1.
原文: Damage caused when an entity that should be in water is not.
Damage: 1
-
FREEZE
冻伤引起的伤害.伤害: 1 或 5.
原文: Damage caused from freezing.
Damage: 1 or 5
-
SONIC_BOOM
-
-
方法详细资料
-
values
按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name
- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量NullPointerException
- 如果参数为空值
-