Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.src
Class EntityLiving

    java.lang.Object
      net.minecraft.src.Entity
          net.minecraft.src.EntityLiving

Direct Known Subclasses:
  EntityCreature, EntityDragonBase, EntityFlying, EntityPlayer, EntitySlime

    public abstract class EntityLiving

extends Entity

Field Summary
`int` | `arrowHitTempCounter` Set to 60 when hit by the player or the player's wolf, then decrements.
`int` | `arrowHitTimer`
`float` | `attackedAtYaw` The yaw at which this entity was last attacked from.
`int` | `attackTime`
`float` | `cameraPitch`
`int` | `carryoverDamage` in each step in the damage calculations, this is set to the 'carryover' that would result if someone was damaged .25 hearts (for example), and added to the damage in the next step
`int` | `deathTime` The amount of time remaining this entity should act 'dead', i.e.
`float` | `field_70730_aX`
`int` | `field_70731_aW`
`float` | `field_70769_ao`
`float` | `field_70770_ap`
`int` | `hurtTime` The amount of time remaining this entity should act 'hurt'.
`boolean` | `isJumping` used to check whether entity is jumping.
`float` | `jumpMovementFactor` A factor used to determine how far this entity will move each tick if it is jumping or falling.
`float` | `landMovementFactor` A factor used to determine how far this entity will move each tick if it is walking on land.
`float` | `legSwing` Only relevant when legYaw is not 0(the entity is moving).
`float` | `legYaw`
`int` | `maxHurtResistantTime`
`int` | `maxHurtTime` What the hurt time was max set to last.
`float` | `prevCameraPitch`
`int` | `prevHealth`
`float` | `prevLegYaw`
`float` | `prevRenderYawOffset`
`float` | `prevRotationYawHead` Entity head rotation yaw at previous tick
`float` | `prevSwingProgress`
`float` | `renderYawOffset`
`float` | `rotationYawHead` Entity head rotation yaw
`float` | `swingProgress`
`EntityAITasks` | `tasks`

Fields inherited from class net.minecraft.src.Entity
`addedToChunk, boundingBox, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, cloakUrl, distanceWalkedModified, entityCollisionReduction, entityId, fallDistance, field_70135_K, fireResistance, height, hurtResistantTime, ignoreFrustumCheck, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, noClip, onGround, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, skinUrl, stepHeight, ticksExisted, velocityChanged, width, worldObj, yOffset, ySize`

Constructor Summary
`EntityLiving(World par1World)`

