Class EntitySheep

All Implemented Interfaces:
IAnimals

public class EntitySheep extends EntityAnimal
  • Field Details

    • fleeceColorTable

      public static final float[][] fleeceColorTable
      Holds the RGB table of the sheep colors - in OpenGL glColor3f values - used to render the sheep colored fleece.
  • Constructor Details

    • EntitySheep

      public EntitySheep(World par1World)
  • Method Details

    • 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 EntityAnimal
    • applyEntityAttributes

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

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

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

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

      protected String getLivingSound()
      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
    • getFleeceColor

      public int getFleeceColor()
    • setFleeceColor

      public void setFleeceColor(int par1)
    • getSheared

      public boolean getSheared()
      returns true if a sheeps wool has been sheared
    • setSheared

      public void setSheared(boolean par1)
      make a sheep sheared if set to true
    • getRandomFleeceColor

      public static int getRandomFleeceColor(Random par0Random)
      This method is called when a sheep spawns in the world to select the color of sheep fleece.
    • func_90015_b

      public EntitySheep func_90015_b(EntityAgeable par1EntityAgeable)
    • eatGrassBonus

      public void eatGrassBonus()
      This function applies the benefits of growing back wool and faster growing up to the acting entity. (This function is used in the AIEatGrass)
      Overrides:
      eatGrassBonus in class EntityLiving
    • 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 bKilledByPlayer, int iLootingModifier)
      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
    • 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
    • getDropItemId

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

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

      protected void modSpecificOnLivingUpdate()
      Overrides:
      modSpecificOnLivingUpdate in class EntityAnimal
    • fall

      protected void fall(float par1)
      Description copied from class: EntityLivingBase
      Called when the mob is falling. Calculates and applies fall damage.
      Overrides:
      fall in class EntityLivingBase
    • 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
    • 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
    • isValidZombieSecondaryTarget

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

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

      public EntityAgeable createChild(EntityAgeable parent)
      Specified by:
      createChild in class EntityAgeable
    • isSubjectToHunger

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

      public int getFoodValueMultiplier()
      Overrides:
      getFoodValueMultiplier in class EntityAnimal
    • onBecomeFamished

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

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

      public void onDeath(DamageSource damageSource)
      Description copied from class: EntityLivingBase
      Called when the mob's health reaches 0.
      Overrides:
      onDeath in class EntityAnimal
    • getOriginalFleeceColor

      public int getOriginalFleeceColor()
    • setOriginalFleeceColor

      public void setOriginalFleeceColor(int originalColor)
    • setSuperficialFleeceColor

      public void setSuperficialFleeceColor(int par1)
    • spawnHardcoreBaby

      public EntitySheep spawnHardcoreBaby(EntityAgeable parentAnimal)
    • blendParentColors

      public int blendParentColors(EntitySheep papa, EntitySheep mama)
    • getMutantColor

      public int getMutantColor(EntitySheep papa, EntitySheep mama)
    • isTooHungryToProduceWool

      protected boolean isTooHungryToProduceWool()
    • handleHealthUpdate

      @Environment(CLIENT) public void handleHealthUpdate(byte bUpdateType)
      Overrides:
      handleHealthUpdate in class EntityAnimal
    • func_70894_j

      @Environment(CLIENT) public float func_70894_j(float fPartialTick)
    • func_70890_k

      @Environment(CLIENT) public float func_70890_k(float fPartialTick)
    • onBlockDispenserConsume

      public boolean onBlockDispenserConsume(BlockDispenserBlock blockDispenser, BlockDispenserTileEntity tileEntity)
      Description copied from class: Entity
      Called when block dispenser tries to eat this entity, return true if the Dispenser should stop looking for more stuff to consume
      Overrides:
      onBlockDispenserConsume in class Entity