Class EntitySlime

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

public class EntitySlime extends EntityLiving implements IMob
  • Field Details

    • squishAmount

      public float squishAmount
    • squishFactor

      public float squishFactor
    • prevSquishFactor

      public float prevSquishFactor
  • Constructor Details

    • EntitySlime

      public EntitySlime(World par1World)
  • Method Details

    • entityInit

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

      public int getSlimeSize()
      Returns the size of the slime.
    • writeEntityToNBT

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

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

      protected String getSlimeParticle()
      Returns the name of a particle effect that may be randomly created by EntitySlime.onUpdate()
    • getJumpSound

      protected String getJumpSound()
      Returns the name of the sound played when the slime jumps.
    • onUpdate

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

      protected void alterSquishAmount()
    • getJumpDelay

      protected int getJumpDelay()
      Gets the amount of time the slime needs to wait between jumps.
    • createInstance

      protected EntitySlime createInstance()
    • setDead

      public void setDead()
      Will get destroyed next tick.
      Overrides:
      setDead in class Entity
    • getAttackStrength

      protected int getAttackStrength()
      Gets the amount of damage dealt to the player when "attacked" by the slime.
    • 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
    • getDropItemId

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

      protected boolean isValidLightLevel()
      // +++START EDIT+++ Checks to make sure the light is not too bright where the mob is spawning
    • getVerticalFaceSpeed

      public int getVerticalFaceSpeed()
      The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently use in wolves.
      Overrides:
      getVerticalFaceSpeed in class EntityLiving
    • makesSoundOnJump

      protected boolean makesSoundOnJump()
      Returns true if the slime makes a sound when it jumps (based upon the slime's size)
    • setSlimeSize

      protected void setSlimeSize(int iSize)
    • makesSoundOnLand

      protected boolean makesSoundOnLand()
    • updateEntityActionState

      protected void updateEntityActionState()
      Overrides:
      updateEntityActionState in class EntityLiving
    • minDistFromPlayerForDespawn

      protected double minDistFromPlayerForDespawn()
      Overrides:
      minDistFromPlayerForDespawn in class EntityLiving
    • onCollideWithPlayer

      public void onCollideWithPlayer(EntityPlayer player)
      Description copied from class: Entity
      Called by a player entity when they collide with an entity
      Overrides:
      onCollideWithPlayer in class Entity
    • canDamagePlayer

      protected boolean canDamagePlayer()
    • getCanSpawnHere

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

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

      public boolean canBreatheUnderwater()
      Overrides:
      canBreatheUnderwater in class EntityLivingBase
    • checkForScrollDrop

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

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

      public void jump()
      Description copied from class: EntityLivingBase
      Causes this entity to do an upwards motion (jumping).
      Overrides:
      jump in class EntityLivingBase
    • canSwim

      public boolean canSwim()
      Overrides:
      canSwim in class EntityLivingBase
    • getDefaultSlipperinessOnGround

      public float getDefaultSlipperinessOnGround()
      Overrides:
      getDefaultSlipperinessOnGround in class EntityLivingBase
    • getSlipperinessRelativeToBlock

      public float getSlipperinessRelativeToBlock(int iBlockID)
      Overrides:
      getSlipperinessRelativeToBlock in class EntityLivingBase
    • fall

      protected void fall(float fFallDistance)
      Description copied from class: EntityLivingBase
      Called when the mob is falling. Calculates and applies fall damage.
      Overrides:
      fall in class EntityLivingBase
    • getSoundPitch

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