Method Summary
`void` | `addPotionEffect(PotionEffect par1PotionEffect)` adds a PotionEffect to the entity
`boolean` | `attackEntityAsMob(Entity par1Entity)`
`boolean` | `attackEntityFrom(DamageSource par1DamageSource, int par2)` Called when the entity is attacked.
`boolean` | `canBeCollidedWith()` Returns true if other Entities should be prevented from moving through this Entity.
`boolean` | `canBePushed()` Returns true if this entity should push and be pushed by other entities when colliding.
`boolean` | `canBreatheUnderwater()`
`boolean` | `canEntityBeSeen(Entity par1Entity)` returns true if the entity provided in the argument can be seen.
`void` | `clearActivePotions()`
`void` | `curePotionEffects(ItemStack curativeItem)` Removes all potion effects that have curativeItem as a curative item for its effect
`void` | `detachHome()`
`void` | `eatGrassBonus()` This function applies the benefits of growing back wool and faster growing up to the acting entity.
`void` | `faceEntity(Entity par1Entity, float par2, float par3)` Changes pitch and yaw so that the entity calling the function is facing the entity provided as an argument.
`float` | `func_70079_am()`
`PotionEffect` | `getActivePotionEffect(Potion par1Potion)` returns the PotionEffect for the supplied Potion if it is active, null otherwise.
`Collection` | `getActivePotionEffects()`
`int` | `getAge()`
`float` | `getAIMoveSpeed()` the movespeed used for the new AI system
`EntityLiving` | `getAITarget()`
`EntityLiving` | `getAttackTarget()` Gets the active target the Task system uses for tracking
`boolean` | `getCanSpawnHere()` Checks if the entity's current position is a valid location to spawn this entity.
`EnumCreatureAttribute` | `getCreatureAttribute()` Get this Entity's EnumCreatureAttribute
`EntitySenses` | `getEntitySenses()` returns the EntitySenses Object for the EntityLiving
`float` | `getEyeHeight()`
`int` | `getHealth()`
`ItemStack` | `getHeldItem()`
`ChunkCoordinates` | `getHomePosition()`
`int` | `getItemIcon(ItemStack par1ItemStack, int par2)`
`EntityJumpHelper` | `getJumpHelper()`
`EntityLiving` | `getLastAttackingEntity()`
`Vec3` | `getLook(float par1)` interpolated look vector
`EntityLookHelper` | `getLookHelper()`
`Vec3` | `getLookVec()` returns a (normalized) vector of where this entity is looking
`abstract int` | `getMaxHealth()`
`float` | `getMaximumHomeDistance()`
`int` | `getMaxSpawnedInChunk()` Will return how many at most can spawn in a chunk at once.
`EntityMoveHelper` | `getMoveHelper()`
`PathNavigate` | `getNavigator()`
`Vec3` | `getPosition(float par1)`
`float` | `getRenderSizeModifier()`
`Random` | `getRNG()`
`float` | `getSwingProgress(float par1)`
`int` | `getTalkInterval()` Get number of ticks, at least during which the living entity will be silent.
`String` | `getTexture()`
`int` | `getTotalArmorValue()` Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
`int` | `getVerticalFaceSpeed()` The speed it takes to move the entityliving's rotationPitch through the faceEntity method.
`void` | `handleHealthUpdate(byte par1)`
`boolean` | `hasHome()`
`void` | `heal(int par1)` Heal living entity (param: amount of half-hearts)
`boolean` | `isBlocking()`
`boolean` | `isChild()` If Animal, checks if the age timer is negative
`boolean` | `isEntityAlive()` Checks whether target entity is alive.
`boolean` | `isEntityUndead()` Returns true if this entity is undead.
`boolean` | `isExplosiveMob(Class par1Class)`
`boolean` | `isOnLadder()` returns true if this entity is by a ladder, false otherwise
`boolean` | `isPlayerSleeping()` Returns whether player is sleeping or not
`boolean` | `isPotionActive(Potion par1Potion)`
`boolean` | `isPotionApplicable(PotionEffect par1PotionEffect)`
`boolean` | `isWithinHomeDistance(int par1, int par2, int par3)`
`boolean` | `isWithinHomeDistanceCurrentPosition()` Returns true if entity is within home distance from current position
`void` | `knockBack(Entity par1Entity, int par2, double par3, double par5)` knocks back this entity
`void` | `moveEntityWithHeading(float par1, float par2)` Moves the entity based on the specified heading.
`void` | `onDeath(DamageSource par1DamageSource)` Called when the mob's health reaches 0.
`void` | `onEntityUpdate()` Gets called every tick from main Entity class
`void` | `onLivingUpdate()` Called frequently so the entity can update its state every tick as required.
`void` | `onUpdate()` Called to update the entity's position/logic.
`void` | `performHurtAnimation()`
`void` | `playLivingSound()` Plays living's sound at its position
`MovingObjectPosition` | `rayTrace(double par1, float par3)`
`void` | `readEntityFromNBT(NBTTagCompound par1NBTTagCompound)` (abstract) Protected helper method to read subclass entity data from NBT.
`void` | `removePotionEffect(int par1)` input is the potion id to remove from the current active potion effects
`void` | `renderBrokenItemStack(ItemStack par1ItemStack)` Renders broken item particles using the given ItemStack
`void` | `setAIMoveSpeed(float par1)` set the movespeed used for the new AI system
`void` | `setAttackTarget(EntityLiving par1EntityLiving)` Sets the active target the Task system uses for tracking
`void` | `setEntityHealth(int par1)`
`void` | `setHeadRotationYaw(float par1)`
`void` | `setHomeArea(int par1, int par2, int par3, int par4)`
`void` | `setJumping(boolean par1)`
`void` | `setLastAttackingEntity(Entity par1Entity)`
`void` | `setMoveForward(float par1)`
`void` | `setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9)`
`void` | `setPositionAndUpdate(double par1, double par3, double par5)` Move the entity to the coordinates informed, but keep yaw/pitch values.
`void` | `setRevengeTarget(EntityLiving par1EntityLiving)`
`void` | `spawnExplosionParticle()` Spawns an explosion particle around the Entity's location
`void` | `updateRidden()` Handles updating while being ridden by an entity
`void` | `writeEntityToNBT(NBTTagCompound par1NBTTagCompound)` (abstract) Protected helper method to write subclass entity data to NBT.

