Class EntityZombie

All Implemented Interfaces:
IAnimals, IMob
Direct Known Subclasses:
EntityPigZombie

public class EntityZombie extends EntityMob
  • Field Details

    • villagerClass

      public int villagerClass
  • Constructor Details

    • EntityZombie

      public EntityZombie(World par1World)
  • Method Details

    • applyEntityAttributes

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

      protected void entityInit()
      Overrides:
      entityInit in class EntityCreature
    • getTotalArmorValue

      public int getTotalArmorValue()
      Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
      Overrides:
      getTotalArmorValue in class EntityLivingBase
    • isAIEnabled

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

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

      public void setChild(boolean par1)
      Set whether this zombie is a child.
    • isVillager

      public boolean isVillager()
      Return whether this zombie is a villager.
    • setVillager

      public void setVillager(boolean par1)
      Set whether this zombie is a villager.
    • onUpdate

      public void onUpdate()
      Called to update the entity's position/logic.
      Overrides:
      onUpdate in class EntityMob
    • 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
    • getDropItemId

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

      public EnumCreatureAttribute getCreatureAttribute()
      Get this Entity's EnumCreatureAttribute
      Overrides:
      getCreatureAttribute in class EntityLivingBase
    • writeEntityToNBT

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

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

      protected void startConversion(int par1)
      Starts converting this zombie into a villager. The zombie converts into a villager after the specified time in ticks.
    • canDespawn

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

      public boolean isConverting()
      Returns whether this zombie is in the process of converting to a villager
    • getSpeedModifier

      public float getSpeedModifier()
      Overrides:
      getSpeedModifier in class EntityLivingBase
    • onLivingUpdate

      public void onLivingUpdate()
      Description copied from class: EntityMob
      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 EntityMob
    • attackEntityAsMob

      public boolean attackEntityAsMob(Entity attackedEntity)
      Overrides:
      attackEntityAsMob in class EntityLiving
    • addRandomArmor

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

      public void onKillEntity(EntityLivingBase entityKilled)
      Description copied from class: Entity
      This method gets called when the entity kills another one.
      Overrides:
      onKillEntity in class Entity
    • onSpawnWithEgg

      public EntityLivingData onSpawnWithEgg(EntityLivingData data)
      Overrides:
      onSpawnWithEgg in class EntityLiving
    • interact

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

      protected void convertToVillager()
    • modSpecificOnLivingUpdate

      protected void modSpecificOnLivingUpdate()
      Overrides:
      modSpecificOnLivingUpdate in class EntityCreature
    • checkLostFromHome

      public void checkLostFromHome()
    • checkForScrollDrop

      public void checkForScrollDrop()
      Overrides:
      checkForScrollDrop in class EntityLivingBase
    • attackEntity

      protected void attackEntity(Entity attackedEntity, float fDistanceToTarget)
      Description copied from class: EntityMob
      Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
      Overrides:
      attackEntity in class EntityMob
    • attackEntityFrom

      public boolean attackEntityFrom(DamageSource par1DamageSource, float par2)
      Description copied from class: EntityMob
      Called when the entity is attacked.
      Overrides:
      attackEntityFrom in class EntityMob
    • dropHead

      protected void dropHead()
      Overrides:
      dropHead in class EntityLivingBase
    • spawnerInitCreature

      public void spawnerInitCreature()
      Overrides:
      spawnerInitCreature in class EntityLiving
    • getSoundPitch

      protected float getSoundPitch()
      Description copied from class: EntityLivingBase
      Gets the pitch of living sounds in living entities.
      Overrides:
      getSoundPitch in class EntityLivingBase
    • getCanBeHeadCrabbed

      public boolean getCanBeHeadCrabbed(boolean bSquidInWater)
      Overrides:
      getCanBeHeadCrabbed in class Entity
    • onHeadCrabbedBySquid

      public void onHeadCrabbedBySquid(BTWSquidEntity squid)
      Overrides:
      onHeadCrabbedBySquid in class EntityLiving
    • 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
    • isWeightedByHeadCrab

      protected boolean isWeightedByHeadCrab()
      Overrides:
      isWeightedByHeadCrab in class EntityLivingBase
    • getHeadCrabSharedAttackTarget

      public Entity getHeadCrabSharedAttackTarget()
      Overrides:
      getHeadCrabSharedAttackTarget in class Entity
    • isImmuneToHeadCrabDamage

      public boolean isImmuneToHeadCrabDamage()
      Overrides:
      isImmuneToHeadCrabDamage in class Entity
    • attemptToStartCure

      public boolean attemptToStartCure()
    • canSoulAffectEntity

      public boolean canSoulAffectEntity(UrnEntity soulEntity)
      Overrides:
      canSoulAffectEntity in class EntityCreature
    • handleHealthUpdate

      @Environment(CLIENT) public void handleHealthUpdate(byte var1)
      Overrides:
      handleHealthUpdate in class EntityLivingBase