public static enum EntityDamageEvent.DamageCause extends Enum<EntityDamageEvent.DamageCause>
列挙型定数と説明 |
---|
BLOCK_EXPLOSION
Damage caused by being in the area when a block explodes.
|
CONTACT
Damage caused when an entity contacts a block such as a Cactus.
|
CUSTOM
Custom damage.
|
DRAGON_BREATH
Damage caused by a dragon breathing fire.
|
DROWNING
Damage caused by running out of air while in water
Damage: 2
|
ENTITY_ATTACK
Damage caused when an entity attacks another entity.
|
ENTITY_EXPLOSION
Damage caused by being in the area when an entity, such as a
Creeper, explodes.
|
FALL
Damage caused when an entity falls a distance greater than 3 blocks
Damage: fall height - 3.0
|
FALLING_BLOCK
Damage caused by being hit by a falling block which deals damage
Note: Not every block deals damage
Damage: variable
|
FIRE
Damage caused by direct exposure to fire
Damage: 1
|
FIRE_TICK
Damage caused due to burns caused by fire
Damage: 1
|
FLY_INTO_WALL
Damage caused when an entity runs into a wall.
|
LAVA
Damage caused by direct exposure to lava
Damage: 4
|
LIGHTNING
Damage caused by being struck by lightning
Damage: 5
|
MAGIC
Damage caused by being hit by a damage potion or spell
Damage: variable
|
MELTING
Damage caused due to a snowman melting
Damage: 1
|
POISON
Damage caused due to an ongoing poison effect
Damage: 1
|
PROJECTILE
Damage caused when attacked by a projectile.
|
STARVATION
Damage caused by starving due to having an empty hunger bar
Damage: 1
|
SUFFOCATION
Damage caused by being put in a block
Damage: 1
|
SUICIDE
Damage caused by committing suicide using the command "/kill"
Damage: 1000
|
THORNS
Damage caused in retaliation to another attack by the Thorns
enchantment.
|
VOID
Damage caused by falling into the void
Damage: 4 for players
|
WITHER
Damage caused by Wither potion effect
|
修飾子とタイプ | メソッドと説明 |
---|---|
static EntityDamageEvent.DamageCause |
valueOf(String name)
指定した名前を持つこの型の列挙型定数を返します。
|
static EntityDamageEvent.DamageCause[] |
values()
この列挙型の定数を含む配列を宣言されている順序で返します。
|
public static final EntityDamageEvent.DamageCause CONTACT
Damage: 1 (Cactus)
public static final EntityDamageEvent.DamageCause ENTITY_ATTACK
Damage: variable
public static final EntityDamageEvent.DamageCause PROJECTILE
Damage: variable
public static final EntityDamageEvent.DamageCause SUFFOCATION
Damage: 1
public static final EntityDamageEvent.DamageCause FALL
Damage: fall height - 3.0
public static final EntityDamageEvent.DamageCause FIRE
Damage: 1
public static final EntityDamageEvent.DamageCause FIRE_TICK
Damage: 1
public static final EntityDamageEvent.DamageCause MELTING
Damage: 1
public static final EntityDamageEvent.DamageCause LAVA
Damage: 4
public static final EntityDamageEvent.DamageCause DROWNING
Damage: 2
public static final EntityDamageEvent.DamageCause BLOCK_EXPLOSION
Damage: variable
public static final EntityDamageEvent.DamageCause ENTITY_EXPLOSION
Damage: variable
public static final EntityDamageEvent.DamageCause VOID
Damage: 4 for players
public static final EntityDamageEvent.DamageCause LIGHTNING
Damage: 5
public static final EntityDamageEvent.DamageCause SUICIDE
Damage: 1000
public static final EntityDamageEvent.DamageCause STARVATION
Damage: 1
public static final EntityDamageEvent.DamageCause POISON
Damage: 1
public static final EntityDamageEvent.DamageCause MAGIC
Damage: variable
public static final EntityDamageEvent.DamageCause WITHER
public static final EntityDamageEvent.DamageCause FALLING_BLOCK
Note: Not every block deals damage
Damage: variable
public static final EntityDamageEvent.DamageCause THORNS
Damage: 1-4 (Thorns)
public static final EntityDamageEvent.DamageCause DRAGON_BREATH
Damage: variable
public static final EntityDamageEvent.DamageCause CUSTOM
Damage: variable
public static final EntityDamageEvent.DamageCause FLY_INTO_WALL
Damage: variable
public static EntityDamageEvent.DamageCause[] values()
for(EntityDamageEvent.DamageCause c: EntityDamageEvent.DamageCause.values()) System.out.println(c);
public static EntityDamageEvent.DamageCause valueOf(String name)
name
- 返される列挙型定数の名前。IllegalArgumentException
- この列挙型に、指定した名前の定数がない場合NullPointerException
- 引数がnullの場合Copyright © 2016. All rights reserved.