Class EntityCreature

Direct Known Subclasses:
DireWolfEntity, EntityAgeable, EntityGolem, EntityMob, EntityWaterMob

public abstract class EntityCreature extends EntityLiving
  • Field Details

    • field_110179_h

      public static final UUID field_110179_h
    • field_110181_i

      public static final AttributeModifier field_110181_i
    • pathToEntity

      public PathEntity pathToEntity
    • entityToAttack

      public Entity entityToAttack
      The Entity this EntityCreature is set to attack.
    • hasAttacked

      public boolean hasAttacked
      returns true if a creature has attacked recently only used for creepers and skeletons
    • fleeingTick

      public int fleeingTick
      Used to make a creature speed up and wander away when hit.
    • homeDimension

      protected int homeDimension
    • maximumHomeDistance

      protected float maximumHomeDistance
      If -1 there is no maximum distance
    • possessionTimer

      protected int possessionTimer
  • Constructor Details

    • EntityCreature

      public EntityCreature(World par1World)
  • Method Details

    • isMovementCeased

      protected boolean isMovementCeased()
      Disables a mob's ability to move on its own while true.
    • updateEntityActionState

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

      protected void updateWanderPath()
      Time remaining during which the Animal is sped up and flees.
    • 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.
    • 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
    • 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).
    • getCanSpawnHere

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

      public boolean hasPath()
      Returns true if entity has a path to follow
    • setPathToEntity

      public void setPathToEntity(PathEntity par1PathEntity)
      sets the Entities walk path in EntityCreature
    • getEntityToAttack

      public Entity getEntityToAttack()
      Returns current entities target
    • setTarget

      public void setTarget(Entity par1Entity)
      Sets the entity which is to be attacked.
    • entityInit

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

      protected void entityCreatureEntityInit()
    • 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 EntityLiving
    • 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 EntityLiving
    • modSpecificOnLivingUpdate

      protected void modSpecificOnLivingUpdate()
      Overrides:
      modSpecificOnLivingUpdate in class EntityLiving
    • getCanCreatureTypeBePossessed

      public boolean getCanCreatureTypeBePossessed()
    • getCanCreatureBePossessedFromDistance

      public boolean getCanCreatureBePossessedFromDistance(boolean bPersistentSpirit)
    • isPossessed

      public boolean isPossessed()
    • isFullyPossessed

      public boolean isFullyPossessed()
    • setPossessionLevel

      public void setPossessionLevel(int iLevel)
    • getPossessionLevel

      public int getPossessionLevel()
    • getInitialPossessionChance

      public int getInitialPossessionChance()
    • getTimeToFullPossession

      public int getTimeToFullPossession()
    • onInitialPossession

      public void onInitialPossession()
    • onFullPossession

      public void onFullPossession()
    • playFullPossessionSound

      public void playFullPossessionSound()
    • initiatePossession

      public void initiatePossession(PossessionSource<?> possessionSource)
    • handlePossession

      protected void handlePossession()
    • attemptToPossessNearbyCreature

      public boolean attemptToPossessNearbyCreature(double dRange, boolean bPersistentSpirit, PossessionSource<?> possessionSource)
    • attemptToPossessCreaturesAroundBlock

      public static int attemptToPossessCreaturesAroundBlock(World world, int i, int j, int k, int iPossessionCount, int iCubicRange, PossessionSource<?> possessionSource)
    • attemptToPossessNearbyCreatureOnDeath

      protected void attemptToPossessNearbyCreatureOnDeath()
    • onDeath

      public void onDeath(DamageSource source)
      Description copied from class: EntityLivingBase
      Called when the mob's health reaches 0.
      Overrides:
      onDeath in class EntityLivingBase
    • shouldContinueAttacking

      protected boolean shouldContinueAttacking(float fDistanceToTarget)
    • func_110173_bK

      public boolean func_110173_bK()
    • func_110176_b

      public boolean func_110176_b(int par1, int par2, int par3)
    • setHomeArea

      public void setHomeArea(int par1, int par2, int par3, int par4)
    • setHomeArea

      public void setHomeArea(int par1, int par2, int par3, int par4, int dimension)
    • getHomePosition

      public ChunkCoordinates getHomePosition()
      Returns the chunk coordinate object of the home position.
    • func_110174_bM

      public float func_110174_bM()
    • detachHome

      public void detachHome()
    • hasHome

      public boolean hasHome()
      Returns whether a home area is defined for this entity.
    • func_110159_bB

      protected void func_110159_bB()
      Overrides:
      func_110159_bB in class EntityLiving
    • func_142017_o

      protected void func_142017_o(float par1)
    • transmitAttackTargetToClients

      protected void transmitAttackTargetToClients()
    • canSoulAffectEntity

      public boolean canSoulAffectEntity(UrnEntity soulEntity)