Class EntitySilverfish

All Implemented Interfaces:
IAnimals, IMob

public class EntitySilverfish extends EntityMob
  • Constructor Details

    • EntitySilverfish

      public EntitySilverfish(World par1World)
  • Method Details

    • applyEntityAttributes

      protected void applyEntityAttributes()
      Overrides:
      applyEntityAttributes in class EntityMob
    • 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
    • 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
    • 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
    • attackEntityFrom

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

      protected void attackEntity(Entity par1Entity, float par2)
      Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
      Overrides:
      attackEntity in class EntityMob
    • 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
    • onUpdate

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

      protected void updateEntityActionState()
      Overrides:
      updateEntityActionState in class EntityCreature
    • getBlockPathWeight

      public float getBlockPathWeight(int par1, int par2, int par3)
      Takes a coordinate in and returns a weight to determine how likely this creature will try to path to the block. Args: x, y, z
      Overrides:
      getBlockPathWeight in class EntityMob
    • isValidLightLevel

      protected boolean isValidLightLevel()
      Checks to make sure the light is not too bright where the mob is spawning
      Overrides:
      isValidLightLevel in class EntityMob
    • getCanSpawnHere

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

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

      public void checkForScrollDrop()
      Overrides:
      checkForScrollDrop in class EntityLivingBase