Class EntityPigZombie

All Implemented Interfaces:
IAnimals, IMob

public class EntityPigZombie extends EntityZombie
  • Constructor Details

    • EntityPigZombie

      public EntityPigZombie(World par1World)
  • Method Details

    • isAIEnabled

      protected boolean isAIEnabled()
      Returns true if the newer Entity AI code should be run
      Overrides:
      isAIEnabled in class EntityZombie
    • applyEntityAttributes

      protected void applyEntityAttributes()
      Overrides:
      applyEntityAttributes in class EntityZombie
    • onUpdate

      public void onUpdate()
      Called to update the entity's position/logic.
      Overrides:
      onUpdate in class EntityZombie
    • getCanSpawnHere

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

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

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

      protected Entity findPlayerToAttack()
      Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking (Animals, Spiders at day, peaceful PigZombies).
      Overrides:
      findPlayerToAttack in class EntityMob
    • becomeAngryAt

      protected void becomeAngryAt(Entity par1Entity)
      Causes this PigZombie to become angry at the supplied Entity (which will be a player).
    • getLivingSound

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

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

      protected String getDeathSound()
      Returns the sound this mob makes on death.
      Overrides:
      getDeathSound in class EntityZombie
    • 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 EntityZombie
    • getDropItemId

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

      public EntityLivingData onSpawnWithEgg(EntityLivingData par1EntityLivingData)
      Overrides:
      onSpawnWithEgg in class EntityZombie
    • attackEntityFrom

      public boolean attackEntityFrom(DamageSource source, float iDamage)
      Description copied from class: EntityMob
      Called when the entity is attacked.
      Overrides:
      attackEntityFrom in class EntityZombie
    • checkForScrollDrop

      public void checkForScrollDrop()
      Overrides:
      checkForScrollDrop in class EntityZombie
    • dropHead

      protected void dropHead()
      Overrides:
      dropHead in class EntityZombie
    • addRandomArmor

      protected void addRandomArmor()
      Description copied from class: EntityLiving
      Makes entity wear random armor based on difficulty
      Overrides:
      addRandomArmor in class EntityZombie
    • getArmorItemForSlot

      public Item getArmorItemForSlot(int slot, int rarity)
      Overrides:
      getArmorItemForSlot in class EntityLiving
    • dropFewItems

      protected void dropFewItems(boolean bKilledByPlayer, int iFortuneModifier)
      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
    • becomeAngryWhenPigAttacked

      public void becomeAngryWhenPigAttacked(Entity attackingEntity)
    • angerNearbyPigmen

      protected void angerNearbyPigmen(Entity target)
    • shouldBeAngeredByDamage

      protected boolean shouldBeAngeredByDamage(DamageSource source)