Class EntitySpider

All Implemented Interfaces:
IAnimals, IMob
Direct Known Subclasses:
BTWCaveSpiderEntity, EntityCaveSpider, JungleSpiderEntity

public class EntitySpider extends EntityMob
  • Field Details

    • timeToNextWeb

      protected int timeToNextWeb
  • Constructor Details

    • EntitySpider

      public EntitySpider(World par1World)
  • Method Details

    • entityInit

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

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

      protected void applyEntityAttributes()
      Overrides:
      applyEntityAttributes 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
    • isOnLadder

      public boolean isOnLadder()
      returns true if this entity is by a ladder, false otherwise
      Overrides:
      isOnLadder in class EntityLivingBase
    • setInWeb

      public void setInWeb()
      Sets the Entity inside a web block.
      Overrides:
      setInWeb in class Entity
    • getCreatureAttribute

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

      public boolean isBesideClimbableBlock()
      Returns true if the WatchableObject (Byte) is 0x01 otherwise returns false. The WatchableObject is updated using setBesideClimableBlock.
    • setBesideClimbableBlock

      public void setBesideClimbableBlock(boolean par1)
      Updates the WatchableObject (Byte) created in entityInit(), setting it to 0x01 if par1 is true or 0x00 if it is false.
    • onSpawnWithEgg

      public EntityLivingData onSpawnWithEgg(EntityLivingData par1EntityLivingData)
      Overrides:
      onSpawnWithEgg in class EntityLiving
    • writeEntityToNBT

      public void writeEntityToNBT(NBTTagCompound tag)
      Description copied from class: EntityLiving
      // +++START EDIT+++ // ---END EDIT--- (abstract) Protected helper method to write subclass entity data to NBT.
      Overrides:
      writeEntityToNBT in class EntityCreature
    • readEntityFromNBT

      public void readEntityFromNBT(NBTTagCompound tag)
      Description copied from class: EntityLiving
      (abstract) Protected helper method to read subclass entity data from NBT.
      Overrides:
      readEntityFromNBT in class EntityCreature
    • spawnerInitCreature

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

      protected Entity findPlayerToAttack()
      Description copied from class: EntityMob
      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
    • setRevengeTarget

      public void setRevengeTarget(EntityLivingBase target)
      Overrides:
      setRevengeTarget in class EntityLivingBase
    • shouldContinueAttacking

      protected boolean shouldContinueAttacking(float fDistanceToTarget)
      Overrides:
      shouldContinueAttacking in class EntityCreature
    • attackEntity

      protected void attackEntity(Entity targetEntity, 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
    • dropFewItems

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

      public boolean isPotionApplicable(PotionEffect par1PotionEffect)
      Overrides:
      isPotionApplicable 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
    • checkForScrollDrop

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

      public boolean isAffectedByMovementModifiers()
      Overrides:
      isAffectedByMovementModifiers in class Entity
    • dropsSpiderEyes

      protected boolean dropsSpiderEyes()
    • hasWeb

      public boolean hasWeb()
    • isEntityInWeb

      public boolean isEntityInWeb(Entity targetEntity)
    • doesLightAffectAggessiveness

      public boolean doesLightAffectAggessiveness()
    • isAlwaysNeutral

      public boolean isAlwaysNeutral()
    • doEyesGlow

      public boolean doEyesGlow()
    • checkForSpiderSkeletonMounting

      protected void checkForSpiderSkeletonMounting()