Methods inherited from class net.minecraft.src.Entity
`addEntityID, addToPlayerScore, addVelocity, applyEntityCollision, canAttackWithItem, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, func_70062_b, generatePersistentID, getAir, getBoundingBox, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBox, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityData, getEntityName, getLastActiveItems, getMountedYOffset, getParts, getPersistentID, getPickedResult, getShadowSize, getYOffset, handleLavaMovement, handleWaterMovement, hashCode, interact, isBurning, isEating, isEntityEqual, isEntityInsideOpaqueBlock, isImmuneToFire, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInWater, isOffsetPositionInLiquid, isRiding, isSneaking, isSprinting, isWet, mountEntity, moveEntity, moveFlying, onCollideWithPlayer, onKillEntity, onStruckByLightning, readFromNBT, setAir, setAngles, setDead, setEating, setFire, setInPortal, setInWeb, setLocationAndAngles, setPosition, setPositionAndRotation, setSneaking, setSprinting, setVelocity, setWorld, shouldRiderSit, toString, unmountEntity, updateCloak, updateRiderPosition, writeToNBT`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### maxHurtResistantTime

    public int maxHurtResistantTime

### field_70769_ao

    public float field_70769_ao

### field_70770_ap

    public float field_70770_ap

### renderYawOffset

    public float renderYawOffset

### prevRenderYawOffset

    public float prevRenderYawOffset

### rotationYawHead

    public float rotationYawHead

  Entity head rotation yaw

### prevRotationYawHead

    public float prevRotationYawHead

  Entity head rotation yaw at previous tick

### landMovementFactor

    public float landMovementFactor

  A factor used to determine how far this entity will move each tick if it is walking on land. Adjusted by speed, and slipperiness of the current block.

### jumpMovementFactor

    public float jumpMovementFactor

  A factor used to determine how far this entity will move each tick if it is jumping or falling.

### prevSwingProgress

    public float prevSwingProgress

### swingProgress

    public float swingProgress

### prevHealth

    public int prevHealth

### carryoverDamage

    public int carryoverDamage

  in each step in the damage calculations, this is set to the 'carryover' that would result if someone was damaged .25 hearts (for example), and added to the damage in the next step

### hurtTime

    public int hurtTime

  The amount of time remaining this entity should act 'hurt'. (Visual appearance of red tint)

### maxHurtTime

    public int maxHurtTime

  What the hurt time was max set to last.

### attackedAtYaw

    public float attackedAtYaw

  The yaw at which this entity was last attacked from.

### deathTime

    public int deathTime

  The amount of time remaining this entity should act 'dead', i.e. have a corpse in the world.

### attackTime

    public int attackTime

### prevCameraPitch

    public float prevCameraPitch

### cameraPitch

    public float cameraPitch

### field_70731_aW

    public int field_70731_aW

### field_70730_aX

    public float field_70730_aX

### prevLegYaw

    public float prevLegYaw

### legYaw

    public float legYaw

### legSwing

    public float legSwing

  Only relevant when legYaw is not 0(the entity is moving). Influences where in its swing legs and arms currently are.

### arrowHitTempCounter

    public int arrowHitTempCounter

  Set to 60 when hit by the player or the player's wolf, then decrements. Used to determine whether the entity should drop items on death.

### arrowHitTimer

    public int arrowHitTimer

### tasks

    public final EntityAITasks tasks

### isJumping

    public boolean isJumping

  used to check whether entity is jumping.

Constructor Detail

### EntityLiving

    public EntityLiving(World par1World)

Method Detail

### getLookHelper

    public EntityLookHelper getLookHelper()

### getMoveHelper

    public EntityMoveHelper getMoveHelper()

### getJumpHelper

    public EntityJumpHelper getJumpHelper()

### getNavigator

    public PathNavigate getNavigator()

### getEntitySenses

    public EntitySenses getEntitySenses()

  returns the EntitySenses Object for the EntityLiving

