Class EntityAgeable

    • Field Detail

      • growingAge

        protected int growingAge
      • field_175502_b

        protected int field_175502_b
      • field_175503_c

        protected int field_175503_c
    • Constructor Detail

      • EntityAgeable

        public EntityAgeable​(World worldIn)
    • Method Detail

      • interact

        public boolean interact​(EntityPlayer player)
        + 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
      • 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.
      • func_175501_a

        public void func_175501_a​(int parInt1,
                                  boolean parFlag)
      • addGrowth

        public void addGrowth​(int growth)
        + "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 age)
        + 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 nbttagcompound)
        + (abstract) Protected helper method to write subclass entity data to NBT.
        Overrides:
        writeEntityToNBT in class EntityLiving
      • readEntityFromNBT

        public void readEntityFromNBT​(NBTTagCompound nbttagcompound)
        + (abstract) Protected helper method to read subclass entity data from NBT.
        Overrides:
        readEntityFromNBT in class EntityLiving
      • 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 EntityLivingBase
      • onGrowingAdult

        protected void onGrowingAdult()
        + This is called when Entity's growing age timer reaches 0 (negative values are considered as a child, positive as an adult)
      • isChild

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

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

        protected final void setSize​(float width,
                                     float height)
        + Sets the width and height of the entity. Args: width, height
        Overrides:
        setSize in class Entity
      • setScale

        protected final void setScale​(float scale)