Package net.minecraft.util
Class DamageSource
- java.lang.Object
-
- net.minecraft.util.DamageSource
-
- Direct Known Subclasses:
BedExplosionDamageSource
,EntityDamageSource
public class DamageSource extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static DamageSource
ANVIL
private boolean
bypassArmor
private boolean
bypassInvul
private boolean
bypassMagic
static DamageSource
CACTUS
static DamageSource
CRAMMING
static DamageSource
DRAGON_BREATH
static DamageSource
DROWN
static DamageSource
DRY_OUT
private float
exhaustion
static DamageSource
FALL
static DamageSource
FALLING_BLOCK
static DamageSource
FLY_INTO_WALL
static DamageSource
GENERIC
static DamageSource
HOT_FLOOR
static DamageSource
IN_FIRE
static DamageSource
IN_WALL
private boolean
isExplosion
private boolean
isFireSource
private boolean
isMagic
private boolean
isProjectile
static DamageSource
LAVA
static DamageSource
LIGHTNING_BOLT
static DamageSource
MAGIC
java.lang.String
msgId
static DamageSource
ON_FIRE
static DamageSource
OUT_OF_WORLD
private boolean
scalesWithDifficulty
static DamageSource
STARVE
static DamageSource
SWEET_BERRY_BUSH
static DamageSource
WITHER
-
Constructor Summary
Constructors Constructor Description DamageSource(java.lang.String p_i1566_1_)
-
Method Summary
-
-
-
Field Detail
-
IN_FIRE
public static final DamageSource IN_FIRE
-
LIGHTNING_BOLT
public static final DamageSource LIGHTNING_BOLT
-
ON_FIRE
public static final DamageSource ON_FIRE
-
LAVA
public static final DamageSource LAVA
-
HOT_FLOOR
public static final DamageSource HOT_FLOOR
-
IN_WALL
public static final DamageSource IN_WALL
-
CRAMMING
public static final DamageSource CRAMMING
-
DROWN
public static final DamageSource DROWN
-
STARVE
public static final DamageSource STARVE
-
CACTUS
public static final DamageSource CACTUS
-
FALL
public static final DamageSource FALL
-
FLY_INTO_WALL
public static final DamageSource FLY_INTO_WALL
-
OUT_OF_WORLD
public static final DamageSource OUT_OF_WORLD
-
GENERIC
public static final DamageSource GENERIC
-
MAGIC
public static final DamageSource MAGIC
-
WITHER
public static final DamageSource WITHER
-
ANVIL
public static final DamageSource ANVIL
-
FALLING_BLOCK
public static final DamageSource FALLING_BLOCK
-
DRAGON_BREATH
public static final DamageSource DRAGON_BREATH
-
DRY_OUT
public static final DamageSource DRY_OUT
-
SWEET_BERRY_BUSH
public static final DamageSource SWEET_BERRY_BUSH
-
bypassArmor
private boolean bypassArmor
-
bypassInvul
private boolean bypassInvul
-
bypassMagic
private boolean bypassMagic
-
exhaustion
private float exhaustion
-
isFireSource
private boolean isFireSource
-
isProjectile
private boolean isProjectile
-
scalesWithDifficulty
private boolean scalesWithDifficulty
-
isMagic
private boolean isMagic
-
isExplosion
private boolean isExplosion
-
msgId
public final java.lang.String msgId
-
-
Method Detail
-
sting
public static DamageSource sting(LivingEntity p_226252_0_)
-
mobAttack
public static DamageSource mobAttack(LivingEntity p_76358_0_)
-
indirectMobAttack
public static DamageSource indirectMobAttack(Entity p_188403_0_, LivingEntity p_188403_1_)
-
playerAttack
public static DamageSource playerAttack(PlayerEntity p_76365_0_)
-
arrow
public static DamageSource arrow(AbstractArrowEntity p_76353_0_, @Nullable Entity p_76353_1_)
-
trident
public static DamageSource trident(Entity p_203096_0_, @Nullable Entity p_203096_1_)
-
fireworks
public static DamageSource fireworks(FireworkRocketEntity p_233548_0_, @Nullable Entity p_233548_1_)
-
fireball
public static DamageSource fireball(AbstractFireballEntity p_233547_0_, @Nullable Entity p_233547_1_)
-
witherSkull
public static DamageSource witherSkull(WitherSkullEntity p_233549_0_, Entity p_233549_1_)
-
thrown
public static DamageSource thrown(Entity p_76356_0_, @Nullable Entity p_76356_1_)
-
indirectMagic
public static DamageSource indirectMagic(Entity p_76354_0_, @Nullable Entity p_76354_1_)
-
thorns
public static DamageSource thorns(Entity p_92087_0_)
-
explosion
public static DamageSource explosion(@Nullable Explosion p_94539_0_)
-
explosion
public static DamageSource explosion(@Nullable LivingEntity p_188405_0_)
-
badRespawnPointExplosion
public static DamageSource badRespawnPointExplosion()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isProjectile
public boolean isProjectile()
-
setProjectile
public DamageSource setProjectile()
-
isExplosion
public boolean isExplosion()
-
setExplosion
public DamageSource setExplosion()
-
isBypassArmor
public boolean isBypassArmor()
-
getFoodExhaustion
public float getFoodExhaustion()
-
isBypassInvul
public boolean isBypassInvul()
-
isBypassMagic
public boolean isBypassMagic()
-
getDirectEntity
@Nullable public Entity getDirectEntity()
-
getEntity
@Nullable public Entity getEntity()
-
bypassArmor
public DamageSource bypassArmor()
-
bypassInvul
public DamageSource bypassInvul()
-
bypassMagic
public DamageSource bypassMagic()
-
setIsFire
public DamageSource setIsFire()
-
getLocalizedDeathMessage
public ITextComponent getLocalizedDeathMessage(LivingEntity p_151519_1_)
-
isFire
public boolean isFire()
-
getMsgId
public java.lang.String getMsgId()
-
setScalesWithDifficulty
public DamageSource setScalesWithDifficulty()
-
scalesWithDifficulty
public boolean scalesWithDifficulty()
-
isMagic
public boolean isMagic()
-
setMagic
public DamageSource setMagic()
-
isCreativePlayer
public boolean isCreativePlayer()
-
getSourcePosition
@Nullable public Vector3d getSourcePosition()
-
-