### getRNG

    public Random getRNG()

### getAITarget

    public EntityLiving getAITarget()

### getLastAttackingEntity

    public EntityLiving getLastAttackingEntity()

### setLastAttackingEntity

    public void setLastAttackingEntity(Entity par1Entity)

### getAge

    public int getAge()

### func_70079_am

    public float func_70079_am()

  Overrides:
    `func_70079_am` in class `Entity`

### setHeadRotationYaw

    public void setHeadRotationYaw(float par1)

  Overrides:
    `setHeadRotationYaw` in class `Entity`

### getAIMoveSpeed

    public float getAIMoveSpeed()

  the movespeed used for the new AI system

### setAIMoveSpeed

    public void setAIMoveSpeed(float par1)

  set the movespeed used for the new AI system

### attackEntityAsMob

    public boolean attackEntityAsMob(Entity par1Entity)

### getAttackTarget

    public EntityLiving getAttackTarget()

  Gets the active target the Task system uses for tracking

### setAttackTarget

    public void setAttackTarget(EntityLiving par1EntityLiving)

  Sets the active target the Task system uses for tracking

### isExplosiveMob

    public boolean isExplosiveMob(Class par1Class)

### eatGrassBonus

    public void eatGrassBonus()

  This function applies the benefits of growing back wool and faster growing up to the acting entity. (This function is used in the AIEatGrass)

### isWithinHomeDistanceCurrentPosition

    public boolean isWithinHomeDistanceCurrentPosition()

  Returns true if entity is within home distance from current position

### isWithinHomeDistance

    public boolean isWithinHomeDistance(int par1,
                                        int par2,
                                        int par3)

### setHomeArea

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

### getHomePosition

    public ChunkCoordinates getHomePosition()

### getMaximumHomeDistance

    public float getMaximumHomeDistance()

### detachHome

    public void detachHome()

### hasHome

    public boolean hasHome()

### setRevengeTarget

    public void setRevengeTarget(EntityLiving par1EntityLiving)

### canEntityBeSeen

    public boolean canEntityBeSeen(Entity par1Entity)

  returns true if the entity provided in the argument can be seen. (Raytrace)

### getTexture

    public String getTexture()

  Overrides:
    `getTexture` in class `Entity`

### canBeCollidedWith

    public boolean canBeCollidedWith()

  Returns true if other Entities should be prevented from moving through this Entity.

  Overrides:
    `canBeCollidedWith` in class `Entity`

### canBePushed

    public boolean canBePushed()

  Returns true if this entity should push and be pushed by other entities when colliding.

  Overrides:
    `canBePushed` in class `Entity`

### getEyeHeight

    public float getEyeHeight()

  Overrides:
    `getEyeHeight` in class `Entity`

### getTalkInterval

    public int getTalkInterval()

  Get number of ticks, at least during which the living entity will be silent.

### playLivingSound

    public void playLivingSound()

  Plays living's sound at its position

### onEntityUpdate

    public void onEntityUpdate()

  Gets called every tick from main Entity class

  Overrides:
    `onEntityUpdate` in class `Entity`

### spawnExplosionParticle

    public void spawnExplosionParticle()

  Spawns an explosion particle around the Entity's location

### updateRidden

    public void updateRidden()

  Handles updating while being ridden by an entity

  Overrides:
    `updateRidden` in class `Entity`

### setPositionAndRotation2

    public void setPositionAndRotation2(double par1,
                                        double par3,
                                        double par5,
                                        float par7,
                                        float par8,
                                        int par9)

  Overrides:
    `setPositionAndRotation2` in class `Entity`

### onUpdate

    public void onUpdate()

  Called to update the entity's position/logic.

  Overrides:
    `onUpdate` in class `Entity`

### heal

    public void heal(int par1)

  Heal living entity (param: amount of half-hearts)

### getMaxHealth

    public abstract int getMaxHealth()

### getHealth

    public int getHealth()

### setEntityHealth

    public void setEntityHealth(int par1)

### attackEntityFrom

    public boolean attackEntityFrom(DamageSource par1DamageSource,
                                    int par2)

  Called when the entity is attacked.

  Overrides:
    `attackEntityFrom` in class `Entity`

### performHurtAnimation

    public void performHurtAnimation()

  Overrides:
    `performHurtAnimation` in class `Entity`

