Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.util
Class DamageSource

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

Direct Known Subclasses:
  EntityDamageSource

    public class DamageSource

extends Object

Field Summary
`static DamageSource` | `anvil`
`static DamageSource` | `cactus`
`String` | `damageType`
`static DamageSource` | `drown`
`static DamageSource` | `explosion`
`static DamageSource` | `fall`
`static DamageSource` | `fallingBlock`
`static DamageSource` | `field_76375_l`
`static DamageSource` | `generic`
`static DamageSource` | `inFire`
`static DamageSource` | `inWall`
`static DamageSource` | `lava`
`static DamageSource` | `magic`
`static DamageSource` | `onFire`
`static DamageSource` | `outOfWorld`
`static DamageSource` | `starve`
`static DamageSource` | `wither`

Method Summary
`boolean` | `canHarmInCreative()`
`static DamageSource` | `causeArrowDamage(EntityArrow par0EntityArrow, Entity par1Entity)` returns EntityDamageSourceIndirect of an arrow
`static DamageSource` | `causeFireballDamage(EntityFireball par0EntityFireball, Entity par1Entity)` returns EntityDamageSourceIndirect of a fireball
`static DamageSource` | `causeIndirectMagicDamage(Entity par0Entity, Entity par1Entity)`
`static DamageSource` | `causeMobDamage(EntityLiving par0EntityLiving)`
`static DamageSource` | `causePlayerDamage(EntityPlayer par0EntityPlayer)` returns an EntityDamageSource of type player
`static DamageSource` | `causeThrownDamage(Entity par0Entity, Entity par1Entity)`
`boolean` | `func_76350_n()`
`DamageSource` | `func_76351_m()`
`static DamageSource` | `func_92036_a(Entity par0Entity)`
`String` | `getDamageType()` Return the name of damage type.
`String` | `getDeathMessage(EntityPlayer par1EntityPlayer)` Returns the message to be displayed on player death.
`Entity` | `getEntity()`
`float` | `getHungerDamage()` How much satiate(food) is consumed by this DamageSource
`Entity` | `getSourceOfDamage()`
`boolean` | `isFireDamage()` Returns true if the damage is fire based.
`boolean` | `isMagicDamage()` Returns true if the damage is magic based.
`boolean` | `isProjectile()` Returns true if the damage is projectile based.
`boolean` | `isUnblockable()`
`DamageSource` | `setMagicDamage()` Define the damage type as magic based.
`DamageSource` | `setProjectile()` Define the damage type as projectile based.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### inFire

    public static DamageSource inFire

### onFire

    public static DamageSource onFire

### lava

    public static DamageSource lava

### inWall

    public static DamageSource inWall

### drown

    public static DamageSource drown

### starve

    public static DamageSource starve

### cactus

    public static DamageSource cactus

### fall

    public static DamageSource fall

### outOfWorld

    public static DamageSource outOfWorld

### generic

    public static DamageSource generic

### explosion

    public static DamageSource explosion

### field_76375_l

    public static DamageSource field_76375_l

### magic

    public static DamageSource magic

### wither

    public static DamageSource wither

### anvil

    public static DamageSource anvil

### fallingBlock

    public static DamageSource fallingBlock

### damageType

    public String damageType

Method Detail

### causeMobDamage

    public static DamageSource causeMobDamage(EntityLiving par0EntityLiving)

### causePlayerDamage

    public static DamageSource causePlayerDamage(EntityPlayer par0EntityPlayer)

  returns an EntityDamageSource of type player

### causeArrowDamage

    public static DamageSource causeArrowDamage(EntityArrow par0EntityArrow,
                                                Entity par1Entity)

  returns EntityDamageSourceIndirect of an arrow

### causeFireballDamage

    public static DamageSource causeFireballDamage(EntityFireball par0EntityFireball,
                                                   Entity par1Entity)

  returns EntityDamageSourceIndirect of a fireball

### causeThrownDamage

    public static DamageSource causeThrownDamage(Entity par0Entity,
                                                 Entity par1Entity)

### causeIndirectMagicDamage

    public static DamageSource causeIndirectMagicDamage(Entity par0Entity,
                                                        Entity par1Entity)

### func_92036_a

    public static DamageSource func_92036_a(Entity par0Entity)

### isProjectile

    public boolean isProjectile()

  Returns true if the damage is projectile based.

### setProjectile

    public DamageSource setProjectile()

  Define the damage type as projectile based.

### isUnblockable

    public boolean isUnblockable()

### getHungerDamage

    public float getHungerDamage()

  How much satiate(food) is consumed by this DamageSource

### canHarmInCreative

    public boolean canHarmInCreative()

### getSourceOfDamage

    public Entity getSourceOfDamage()

### getEntity

    public Entity getEntity()

### getDeathMessage

    public String getDeathMessage(EntityPlayer par1EntityPlayer)

  Returns the message to be displayed on player death.

### isFireDamage

    public boolean isFireDamage()

  Returns true if the damage is fire based.

### getDamageType

    public String getDamageType()

  Return the name of damage type.

### func_76351_m

    public DamageSource func_76351_m()

### func_76350_n

    public boolean func_76350_n()

### isMagicDamage

    public boolean isMagicDamage()

  Returns true if the damage is magic based.

### setMagicDamage

    public DamageSource setMagicDamage()

  Define the damage type as magic based.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD