Interface IEntityLivingBase<T extends net.minecraft.entity.EntityLivingBase>

    • Method Detail

      • getHealth

        float getHealth()
        Returns:
        The entity's current health
      • setHealth

        void setHealth​(float health)
        Parameters:
        health - The new health of this entity
      • hurt

        void hurt​(float damage)
      • hurt

        void hurt​(float damage,
                  IEntity source)
      • setMaxHurtTime

        void setMaxHurtTime​(int time)
      • setMaxHurtTime

        int setMaxHurtTime()
      • getMaxHealth

        double getMaxHealth()
        Returns:
        Entity's max health
      • getFollowRange

        double getFollowRange()
      • getKnockbackResistance

        double getKnockbackResistance()
      • getSpeed

        double getSpeed()
      • getMeleeStrength

        double getMeleeStrength()
      • setMaxHealth

        void setMaxHealth​(double health)
      • setFollowRange

        void setFollowRange​(double range)
      • setKnockbackResistance

        void setKnockbackResistance​(double knockbackResistance)
      • setSpeed

        void setSpeed​(double speed)
      • setMeleeStrength

        void setMeleeStrength​(double attackDamage)
      • isAttacking

        boolean isAttacking()
        Returns:
        Whether or not this entity is attacking something
      • setAttackTarget

        void setAttackTarget​(IEntityLivingBase living)
        Parameters:
        living - Entity which this entity will attack
      • getAttackTarget

        IEntityLivingBase getAttackTarget()
        Returns:
        The entity which this entity is attacking
      • getAttackTargetTime

        int getAttackTargetTime()
      • setLastAttacker

        void setLastAttacker​(IEntity p_130011_1_)
      • getLastAttacker

        IEntity getLastAttacker()
      • getLastAttackerTime

        int getLastAttackerTime()
      • canBreatheUnderwater

        boolean canBreatheUnderwater()
      • getType

        int getType()
        Specified by:
        getType in interface IEntity<T extends net.minecraft.entity.EntityLivingBase>
        Returns:
        Returns the EntityType of this entity
        See Also:
        EntityType
      • typeOf

        boolean typeOf​(int type)
        Specified by:
        typeOf in interface IEntity<T extends net.minecraft.entity.EntityLivingBase>
        Returns:
        Returns whether the entity is type of the given @EntityType
      • canSeeEntity

        boolean canSeeEntity​(IEntity entity)
        Parameters:
        entity - Entity to check
        Returns:
        Whether or not this entity can see the given entity
      • getLookVector

        IPos getLookVector()
        Returns:
        Returns the look vector of this entity as an IPos object.
      • getLookingAtBlock

        IBlock getLookingAtBlock​(int maxDistance,
                                 boolean stopOnBlock,
                                 boolean stopOnLiquid,
                                 boolean stopOnCollision)
      • getLookingAtBlock

        IBlock getLookingAtBlock​(int maxDistance)
        Parameters:
        maxDistance - The max distance to perform checks before stopping
        Returns:
        The first block found by following along the entity's look vector.
      • getLookingAtPos

        IPos getLookingAtPos​(int maxDistance,
                             boolean stopOnBlock,
                             boolean stopOnLiquid,
                             boolean stopOnCollision)
      • getLookingAtPos

        IPos getLookingAtPos​(int maxDistance)
        Returns an IPos object corresponding to the final obstructed point following along the entity's look vector. If no obstructions are found (entity is looking in a straight path of air with no blocks in the way), the final position is returned.
        Parameters:
        maxDistance - The max distance to perform checks before stopping
        Returns:
        The position the entity is looking at.
      • getLookingAtEntities

        IEntity[] getLookingAtEntities​(IEntity[] ignoreEntities,
                                       int maxDistance,
                                       double offset,
                                       double range,
                                       boolean stopOnBlock,
                                       boolean stopOnLiquid,
                                       boolean stopOnCollision)
        Parameters:
        maxDistance - The max distance to perform checks before stopping
        range - The radius to check for surrounding entities at every point on the vector
        Returns:
        A list of entities, sorted first by closest to the entity along the look vector, then by which entities are closest to the vector.
      • getLookingAtEntities

        IEntity[] getLookingAtEntities​(int maxDistance,
                                       double offset,
                                       double range,
                                       boolean stopOnBlock,
                                       boolean stopOnLiquid,
                                       boolean stopOnCollision)
      • getLookingAtEntities

        IEntity[] getLookingAtEntities​(int maxDistance,
                                       double offset,
                                       double range)
      • getMCEntity

        T getMCEntity()
        Expert use only
        Specified by:
        getMCEntity in interface IEntity<T extends net.minecraft.entity.EntityLivingBase>
        Returns:
        Returns the minecraft entity object
      • swingHand

        void swingHand()
        Makes the entity swing its hand
      • addPotionEffect

        void addPotionEffect​(int effect,
                             int duration,
                             int strength,
                             boolean hideParticles)
        Works the same as the /effect command
        Parameters:
        effect -
        duration - The duration in seconds
        strength - The amplifier of the potion effect
        hideParticles - Whether or not you want to hide potion particles
      • clearPotionEffects

        void clearPotionEffects()
        Clears all potion effects
      • getPotionEffect

        int getPotionEffect​(int effect)
        Parameters:
        effect - Potion effect to check
        Returns:
        Returns -1 if its not active. Otherwise returns the strenght of the potion
        Since:
        1.7.10c
      • getHeldItem

        IItemStack getHeldItem()
        Note not all Living Entities support this
        Returns:
        The item the entity is holding
        Since:
        1.7.10c
      • setHeldItem

        void setHeldItem​(IItemStack item)
        Note not all Living Entities support this
        Parameters:
        item - The item to be set
        Since:
        1.7.10c
      • getArmor

        IItemStack getArmor​(int slot)
        Note not all Living Entities support this
        Parameters:
        slot - Slot of what armor piece to get, 0:boots, 1:pants, 2:body, 3:head
        Returns:
        The item in the given slot
      • setArmor

        void setArmor​(int slot,
                      IItemStack item)
        Note not all Living Entities support this
        Parameters:
        slot - Slot of what armor piece to set, 0:boots, 1:pants, 2:body, 3:head
        item - Item to be set
        Since:
        1.7.10c
      • isChild

        boolean isChild()
      • renderBrokenItemStack

        void renderBrokenItemStack​(IItemStack itemStack)
      • isOnLadder

        boolean isOnLadder()
      • getTotalArmorValue

        int getTotalArmorValue()
      • getArrowCountInEntity

        int getArrowCountInEntity()
      • setArrowCountInEntity

        void setArrowCountInEntity​(int count)
      • dismountEntity

        void dismountEntity​(IEntity entity)
      • setAIMoveSpeed

        void setAIMoveSpeed​(float speed)
      • getAIMoveSpeed

        float getAIMoveSpeed()
      • setAbsorptionAmount

        void setAbsorptionAmount​(float amount)
      • getAbsorptionAmount

        float getAbsorptionAmount()