YATS/Forge Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
net.minecraft.util.DamageSource Class Reference
Inheritance diagram for net.minecraft.util.DamageSource:
net.minecraft.util.EntityDamageSource net.minecraft.util.EntityDamageSourceIndirect

Public Member Functions

boolean isProjectile ()
 
DamageSource setProjectile ()
 
boolean isExplosion ()
 
DamageSource setExplosion ()
 
boolean isUnblockable ()
 
float getHungerDamage ()
 
boolean canHarmInCreative ()
 
Entity getSourceOfDamage ()
 
Entity getEntity ()
 
String getDeathMessage (EntityLiving par1EntityLiving)
 
boolean isFireDamage ()
 
String getDamageType ()
 
DamageSource setDifficultyScaled ()
 
boolean isDifficultyScaled ()
 
boolean isMagicDamage ()
 
DamageSource setMagicDamage ()
 

Static Public Member Functions

static DamageSource causeMobDamage (EntityLiving par0EntityLiving)
 
static DamageSource causePlayerDamage (EntityPlayer par0EntityPlayer)
 
static DamageSource causeArrowDamage (EntityArrow par0EntityArrow, Entity par1Entity)
 
static DamageSource causeFireballDamage (EntityFireball par0EntityFireball, Entity par1Entity)
 
static DamageSource causeThrownDamage (Entity par0Entity, Entity par1Entity)
 
static DamageSource causeIndirectMagicDamage (Entity par0Entity, Entity par1Entity)
 
static DamageSource causeThornsDamage (Entity par0Entity)
 
static DamageSource setExplosionSource (Explosion par0Explosion)
 

Public Attributes

String damageType
 

Static Public Attributes

static DamageSource inFire = (new DamageSource("inFire")).setFireDamage()
 
static DamageSource onFire = (new DamageSource("onFire")).setDamageBypassesArmor().setFireDamage()
 
static DamageSource lava = (new DamageSource("lava")).setFireDamage()
 
static DamageSource inWall = (new DamageSource("inWall")).setDamageBypassesArmor()
 
static DamageSource drown = (new DamageSource("drown")).setDamageBypassesArmor()
 
static DamageSource starve = (new DamageSource("starve")).setDamageBypassesArmor()
 
static DamageSource cactus = new DamageSource("cactus")
 
static DamageSource fall = (new DamageSource("fall")).setDamageBypassesArmor()
 
static DamageSource outOfWorld = (new DamageSource("outOfWorld")).setDamageBypassesArmor().setDamageAllowedInCreativeMode()
 
static DamageSource generic = (new DamageSource("generic")).setDamageBypassesArmor()
 
static DamageSource magic = (new DamageSource("magic")).setDamageBypassesArmor().setMagicDamage()
 
static DamageSource wither = (new DamageSource("wither")).setDamageBypassesArmor()
 
static DamageSource anvil = new DamageSource("anvil")
 
static DamageSource fallingBlock = new DamageSource("fallingBlock")
 

Protected Member Functions

 DamageSource (String par1Str)
 
DamageSource setDamageBypassesArmor ()
 
DamageSource setDamageAllowedInCreativeMode ()
 
DamageSource setFireDamage ()
 

Constructor & Destructor Documentation

net.minecraft.util.DamageSource.DamageSource ( String  par1Str)
protected

Member Function Documentation

boolean net.minecraft.util.DamageSource.canHarmInCreative ( )
static DamageSource net.minecraft.util.DamageSource.causeArrowDamage ( EntityArrow  par0EntityArrow,
Entity  par1Entity 
)
static

returns EntityDamageSourceIndirect of an arrow

static DamageSource net.minecraft.util.DamageSource.causeFireballDamage ( EntityFireball  par0EntityFireball,
Entity  par1Entity 
)
static

returns EntityDamageSourceIndirect of a fireball

static DamageSource net.minecraft.util.DamageSource.causeIndirectMagicDamage ( Entity  par0Entity,
Entity  par1Entity 
)
static
static DamageSource net.minecraft.util.DamageSource.causeMobDamage ( EntityLiving  par0EntityLiving)
static
static DamageSource net.minecraft.util.DamageSource.causePlayerDamage ( EntityPlayer  par0EntityPlayer)
static

