Class EntityCreeper

All Implemented Interfaces:
EntityWithCustomPacket, IAnimals, IMob

public class EntityCreeper extends EntityMob implements EntityWithCustomPacket
  • Constructor Details

    • EntityCreeper

      public EntityCreeper(World par1World)
  • Method Details

    • applyEntityAttributes

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

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

      public int getMaxSafePointTries()
      The number of iterations PathFinder.getSafePoint will execute before giving up.
      Overrides:
      getMaxSafePointTries in class EntityLiving
    • entityInit

      protected void entityInit()
      Overrides:
      entityInit in class EntityCreature
    • 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
    • onUpdate

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

      public void onDeath(DamageSource par1DamageSource)
      Called when the mob's health reaches 0.
      Overrides:
      onDeath in class EntityCreature
    • attackEntityAsMob

      public boolean attackEntityAsMob(Entity par1Entity)
      Overrides:
      attackEntityAsMob in class EntityLiving
    • getPowered

      public boolean getPowered()
      Returns true if the creeper is powered by a lightning bolt.
    • getCreeperFlashIntensity

      public float getCreeperFlashIntensity(float par1)
      Params: (Float)Render tick. Returns the intensity of the creeper's flash when it is ignited.
    • getDropItemId

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

      public int getCreeperState()
      Returns the current state of creeper, -1 is idle, 1 is 'in fuse'
    • setCreeperState

      public void setCreeperState(int par1)
      Sets the state of creeper, -1 to idle and 1 to be 'in fuse'
    • 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
    • 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
    • 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
    • getTalkInterval

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

      public void playLivingSound()
      Description copied from class: EntityLiving
      Plays living's sound at its position
      Overrides:
      playLivingSound 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
    • onKickedByAnimal

      public void onKickedByAnimal(KickingAnimal kickingAnimal)
      Overrides:
      onKickedByAnimal in class Entity
    • checkForScrollDrop

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

      public void onStruckByLightning(EntityLightningBolt entityBolt)
      Description copied from class: Entity
      Called when a lightning bolt hits the entity.
      Overrides:
      onStruckByLightning in class Entity
    • getIsDeterminedToExplode

      public boolean getIsDeterminedToExplode()
    • getNeuteredState

      public int getNeuteredState()
    • setNeuteredState

      public void setNeuteredState(int iNeuteredState)
    • getSpawnPacketForThisEntity

      public Packet getSpawnPacketForThisEntity()
      Specified by:
      getSpawnPacketForThisEntity in interface EntityWithCustomPacket
      Returns:
      Custom packet containing information for this entity to send from the server to the client
    • getTrackerViewDistance

      public int getTrackerViewDistance()
      Specified by:
      getTrackerViewDistance in interface EntityWithCustomPacket
    • getTrackerUpdateFrequency

      public int getTrackerUpdateFrequency()
      Specified by:
      getTrackerUpdateFrequency in interface EntityWithCustomPacket
    • getTrackMotion

      public boolean getTrackMotion()
      Specified by:
      getTrackMotion in interface EntityWithCustomPacket
    • shouldServerTreatAsOversized

      public boolean shouldServerTreatAsOversized()
      Description copied from interface: EntityWithCustomPacket
      Partially disables server-side visibility tests for interacting with an entity
      Specified by:
      shouldServerTreatAsOversized in interface EntityWithCustomPacket
    • setTimeSinceIgnited

      public void setTimeSinceIgnited(int timeSinceIgnited)