Class EntityAnimal

    • Field Detail

      • spawnableBlock

        protected Block spawnableBlock
    • Constructor Detail

      • EntityAnimal

        public EntityAnimal​(World worldIn)
    • Method Detail

      • 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 EntityAgeable
      • getCanSpawnHere

        public boolean getCanSpawnHere()
        + Checks if the entity's current position is a valid location to spawn this entity.
        Overrides:
        getCanSpawnHere in class EntityCreature
      • getTalkInterval

        public int getTalkInterval()
        + Get number of ticks, at least during which the living entity will be silent.
        Overrides:
        getTalkInterval in class EntityLiving
      • canDespawn

        protected boolean canDespawn()
        + Determines if an entity can be despawned, used on idle far away entities
        Overrides:
        canDespawn in class EntityLiving
      • isBreedingItem

        public boolean isBreedingItem​(ItemStack stack)
        + Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)
      • interact

        public boolean interact​(EntityPlayer entityplayer)
        + 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 EntityAgeable
      • consumeItemFromStack

        protected void consumeItemFromStack​(EntityPlayer player,
                                            ItemStack stack)
        + Decreases ItemStack size by one
      • setInLove

        public void setInLove​(EntityPlayer player)
      • isInLove

        public boolean isInLove()
        + Returns if the entity is currently in 'love mode'.
      • resetInLove

        public void resetInLove()
      • canMateWith

        public boolean canMateWith​(EntityAnimal otherAnimal)
        + Returns true if the mob is currently able to mate with the specified mob.