Class DamageSource

java.lang.Object
net.minecraft.src.DamageSource
Direct Known Subclasses:
BTWDamageSources, EntityDamageSource

public class DamageSource extends Object
  • Field Details

  • Constructor Details

    • DamageSource

      protected DamageSource(String par1Str)
  • Method Details

    • causeMobDamage

      public static DamageSource causeMobDamage(EntityLivingBase par0EntityLivingBase)
    • 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)
    • causeThornsDamage

      public static DamageSource causeThornsDamage(Entity par0Entity)
      Returns the EntityDamageSource of the Thorns enchantment
    • setExplosionSource

      public static DamageSource setExplosionSource(Explosion par0Explosion)
    • isProjectile

      public boolean isProjectile()
      Returns true if the damage is projectile based.
    • setProjectile

      public DamageSource setProjectile()
      Define the damage type as projectile based.
    • isExplosion

      public boolean isExplosion()
    • setExplosion

      public DamageSource setExplosion()
    • 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()
    • setDamageBypassesArmor

      public DamageSource setDamageBypassesArmor()
    • setDamageAllowedInCreativeMode

      public DamageSource setDamageAllowedInCreativeMode()
    • setFireDamage

      public DamageSource setFireDamage()
      Define the damage type as fire based.
    • getDeathMessage

      public ChatMessageComponent getDeathMessage(EntityLivingBase par1EntityLivingBase)
      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.
    • setDifficultyScaled

      public DamageSource 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

      public DamageSource setMagicDamage()
      Define the damage type as magic based.