net.minecraft.util

## Class EntityDamageSource

- java.lang.Object
- - net.minecraft.util.DamageSource
  - - net.minecraft.util.EntityDamageSource

- Direct Known Subclasses:
    EntityDamageSourceIndirect

      public class EntityDamageSource
      extends DamageSource

- - ### Field Summary

    - ### Fields inherited from class net.minecraft.util.DamageSource

      `anvil, cactus, damageType, drown, fall, fallingBlock, generic, inFire, inWall, lava, magic, onFire, outOfWorld, starve, wither`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EntityDamageSource(String par1Str, Entity par2Entity)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ChatMessageComponent` | `getDeathMessage(EntityLivingBase par1EntityLivingBase)` Returns the message to be displayed on player death.
    `Entity` | `getEntity()`
    `boolean` | `isDifficultyScaled()` Return whether this damage source will have its damage amount scaled based on the current difficulty.

    - ### Methods inherited from class net.minecraft.util.DamageSource

      `canHarmInCreative, causeArrowDamage, causeFireballDamage, causeIndirectMagicDamage, causeMobDamage, causePlayerDamage, causeThornsDamage, causeThrownDamage, getDamageType, getHungerDamage, getSourceOfDamage, isExplosion, isFireDamage, isMagicDamage, isProjectile, isUnblockable, setDifficultyScaled, setExplosion, setExplosionSource, setMagicDamage, setProjectile`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EntityDamageSource

          public EntityDamageSource(String par1Str,
                            Entity par2Entity)

  - ### Method Detail

    - #### getEntity

          public Entity getEntity()

      Overrides:
        `getEntity` in class `DamageSource`

    - #### getDeathMessage

          public ChatMessageComponent getDeathMessage(EntityLivingBase par1EntityLivingBase)

      Returns the message to be displayed on player death.
      Overrides:
        `getDeathMessage` in class `DamageSource`

    - #### isDifficultyScaled

          public boolean isDifficultyScaled()

      Return whether this damage source will have its damage amount scaled based on the current difficulty.
      Overrides:
        `isDifficultyScaled` in class `DamageSource`