Class EntityAgeable

Direct Known Subclasses:
EntityAnimal, EntityVillager

public abstract class EntityAgeable extends EntityCreature
  • Constructor Details

    • EntityAgeable

      public EntityAgeable(World par1World)
  • Method Details

    • createChild

      public abstract EntityAgeable createChild(EntityAgeable var1)
    • interact

      public boolean interact(EntityPlayer par1EntityPlayer)
      Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
      Overrides:
      interact in class EntityLiving
    • entityAgeableInteract

      public boolean entityAgeableInteract(EntityPlayer par1EntityPlayer)
    • entityInit

      protected void entityInit()
      Overrides:
      entityInit in class EntityCreature
    • isTemptingItem

      public boolean isTemptingItem(ItemStack stack)
    • getGrowingAge

      public int getGrowingAge()
      The age value may be negative or positive or zero. If it's negative, it get's incremented on each tick, if it's positive, it get's decremented each tick. Don't confuse this with EntityLiving.getAge. With a negative value the Entity is considered a child.
    • addGrowth

      public void addGrowth(int par1)
      "Adds the value of the parameter times 20 to the age of this entity. If the entity is an adult (if the entity's age is greater than 0), it will have no effect."
    • setGrowingAge

      public void setGrowingAge(int par1)
      The age value may be negative or positive or zero. If it's negative, it get's incremented on each tick, if it's positive, it get's decremented each tick. With a negative value the Entity is considered a child.
    • writeEntityToNBT

      public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
      (abstract) Protected helper method to write subclass entity data to NBT.
      Overrides:
      writeEntityToNBT in class EntityCreature
    • readEntityFromNBT

      public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
      (abstract) Protected helper method to read subclass entity data from NBT.
      Overrides:
      readEntityFromNBT in class EntityCreature
    • onLivingUpdate

      public void onLivingUpdate()
      Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons use this to react to sunlight and start to burn.
      Overrides:
      onLivingUpdate in class EntityLiving
    • isChild

      public boolean isChild()
      If Animal, checks if the age timer is negative
      Overrides:
      isChild in class EntityLivingBase
    • setSize

      protected final void setSize(float fWidth, float fHeight)
      Description copied from class: Entity
      Sets the width and height of the entity. Args: width, height
      Overrides:
      setSize in class Entity
    • setScale

      protected final void setScale(float par1)
    • adjustSizeForAge

      public void adjustSizeForAge(boolean bIsChild)
    • canChildGrow

      public boolean canChildGrow()
    • setScaleForAge

      public void setScaleForAge(boolean par1)
      "Sets the scale for an ageable entity according to the boolean parameter, which says if it's a child."
    • canLoveJuiceRegenerate

      public boolean canLoveJuiceRegenerate()
    • getTicksForChildToGrow

      public int getTicksForChildToGrow()