Class DamageSource

  • Direct Known Subclasses:
    EntityDamageSource

    public class DamageSource
    extends java.lang.Object
    + This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
    • Constructor Detail

      • DamageSource

        protected DamageSource​(java.lang.String damageTypeIn)
    • Method Detail

      • causePlayerDamage

        public static DamageSource causePlayerDamage​(EntityPlayer player)
        + returns an EntityDamageSource of type player
      • causeArrowDamage

        public static DamageSource causeArrowDamage​(EntityArrow arrow,
                                                    Entity parEntity)
        + returns EntityDamageSourceIndirect of an arrow
      • causeFireballDamage

        public static DamageSource causeFireballDamage​(EntityFireball fireball,
                                                       Entity parEntity)
        + returns EntityDamageSourceIndirect of a fireball
      • causeIndirectMagicDamage

        public static DamageSource causeIndirectMagicDamage​(Entity parEntity,
                                                            Entity parEntity2)
      • causeThornsDamage

        public static DamageSource causeThornsDamage​(Entity parEntity)
        + Returns the EntityDamageSource of the Thorns enchantment
      • 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()
      • isUnblockable

        public boolean isUnblockable()
      • getHungerDamage

        public float getHungerDamage()
        + How much satiate(food) is consumed by this DamageSource
      • canHarmInCreative

        public boolean canHarmInCreative()
      • isDamageAbsolute

        public boolean isDamageAbsolute()
        + Whether or not the damage ignores modification by potion effects or enchantments.
      • getSourceOfDamage

        public Entity getSourceOfDamage()
      • getEntity

        public Entity getEntity()
      • setDamageBypassesArmor

        protected DamageSource setDamageBypassesArmor()
      • setDamageAllowedInCreativeMode

        protected DamageSource setDamageAllowedInCreativeMode()
      • setDamageIsAbsolute

        protected DamageSource setDamageIsAbsolute()
        + Sets a value indicating whether the damage is absolute (ignores modification by potion effects or enchantments), and also clears out hunger damage.
      • setFireDamage

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

        public IChatComponent getDeathMessage​(EntityLivingBase parEntityLivingBase)
        + Gets the death message that is displayed when the player dies
      • isFireDamage

        public boolean isFireDamage()
        + Returns true if the damage is fire based.
      • getDamageType

        public java.lang.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.
      • isCreativePlayer

        public boolean isCreativePlayer()