Class EntityCow

All Implemented Interfaces:
IAnimals
Direct Known Subclasses:
EntityMooshroom

public class EntityCow extends KickingAnimal
  • Field Details

    • GOT_MILK_DATA_WATCHER_ID

      protected static final int GOT_MILK_DATA_WATCHER_ID
      See Also:
  • Constructor Details

    • EntityCow

      public EntityCow(World par1World)
  • Method Details

    • applyEntityAttributes

      protected void applyEntityAttributes()
      Overrides:
      applyEntityAttributes in class EntityLiving
    • getLivingSound

      protected String getLivingSound()
      Description copied from class: EntityLiving
      Returns the sound this mob makes while it's alive.
      Overrides:
      getLivingSound in class EntityLiving
    • getHurtSound

      protected String getHurtSound()
      Returns the sound this mob makes when it is hurt.
      Overrides:
      getHurtSound in class EntityLivingBase
    • getDeathSound

      protected String getDeathSound()
      Returns the sound this mob makes on death.
      Overrides:
      getDeathSound in class EntityLivingBase
    • playStepSound

      protected void playStepSound(int par1, int par2, int par3, int par4)
      Plays step sound at given x, y, z for the entity
      Overrides:
      playStepSound in class Entity
    • getSoundVolume

      protected float getSoundVolume()
      Returns the volume for the sounds this mob makes.
      Overrides:
      getSoundVolume in class EntityLivingBase
    • getDropItemId

      protected int getDropItemId()
      Returns the item ID for the item the mob drops on death.
      Overrides:
      getDropItemId in class EntityLiving
    • createChild

      public EntityAgeable createChild(EntityAgeable par1EntityAgeable)
      Specified by:
      createChild in class EntityAgeable
    • entityInit

      protected void entityInit()
      Overrides:
      entityInit in class EntityAnimal
    • writeEntityToNBT

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

      public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
      Description copied from class: EntityAgeable
      (abstract) Protected helper method to read subclass entity data from NBT.
      Overrides:
      readEntityFromNBT in class EntityAnimal
    • isAIEnabled

      public boolean isAIEnabled()
      Description copied from class: EntityLiving
      Returns true if the newer Entity AI code should be run
      Overrides:
      isAIEnabled in class EntityLiving
    • dropFewItems

      protected void dropFewItems(boolean killedByPlayer, int lootingModifier)
      Description copied from class: EntityLiving
      Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param par2 - Level of Looting used to kill this mob.
      Overrides:
      dropFewItems in class EntityLiving
    • onLivingUpdate

      public void onLivingUpdate()
      Description copied from class: EntityAnimal
      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 KickingAnimal
    • moveEntityByPiston

      public void moveEntityByPiston(double dMoveX, double dMoveY, double dMoveZ, int direction, int blockID, int meta)
      Description copied from class: Entity
      Called when an entity is pushed/pulled by a piston
      Overrides:
      moveEntityByPiston in class Entity
    • squirtMilk

      protected void squirtMilk()
    • isBreedingItem

      public boolean isBreedingItem(ItemStack stack)
      Description copied from class: EntityAnimal
      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)
      Overrides:
      isBreedingItem in class EntityAnimal
    • interact

      public boolean interact(EntityPlayer player)
      Description copied from class: EntityAgeable
      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 EntityAnimal
    • onGrazeBlock

      public void onGrazeBlock(int i, int j, int k)
      Overrides:
      onGrazeBlock in class EntityAnimal
    • isSubjectToHunger

      public boolean isSubjectToHunger()
      Overrides:
      isSubjectToHunger in class EntityAnimal
    • onBecomeFamished

      public void onBecomeFamished()
      Overrides:
      onBecomeFamished in class EntityAnimal
    • canGrazeMycelium

      public boolean canGrazeMycelium()
      Overrides:
      canGrazeMycelium in class EntityAnimal
    • getMountedYOffset

      public double getMountedYOffset()
      Description copied from class: Entity
      Returns the Y offset from the entity's position for any entity riding this one.
      Overrides:
      getMountedYOffset in class Entity
    • getCanCreatureTypeBePossessed

      public boolean getCanCreatureTypeBePossessed()
      Overrides:
      getCanCreatureTypeBePossessed in class EntityCreature
    • giveBirthAtTargetLocation

      protected void giveBirthAtTargetLocation(EntityAnimal targetMate, double dChildX, double dChildY, double dChildZ)
      Overrides:
      giveBirthAtTargetLocation in class EntityAnimal
    • onSpawnWithEgg

      public EntityLivingData onSpawnWithEgg(EntityLivingData data)
      Overrides:
      onSpawnWithEgg in class EntityAnimal
    • isValidZombieSecondaryTarget

      public boolean isValidZombieSecondaryTarget(EntityZombie zombie)
      Overrides:
      isValidZombieSecondaryTarget in class Entity
    • spawnBabyAnimal

      public EntityCow spawnBabyAnimal(EntityAgeable parent)
    • updateHungerState

      public void updateHungerState()
      Overrides:
      updateHungerState in class EntityAnimal
    • knockbackMagnitude

      public float knockbackMagnitude()
      Overrides:
      knockbackMagnitude in class EntityLivingBase
    • checkForGrazeSideEffects

      public void checkForGrazeSideEffects(int i, int j, int k)
    • convertToMooshroom

      public void convertToMooshroom()
    • gotMilk

      public boolean gotMilk()
    • setGotMilk

      protected void setGotMilk(boolean bGotMilk)
    • stillBirth

      protected void stillBirth(EntityAnimal targetMate, double dChildX, double dChildY, double dChildZ)