public class EntityDamageSource extends DamageSource
| Modifier and Type | Field and Description |
|---|---|
protected Entity |
damageSourceEntity |
ANVIL, CACTUS, CRAMMING, damageType, DRAGON_BREATH, DROWN, FALL, FALLING_BLOCK, FIREWORKS, FLY_INTO_WALL, GENERIC, HOT_FLOOR, IN_FIRE, IN_WALL, LAVA, LIGHTNING_BOLT, MAGIC, ON_FIRE, OUT_OF_WORLD, STARVE, WITHER| Constructor and Description |
|---|
EntityDamageSource(java.lang.String damageTypeIn,
Entity damageSourceEntityIn) |
| Modifier and Type | Method and Description |
|---|---|
Vec3d |
getDamageLocation()
Gets the location from which the damage originates.
|
ITextComponent |
getDeathMessage(EntityLivingBase entityLivingBaseIn)
Gets the death message that is displayed when the player dies
|
boolean |
getIsThornsDamage() |
Entity |
getTrueSource()
Retrieves the true causer of the damage, e.g.
|
boolean |
isDifficultyScaled()
Return whether this damage source will have its damage amount scaled based on the current difficulty.
|
EntityDamageSource |
setIsThornsDamage()
Sets this EntityDamageSource as originating from Thorns armor
|
canHarmInCreative, causeArrowDamage, causeExplosionDamage, causeExplosionDamage, causeFireballDamage, causeIndirectDamage, causeIndirectMagicDamage, causeMobDamage, causePlayerDamage, causeThornsDamage, causeThrownDamage, getDamageType, getHungerDamage, getImmediateSource, isCreativePlayer, isDamageAbsolute, isExplosion, isFireDamage, isMagicDamage, isProjectile, isUnblockable, setDamageAllowedInCreativeMode, setDamageBypassesArmor, setDamageIsAbsolute, setDifficultyScaled, setExplosion, setFireDamage, setMagicDamage, setProjectileprotected Entity damageSourceEntity
public EntityDamageSource(java.lang.String damageTypeIn,
Entity damageSourceEntityIn)
public EntityDamageSource setIsThornsDamage()
public boolean getIsThornsDamage()
public Entity getTrueSource()
getTrueSource in class DamageSourcepublic ITextComponent getDeathMessage(EntityLivingBase entityLivingBaseIn)
getDeathMessage in class DamageSourcepublic boolean isDifficultyScaled()
isDifficultyScaled in class DamageSourcepublic Vec3d getDamageLocation()
getDamageLocation in class DamageSource