returns an EntityDamageSource of type player

static DamageSource net.minecraft.util.DamageSource.causeThornsDamage ( Entity  par0Entity)
static

Returns the EntityDamageSource of the Thorns enchantment

static DamageSource net.minecraft.util.DamageSource.causeThrownDamage ( Entity  par0Entity,
Entity  par1Entity 
)
static
String net.minecraft.util.DamageSource.getDamageType ( )

Return the name of damage type.

String net.minecraft.util.DamageSource.getDeathMessage ( EntityLiving  par1EntityLiving)

Returns the message to be displayed on player death.

Entity net.minecraft.util.DamageSource.getEntity ( )
float net.minecraft.util.DamageSource.getHungerDamage ( )

How much satiate(food) is consumed by this DamageSource

Entity net.minecraft.util.DamageSource.getSourceOfDamage ( )
boolean net.minecraft.util.DamageSource.isDifficultyScaled ( )

Return whether this damage source will have its damage amount scaled based on the current difficulty.

boolean net.minecraft.util.DamageSource.isExplosion ( )
boolean net.minecraft.util.DamageSource.isFireDamage ( )

Returns true if the damage is fire based.

boolean net.minecraft.util.DamageSource.isMagicDamage ( )

Returns true if the damage is magic based.

boolean net.minecraft.util.DamageSource.isProjectile ( )

Returns true if the damage is projectile based.

boolean net.minecraft.util.DamageSource.isUnblockable ( )
DamageSource net.minecraft.util.DamageSource.setDamageAllowedInCreativeMode ( )
protected
DamageSource net.minecraft.util.DamageSource.setDamageBypassesArmor ( )
protected
DamageSource net.minecraft.util.DamageSource.setDifficultyScaled ( )

Set whether this damage source will have its damage amount scaled based on the current difficulty.

DamageSource net.minecraft.util.DamageSource.setExplosion ( )
static DamageSource net.minecraft.util.DamageSource.setExplosionSource ( Explosion  par0Explosion)
static
DamageSource net.minecraft.util.DamageSource.setFireDamage ( )
protected

Define the damage type as fire based.

DamageSource net.minecraft.util.DamageSource.setMagicDamage ( )

Define the damage type as magic based.

DamageSource net.minecraft.util.DamageSource.setProjectile ( )

Define the damage type as projectile based.

Member Data Documentation

DamageSource net.minecraft.util.DamageSource.anvil = new DamageSource("anvil")
static
DamageSource net.minecraft.util.DamageSource.cactus = new DamageSource("cactus")
static
String net.minecraft.util.DamageSource.damageType
DamageSource net.minecraft.util.DamageSource.drown = (new DamageSource("drown")).setDamageBypassesArmor()
static
DamageSource net.minecraft.util.DamageSource.fall = (new DamageSource("fall")).setDamageBypassesArmor()
static
DamageSource net.minecraft.util.DamageSource.fallingBlock = new DamageSource("fallingBlock")
static
DamageSource net.minecraft.util.DamageSource.generic = (new DamageSource("generic")).setDamageBypassesArmor()
static
DamageSource net.minecraft.util.DamageSource.inFire = (new DamageSource("inFire")).setFireDamage()
static
DamageSource net.minecraft.util.DamageSource.inWall = (new DamageSource("inWall")).setDamageBypassesArmor()
static
DamageSource net.minecraft.util.DamageSource.lava = (new DamageSource("lava")).setFireDamage()
static
DamageSource net.minecraft.util.DamageSource.magic = (new DamageSource("magic")).setDamageBypassesArmor().setMagicDamage()
static
DamageSource net.minecraft.util.DamageSource.onFire = (new DamageSource("onFire")).setDamageBypassesArmor().setFireDamage()
static
DamageSource net.minecraft.util.DamageSource.outOfWorld = (new DamageSource("outOfWorld")).setDamageBypassesArmor().setDamageAllowedInCreativeMode()
static
DamageSource net.minecraft.util.DamageSource.starve = (new DamageSource("starve")).setDamageBypassesArmor()
static
DamageSource net.minecraft.util.DamageSource.wither = (new DamageSource("wither")).setDamageBypassesArmor()
static

The documentation for this class was generated from the following file: