public abstract class EntityLiving extends EntityLivingBase
Entity.EnumEntitySize| Modifier and Type | Field and Description |
|---|---|
protected float |
defaultPitch |
protected float[] |
equipmentDropChances
Chances for each equipment piece from dropping when this entity dies.
|
protected int |
experienceValue
The experience points the Entity gives.
|
int |
livingSoundTime
Number of ticks since this EntityLiving last produced its sound
|
protected int |
numTicksToChaseTarget
How long to keep a specific target entity
|
EntityAITasks |
targetTasks |
EntityAITasks |
tasks |
arrowHitTimer, attackedAtYaw, attackingPlayer, attackTime, cameraPitch, dead, deathTime, entityAge, field_110154_aX, field_70741_aB, field_70763_ax, field_70764_aw, field_70768_au, field_70769_ao, field_70770_ap, hurtTime, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, moveForward, moveStrafing, newPosRotationIncrements, newPosX, newPosY, newPosZ, newRotationPitch, newRotationYaw, prevCameraPitch, prevHealth, prevLimbSwingAmount, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, swingProgress, swingProgressIntaddedToChunk, boundingBox, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, extendedProperties, fallDistance, field_70135_K, fireResistance, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj, yOffset, ySize| Constructor and Description |
|---|
EntityLiving(World p_i1595_1_) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRandomArmor()
Makes entity wear random armor based on difficulty
|
boolean |
allowLeashing() |
protected void |
applyEntityAttributes() |
boolean |
canAttackClass(java.lang.Class p_70686_1_)
Returns true if this entity can attack entities of the specified class.
|
boolean |
canBeSteered()
returns true if all the conditions for steering the entity are met.
|
protected boolean |
canDespawn()
Determines if an entity can be despawned, used on idle far away entities
|
boolean |
canPickUpLoot() |
void |
clearLeashed(boolean p_110160_1_,
boolean p_110160_2_)
Removes the leash from this entity.
|
protected void |
despawnEntity()
Makes the entity despawn if requirements are reached
|
protected void |
dropEquipment(boolean p_82160_1_,
int p_82160_2_)
Drop the equipment for this entity.
|
protected void |
dropFewItems(boolean p_70628_1_,
int p_70628_2_)
Drop 0-2 items of this living's type.
|
void |
eatGrassBonus()
This function applies the benefits of growing back wool and faster growing up to the acting entity.
|
protected void |
enchantEquipment()
Enchants the entity's armor and held item based on difficulty
|
protected void |
entityInit() |
void |
faceEntity(Entity p_70625_1_,
float p_70625_2_,
float p_70625_3_)
Changes pitch and yaw so that the entity calling the function is facing the entity provided as an argument.
|
protected float |
func_110146_f(float p_110146_1_,
float p_110146_2_) |
void |
func_110163_bv() |
ItemStack |
func_130225_q(int p_130225_1_) |
boolean |
getAlwaysRenderNameTag() |
boolean |
getAlwaysRenderNameTagForRender() |
static Item |
getArmorItemForSlot(int p_82161_0_,
int p_82161_1_)
Params: Armor slot, Item tier
|
static int |
getArmorPosition(ItemStack p_82159_0_) |
EntityLivingBase |
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.
|
java.lang.String |
getCommandSenderName()
Gets the name of this command sender (usually username, but possibly "Rcon")
|
java.lang.String |
getCustomNameTag() |
protected Item |
getDropItem() |
EntitySenses |
getEntitySenses()
returns the EntitySenses Object for the EntityLiving
|
ItemStack |
getEquipmentInSlot(int p_71124_1_)
0: Tool in Hand; 1-4: Armor
|
protected int |
getExperiencePoints(EntityPlayer p_70693_1_)
Get the experience points the entity currently has.
|
ItemStack |
getHeldItem()
Returns the item that this EntityLiving is holding, if any.
|
EntityJumpHelper |
getJumpHelper() |
ItemStack[] |
getLastActiveItems() |
boolean |
getLeashed() |
Entity |
getLeashedToEntity() |
protected java.lang.String |
getLivingSound()
Returns the sound this mob makes while it's alive.
|
EntityLookHelper |
getLookHelper() |
int |
getMaxSafePointTries()
The number of iterations PathFinder.getSafePoint will execute before giving up.
|
int |
getMaxSpawnedInChunk()
Will return how many at most can spawn in a chunk at once.
|
EntityMoveHelper |
getMoveHelper() |
PathNavigate |
getNavigator() |
float |
getRenderSizeModifier()
Returns render size modifier
|
int |
getTalkInterval()
Get number of ticks, at least during which the living entity will be silent.
|
int |
getVerticalFaceSpeed()
The speed it takes to move the entityliving's rotationPitch through the faceEntity method.
|
boolean |
hasCustomNameTag() |
protected boolean |
interact(EntityPlayer p_70085_1_)
Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
|
boolean |
interactFirst(EntityPlayer p_130002_1_)
First layer of player interaction
|
protected boolean |
isAIEnabled()
Returns true if the newer Entity AI code should be run
|
boolean |
isNoDespawnRequired() |
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.
|
IEntityLivingData |
onSpawnWithEgg(IEntityLivingData p_110161_1_) |
void |
onUpdate()
Called to update the entity's position/logic.
|
void |
playLivingSound()
Plays living's sound at its position
|
void |
readEntityFromNBT(NBTTagCompound p_70037_1_)
(abstract) Protected helper method to read subclass entity data from NBT.
|
void |
setAIMoveSpeed(float p_70659_1_)
set the movespeed used for the new AI system
|
void |
setAlwaysRenderNameTag(boolean p_94061_1_) |
void |
setAttackTarget(EntityLivingBase p_70624_1_)
Sets the active target the Task system uses for tracking
|
void |
setCanPickUpLoot(boolean p_98053_1_) |
void |
setCurrentItemOrArmor(int p_70062_1_,
ItemStack p_70062_2_)
Sets the held item, or an armor slot.
|
void |
setCustomNameTag(java.lang.String p_94058_1_) |
void |
setEquipmentDropChance(int p_96120_1_,
float p_96120_2_) |
void |
setLeashedToEntity(Entity p_110162_1_,
boolean p_110162_2_)
Sets the entity to be leashed to.
|
void |
setMoveForward(float p_70657_1_) |
void |
spawnExplosionParticle()
Spawns an explosion particle around the Entity's location
|
protected void |
updateAITasks() |
protected void |
updateEntityActionState() |
protected void |
updateLeashedState()
Applies logic related to leashes, for example dragging the entity or breaking the leash.
|
void |
writeEntityToNBT(NBTTagCompound p_70014_1_)
(abstract) Protected helper method to write subclass entity data to NBT.
|
addPotionEffect, applyArmorCalculations, applyPotionDamageCalculations, attackEntityAsMob, attackEntityFrom, canBeCollidedWith, canBePushed, canBreatheUnderwater, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, curePotionEffects, damageArmor, damageEntity, decreaseAirSupply, dismountEntity, dropRareDrop, fall, func_110142_aN, func_142015_aE, func_146066_aG, func_146067_o, func_152111_bt, func_152112_bu, func_94060_bK, getAbsorptionAmount, getActivePotionEffect, getActivePotionEffects, getAge, getAIMoveSpeed, getAITarget, getArrowCountInEntity, getAttributeMap, getCreatureAttribute, getDeathSound, getEntityAttribute, getEyeHeight, getHealth, getHurtSound, getItemIcon, getLastAttacker, getLastAttackerTime, getLook, getLookVec, getMaxHealth, getPosition, getRNG, getRotationYawHead, getSoundPitch, getSoundVolume, getSwingProgress, getTeam, getTotalArmorValue, handleHealthUpdate, heal, isChild, isClientWorld, isEntityAlive, isEntityUndead, isMovementBlocked, isOnLadder, isOnSameTeam, isOnTeam, isPlayer, isPlayerSleeping, isPotionActive, isPotionActive, isPotionApplicable, jump, kill, knockBack, moveEntityWithHeading, onChangedPotionEffect, onDeath, onDeathUpdate, onFinishedPotionEffect, onItemPickup, onNewPotionEffect, performHurtAnimation, rayTrace, removePotionEffect, removePotionEffectClient, renderBrokenItemStack, setAbsorptionAmount, setArrowCountInEntity, setBeenAttacked, setHealth, setJumping, setLastAttacker, setPositionAndRotation2, setPositionAndUpdate, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, swingItem, updateAITick, updateArmSwingProgress, updateFallState, updatePotionEffects, updateRiddenaddEntityCrashInfo, addToPlayerScore, addVelocity, applyEntityCollision, canAttackWithItem, canRenderOnFire, canRiderInteract, canTriggerWalking, copyDataFrom, copyLocationAndAnglesFrom, dealFireDamage, doesEntityNotTriggerPressurePlate, dropItem, entityDropItem, equals, extinguish, func_145748_c_, func_145771_j, func_145772_a, func_145774_a, func_145775_I, func_145778_a, func_145780_a, func_145781_i, getAir, getBoundingBox, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBox, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityData, getEntityId, getEntityString, getExtendedProperties, getFlag, getMaxInPortalTime, getMountedYOffset, getParts, getPersistentID, getPickedResult, getPortalCooldown, getShadowSize, getSplashSound, getSwimSound, getTeleportDirection, getUniqueID, getYOffset, handleLavaMovement, handleWaterMovement, hashCode, hitByEntity, isBurning, isCreatureType, isEating, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToFire, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isPushedByWater, isRiding, isSneaking, isSprinting, isWet, mountEntity, moveEntity, moveFlying, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onKillEntity, onStruckByLightning, playSound, preparePlayerToSpawn, readFromNBT, registerExtendedProperties, resetEntityId, setAir, setAngles, setDead, setEating, setEntityId, setFire, setFlag, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setPosition, setPositionAndRotation, setRotation, setSize, setSneaking, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, toString, travelToDimension, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptionalpublic int livingSoundTime
protected int experienceValue
public final EntityAITasks tasks
public final EntityAITasks targetTasks
protected float[] equipmentDropChances
protected float defaultPitch
protected int numTicksToChaseTarget
public EntityLiving(World p_i1595_1_)
protected void applyEntityAttributes()
applyEntityAttributes in class EntityLivingBasepublic EntityLookHelper getLookHelper()
public EntityMoveHelper getMoveHelper()
public EntityJumpHelper getJumpHelper()
public PathNavigate getNavigator()
public EntitySenses getEntitySenses()
public EntityLivingBase getAttackTarget()
public void setAttackTarget(EntityLivingBase p_70624_1_)
public boolean canAttackClass(java.lang.Class p_70686_1_)
public void eatGrassBonus()
protected void entityInit()
entityInit in class EntityLivingBasepublic int getTalkInterval()
public void playLivingSound()
public void onEntityUpdate()
onEntityUpdate in class EntityLivingBaseprotected int getExperiencePoints(EntityPlayer p_70693_1_)
getExperiencePoints in class EntityLivingBasepublic void spawnExplosionParticle()
public void onUpdate()
onUpdate in class EntityLivingBaseprotected float func_110146_f(float p_110146_1_,
float p_110146_2_)
func_110146_f in class EntityLivingBaseprotected java.lang.String getLivingSound()
protected Item getDropItem()
protected void dropFewItems(boolean p_70628_1_,
int p_70628_2_)
dropFewItems in class EntityLivingBasepublic void writeEntityToNBT(NBTTagCompound p_70014_1_)
writeEntityToNBT in class EntityLivingBasepublic void readEntityFromNBT(NBTTagCompound p_70037_1_)
readEntityFromNBT in class EntityLivingBasepublic void setMoveForward(float p_70657_1_)
public void setAIMoveSpeed(float p_70659_1_)
setAIMoveSpeed in class EntityLivingBasepublic void onLivingUpdate()
onLivingUpdate in class EntityLivingBaseprotected boolean isAIEnabled()
isAIEnabled in class EntityLivingBaseprotected boolean canDespawn()
protected void despawnEntity()
protected void updateAITasks()
updateAITasks in class EntityLivingBaseprotected void updateEntityActionState()
updateEntityActionState in class EntityLivingBasepublic int getVerticalFaceSpeed()
public void faceEntity(Entity p_70625_1_, float p_70625_2_, float p_70625_3_)
public boolean getCanSpawnHere()
public float getRenderSizeModifier()
public int getMaxSpawnedInChunk()
public int getMaxSafePointTries()
getMaxSafePointTries in class Entitypublic ItemStack getHeldItem()
getHeldItem in class EntityLivingBasepublic ItemStack getEquipmentInSlot(int p_71124_1_)
getEquipmentInSlot in class EntityLivingBasepublic ItemStack func_130225_q(int p_130225_1_)
public void setCurrentItemOrArmor(int p_70062_1_,
ItemStack p_70062_2_)
setCurrentItemOrArmor in class EntityLivingBasepublic ItemStack[] getLastActiveItems()
getLastActiveItems in class EntityLivingBaseprotected void dropEquipment(boolean p_82160_1_,
int p_82160_2_)
dropEquipment in class EntityLivingBaseprotected void addRandomArmor()
public static int getArmorPosition(ItemStack p_82159_0_)
public static Item getArmorItemForSlot(int p_82161_0_, int p_82161_1_)
protected void enchantEquipment()
public IEntityLivingData onSpawnWithEgg(IEntityLivingData p_110161_1_)
public boolean canBeSteered()
public java.lang.String getCommandSenderName()
getCommandSenderName in class Entitypublic void func_110163_bv()
public void setCustomNameTag(java.lang.String p_94058_1_)
public java.lang.String getCustomNameTag()
public boolean hasCustomNameTag()
public void setAlwaysRenderNameTag(boolean p_94061_1_)
public boolean getAlwaysRenderNameTag()
public boolean getAlwaysRenderNameTagForRender()
getAlwaysRenderNameTagForRender in class EntityLivingBasepublic void setEquipmentDropChance(int p_96120_1_,
float p_96120_2_)
public boolean canPickUpLoot()
public void setCanPickUpLoot(boolean p_98053_1_)
public boolean isNoDespawnRequired()
public final boolean interactFirst(EntityPlayer p_130002_1_)
interactFirst in class Entityprotected boolean interact(EntityPlayer p_70085_1_)
protected void updateLeashedState()
public void clearLeashed(boolean p_110160_1_,
boolean p_110160_2_)
public boolean allowLeashing()
public boolean getLeashed()
public Entity getLeashedToEntity()
public void setLeashedToEntity(Entity p_110162_1_, boolean p_110162_2_)
par1Entity: - The entity to be tethered to.par2: - Whether to send an attaching notification packet to surrounding players.