Class EntityBat

All Implemented Interfaces:
IAnimals

public class EntityBat extends EntityAmbientCreature
  • Constructor Details

    • EntityBat

      public EntityBat(World par1World)
  • Method Details

    • entityInit

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

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

      protected float getSoundPitch()
      Gets the pitch of living sounds in living entities.
      Overrides:
      getSoundPitch in class EntityLivingBase
    • 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
    • canBePushed

      public boolean canBePushed()
      Returns true if this entity should push and be pushed by other entities when colliding.
      Overrides:
      canBePushed in class EntityLivingBase
    • collideWithEntity

      protected void collideWithEntity(Entity par1Entity)
      Overrides:
      collideWithEntity in class EntityLivingBase
    • collideWithNearbyEntities

      protected void collideWithNearbyEntities()
      Overrides:
      collideWithNearbyEntities in class EntityLivingBase
    • applyEntityAttributes

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

      public boolean getIsBatHanging()
    • setIsBatHanging

      public void setIsBatHanging(boolean par1)
    • isAIEnabled

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

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

      protected void updateAITasks()
      Overrides:
      updateAITasks in class EntityLiving
    • canTriggerWalking

      protected boolean canTriggerWalking()
      returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to prevent them from trampling crops
      Overrides:
      canTriggerWalking in class Entity
    • fall

      protected void fall(float par1)
      Called when the mob is falling. Calculates and applies fall damage.
      Overrides:
      fall in class EntityLivingBase
    • updateFallState

      protected void updateFallState(double par1, boolean par3)
      Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround
      Overrides:
      updateFallState in class EntityLivingBase
    • doesEntityNotTriggerPressurePlate

      public boolean doesEntityNotTriggerPressurePlate()
      Return whether this entity should NOT trigger a pressure plate or a tripwire.
      Overrides:
      doesEntityNotTriggerPressurePlate in class Entity
    • attackEntityFrom

      public boolean attackEntityFrom(DamageSource par1DamageSource, float par2)
      Called when the entity is attacked.
      Overrides:
      attackEntityFrom in class EntityLivingBase
    • readEntityFromNBT

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

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

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

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

      protected void dropFewItems(boolean playerKilled, int fortuneLevel)
      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
    • attractsLightning

      public boolean attractsLightning()
      Overrides:
      attractsLightning in class EntityLiving