Package net.minecraft.src
Class DamageSource
java.lang.Object
net.minecraft.src.DamageSource
- Direct Known Subclasses:
BTWDamageSources,EntityDamageSource
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic DamageSourcestatic DamageSourcestatic DamageSourcestatic DamageSourcestatic DamageSourcestatic DamageSourcestatic DamageSourcestatic DamageSourcestatic DamageSourcestatic DamageSourcestatic DamageSourcestatic DamageSourcestatic DamageSourcestatic DamageSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic DamageSourcecauseArrowDamage(EntityArrow par0EntityArrow, Entity par1Entity) returns EntityDamageSourceIndirect of an arrowstatic DamageSourcecauseFireballDamage(EntityFireball par0EntityFireball, Entity par1Entity) returns EntityDamageSourceIndirect of a fireballstatic DamageSourcecauseIndirectMagicDamage(Entity par0Entity, Entity par1Entity) static DamageSourcecauseMobDamage(EntityLivingBase par0EntityLivingBase) static DamageSourcecausePlayerDamage(EntityPlayer par0EntityPlayer) returns an EntityDamageSource of type playerstatic DamageSourcecauseThornsDamage(Entity par0Entity) Returns the EntityDamageSource of the Thorns enchantmentstatic DamageSourcecauseThrownDamage(Entity par0Entity, Entity par1Entity) Return the name of damage type.getDeathMessage(EntityLivingBase par1EntityLivingBase) Returns the message to be displayed on player death.floatHow much satiate(food) is consumed by this DamageSourcebooleanReturn whether this damage source will have its damage amount scaled based on the current difficulty.booleanbooleanReturns true if the damage is fire based.booleanReturns true if the damage is magic based.booleanReturns true if the damage is projectile based.booleanSet whether this damage source will have its damage amount scaled based on the current difficulty.static DamageSourcesetExplosionSource(Explosion par0Explosion) Define the damage type as fire based.Define the damage type as magic based.Define the damage type as projectile based.
-
Field Details
-
inFire
-
onFire
-
lava
-
inWall
-
drown
-
starve
-
cactus
-
fall
-
outOfWorld
-
generic
-
magic
-
wither
-
anvil
-
fallingBlock
-
damageType
-
-
Constructor Details
-
DamageSource
-
-
Method Details
-
causeMobDamage
-
causePlayerDamage
returns an EntityDamageSource of type player -
causeArrowDamage
returns EntityDamageSourceIndirect of an arrow -
causeFireballDamage
public static DamageSource causeFireballDamage(EntityFireball par0EntityFireball, Entity par1Entity) returns EntityDamageSourceIndirect of a fireball -
causeThrownDamage
-
causeIndirectMagicDamage
-
causeThornsDamage
Returns the EntityDamageSource of the Thorns enchantment -
setExplosionSource
-
isProjectile
public boolean isProjectile()Returns true if the damage is projectile based. -
setProjectile
Define the damage type as projectile based. -
isExplosion
public boolean isExplosion() -
setExplosion
-
isUnblockable
public boolean isUnblockable() -
getHungerDamage
public float getHungerDamage()How much satiate(food) is consumed by this DamageSource -
canHarmInCreative
public boolean canHarmInCreative() -
getSourceOfDamage
-
getEntity
-
setDamageBypassesArmor
-
setDamageAllowedInCreativeMode
-
setFireDamage
Define the damage type as fire based. -
getDeathMessage
Returns the message to be displayed on player death. -
isFireDamage
public boolean isFireDamage()Returns true if the damage is fire based. -
getDamageType
Return the name of damage type. -
setDifficultyScaled
Set whether this damage source will have its damage amount scaled based on the current difficulty. -
isDifficultyScaled
public boolean isDifficultyScaled()Return whether this damage source will have its damage amount scaled based on the current difficulty. -
isMagicDamage
public boolean isMagicDamage()Returns true if the damage is magic based. -
setMagicDamage
Define the damage type as magic based.
-