public class DamageSource
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static DamageSource |
anvil |
static DamageSource |
cactus |
java.lang.String |
damageType |
static DamageSource |
drown |
static DamageSource |
fall |
static DamageSource |
fallingBlock |
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 |
Constructor and Description |
---|
DamageSource(java.lang.String par1Str) |
Modifier and Type | Method and Description |
---|---|
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(EntityLivingBase par0EntityLivingBase) |
static DamageSource |
causePlayerDamage(EntityPlayer par0EntityPlayer)
returns an EntityDamageSource of type player
|
static DamageSource |
causeThornsDamage(Entity par0Entity)
Returns the EntityDamageSource of the Thorns enchantment
|
static DamageSource |
causeThrownDamage(Entity par0Entity,
Entity par1Entity) |
IChatComponent |
func_151519_b(EntityLivingBase p_151519_1_) |
java.lang.String |
getDamageType()
Return the name of damage type.
|
Entity |
getEntity() |
float |
getHungerDamage()
How much satiate(food) is consumed by this DamageSource
|
Entity |
getSourceOfDamage() |
boolean |
isDamageAbsolute()
Whether or not the damage ignores modification by potion effects or enchantments.
|
boolean |
isDifficultyScaled()
Return whether this damage source will have its damage amount scaled based on the current difficulty.
|
boolean |
isExplosion() |
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 |
setDamageAllowedInCreativeMode() |
DamageSource |
setDamageBypassesArmor() |
DamageSource |
setDamageIsAbsolute()
Sets a value indicating whether the damage is absolute (ignores modification by potion effects or enchantments),
and also clears out hunger damage.
|
DamageSource |
setDifficultyScaled()
Set whether this damage source will have its damage amount scaled based on the current difficulty.
|
DamageSource |
setExplosion() |
static DamageSource |
setExplosionSource(Explosion par0Explosion) |
DamageSource |
setFireDamage()
Define the damage type as fire based.
|
DamageSource |
setMagicDamage()
Define the damage type as magic based.
|
DamageSource |
setProjectile()
Define the damage type as projectile based.
|
public static DamageSource inFire
public static DamageSource onFire
public static DamageSource lava
public static DamageSource inWall
public static DamageSource drown
public static DamageSource starve
public static DamageSource cactus
public static DamageSource fall
public static DamageSource outOfWorld
public static DamageSource generic
public static DamageSource magic
public static DamageSource wither
public static DamageSource anvil
public static DamageSource fallingBlock
public java.lang.String damageType
public static DamageSource causeMobDamage(EntityLivingBase par0EntityLivingBase)
public static DamageSource causePlayerDamage(EntityPlayer par0EntityPlayer)
public static DamageSource causeArrowDamage(EntityArrow par0EntityArrow, Entity par1Entity)
public static DamageSource causeFireballDamage(EntityFireball par0EntityFireball, Entity par1Entity)
public static DamageSource causeThrownDamage(Entity par0Entity, Entity par1Entity)
public static DamageSource causeIndirectMagicDamage(Entity par0Entity, Entity par1Entity)
public static DamageSource causeThornsDamage(Entity par0Entity)
public static DamageSource setExplosionSource(Explosion par0Explosion)
public boolean isProjectile()
public DamageSource setProjectile()
public boolean isExplosion()
public DamageSource setExplosion()
public boolean isUnblockable()
public float getHungerDamage()
public boolean canHarmInCreative()
public boolean isDamageAbsolute()
public Entity getSourceOfDamage()
public Entity getEntity()
public DamageSource setDamageBypassesArmor()
public DamageSource setDamageAllowedInCreativeMode()
public DamageSource setDamageIsAbsolute()
public DamageSource setFireDamage()
public IChatComponent func_151519_b(EntityLivingBase p_151519_1_)
public boolean isFireDamage()
public java.lang.String getDamageType()
public DamageSource setDifficultyScaled()
public boolean isDifficultyScaled()
public boolean isMagicDamage()
public DamageSource setMagicDamage()