### getTotalArmorValue

    public int getTotalArmorValue()

  Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue

### knockBack

    public void knockBack(Entity par1Entity,
                          int par2,
                          double par3,
                          double par5)

  knocks back this entity

### onDeath

    public void onDeath(DamageSource par1DamageSource)

  Called when the mob's health reaches 0.

### moveEntityWithHeading

    public void moveEntityWithHeading(float par1,
                                      float par2)

  Moves the entity based on the specified heading. Args: strafe, forward

### isOnLadder

    public boolean isOnLadder()

  returns true if this entity is by a ladder, false otherwise

### writeEntityToNBT

    public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)

  (abstract) Protected helper method to write subclass entity data to NBT.

### readEntityFromNBT

    public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)

  (abstract) Protected helper method to read subclass entity data from NBT.

### isEntityAlive

    public boolean isEntityAlive()

  Checks whether target entity is alive.

  Overrides:
    `isEntityAlive` in class `Entity`

### canBreatheUnderwater

    public boolean canBreatheUnderwater()

### setMoveForward

    public void setMoveForward(float par1)

### setJumping

    public void setJumping(boolean par1)

### onLivingUpdate

    public void onLivingUpdate()

  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.

### isBlocking

    public boolean isBlocking()

### 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.

### faceEntity

    public void faceEntity(Entity par1Entity,
                           float par2,
                           float par3)

  Changes pitch and yaw so that the entity calling the function is facing the entity provided as an argument.

### getCanSpawnHere

    public boolean getCanSpawnHere()

  Checks if the entity's current position is a valid location to spawn this entity.

### getSwingProgress

    public float getSwingProgress(float par1)

### getPosition

    public Vec3 getPosition(float par1)

### getLookVec

    public Vec3 getLookVec()

  returns a (normalized) vector of where this entity is looking

  Overrides:
    `getLookVec` in class `Entity`

### getLook

    public Vec3 getLook(float par1)

  interpolated look vector

### getRenderSizeModifier

    public float getRenderSizeModifier()

### rayTrace

    public MovingObjectPosition rayTrace(double par1,
                                         float par3)

### getMaxSpawnedInChunk

    public int getMaxSpawnedInChunk()

  Will return how many at most can spawn in a chunk at once.

### getHeldItem

    public ItemStack getHeldItem()

### handleHealthUpdate

    public void handleHealthUpdate(byte par1)

  Overrides:
    `handleHealthUpdate` in class `Entity`

### isPlayerSleeping

    public boolean isPlayerSleeping()

  Returns whether player is sleeping or not

### getItemIcon

    public int getItemIcon(ItemStack par1ItemStack,
                           int par2)

### clearActivePotions

    public void clearActivePotions()

### getActivePotionEffects

    public Collection getActivePotionEffects()

### isPotionActive

    public boolean isPotionActive(Potion par1Potion)

### getActivePotionEffect

    public PotionEffect getActivePotionEffect(Potion par1Potion)

  returns the PotionEffect for the supplied Potion if it is active, null otherwise.

### addPotionEffect

    public void addPotionEffect(PotionEffect par1PotionEffect)

  adds a PotionEffect to the entity

### isPotionApplicable

    public boolean isPotionApplicable(PotionEffect par1PotionEffect)

### isEntityUndead

    public boolean isEntityUndead()

  Returns true if this entity is undead.

### removePotionEffect

    public void removePotionEffect(int par1)

  input is the potion id to remove from the current active potion effects

### setPositionAndUpdate

    public void setPositionAndUpdate(double par1,
                                     double par3,
                                     double par5)

  Move the entity to the coordinates informed, but keep yaw/pitch values.

### isChild

    public boolean isChild()

  If Animal, checks if the age timer is negative

### getCreatureAttribute

    public EnumCreatureAttribute getCreatureAttribute()

  Get this Entity's EnumCreatureAttribute

### renderBrokenItemStack

    public void renderBrokenItemStack(ItemStack par1ItemStack)

  Renders broken item particles using the given ItemStack

### curePotionEffects

    public void curePotionEffects(ItemStack curativeItem)

  Removes all potion effects that have curativeItem as a curative item for its effect

  Parameters:
    `curativeItem` - The itemstack we are using to cure potion effects

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD