public abstract class EntityLiving extends EntityLivingBase
Modifier and Type | Field and Description |
---|---|
protected float |
defaultPitch |
protected float[] |
equipmentDropChances
Chances for each equipment piece from dropping when this entity dies.
|
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, swingProgressInt
addedToChunk, boundingBox, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityId, 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 par1World) |
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 par1Class)
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 par1,
boolean par2)
Removes the leash from this entity.
|
protected void |
despawnEntity()
Makes the entity despawn if requirements are reached
|
protected void |
dropEquipment(boolean par1,
int par2)
Drop the equipment for this entity.
|
protected void |
dropFewItems(boolean par1,
int par2)
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 par1Entity,
float par2,
float par3)
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 par1,
float par2) |
protected void |
func_110159_bB() |
void |
func_110163_bv() |
ItemStack |
func_130225_q(int par1) |
boolean |
getAlwaysRenderNameTag() |
boolean |
getAlwaysRenderNameTagForRender() |
static Item |
getArmorItemForSlot(int par0,
int par1)
Params: Armor slot, Item tier
|
static int |
getArmorPosition(ItemStack par0ItemStack) |
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.
|
ItemStack |
getCurrentItemOrArmor(int par1)
0 = item, 1-n is armor
|
java.lang.String |
getCustomNameTag() |
protected int |
getDropItemId()
Returns the item ID for the item the mob drops on death.
|
java.lang.String |
getEntityName()
Gets the username of the entity.
|
EntitySenses |
getEntitySenses()
returns the EntitySenses Object for the EntityLiving
|
protected int |
getExperiencePoints(EntityPlayer par1EntityPlayer)
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 par1EntityPlayer)
Called when a player interacts with a mob.
|
boolean |
interactFirst(EntityPlayer par1EntityPlayer)
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.
|
EntityLivingData |
onSpawnWithEgg(EntityLivingData par1EntityLivingData) |
void |
onUpdate()
Called to update the entity's position/logic.
|
void |
playLivingSound()
Plays living's sound at its position
|
void |
readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
(abstract) Protected helper method to read subclass entity data from NBT.
|
void |
setAIMoveSpeed(float par1)
set the movespeed used for the new AI system
|
void |
setAlwaysRenderNameTag(boolean par1) |
void |
setAttackTarget(EntityLivingBase par1EntityLivingBase)
Sets the active target the Task system uses for tracking
|
void |
setCanPickUpLoot(boolean par1) |
void |
setCurrentItemOrArmor(int par1,
ItemStack par2ItemStack)
Sets the held item, or an armor slot.
|
void |
setCustomNameTag(java.lang.String par1Str) |
void |
setEquipmentDropChance(int par1,
float par2) |
void |
setLeashedToEntity(Entity par1Entity,
boolean par2)
Sets the entity to be leashed to.nArgs:n@param par1Entity: The entity to be tethered to.n@param par2: Whether to
send an attaching notification packet to surrounding players.
|
void |
setMoveForward(float par1) |
void |
spawnExplosionParticle()
Spawns an explosion particle around the Entity's location
|
protected void |
updateAITasks() |
protected void |
updateEntityActionState() |
void |
writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
(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_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, updateRidden
addEntityCrashInfo, addToPlayerScore, addVelocity, applyEntityCollision, canAttackWithItem, canRenderOnFire, canRiderInteract, canTriggerWalking, copyDataFrom, copyLocationAndAnglesFrom, dealFireDamage, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, getAir, getBlockExplosionResistance, getBoundingBox, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBox, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityData, getEntityString, getExtendedProperties, getFlag, getMaxInPortalTime, getMountedYOffset, getParts, getPersistentID, getPickedResult, getPortalCooldown, getShadowSize, getTeleportDirection, getTranslatedEntityName, getUniqueID, getYOffset, handleLavaMovement, handleWaterMovement, hashCode, hitByEntity, isBurning, isCreatureType, isEating, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToFire, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isPushedByWater, isRiding, isSneaking, isSprinting, isWet, mountEntity, moveEntity, moveFlying, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onKillEntity, onStruckByLightning, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, readFromNBT, registerExtendedProperties, resetEntityId, setAir, setAngles, setDead, setEating, setFire, setFlag, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setPosition, setPositionAndRotation, setRotation, setSize, setSneaking, setVelocity, setWorld, shouldDismountInWater, shouldExplodeBlock, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, toString, travelToDimension, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptional
public int livingSoundTime
public int experienceValue
public final EntityAITasks tasks
public final EntityAITasks targetTasks
protected float[] equipmentDropChances
protected float defaultPitch
protected int numTicksToChaseTarget
public EntityLiving(World par1World)
protected void applyEntityAttributes()
applyEntityAttributes
in class EntityLivingBase
public EntityLookHelper getLookHelper()
public EntityMoveHelper getMoveHelper()
public EntityJumpHelper getJumpHelper()
public PathNavigate getNavigator()
public EntitySenses getEntitySenses()
public EntityLivingBase getAttackTarget()
public void setAttackTarget(EntityLivingBase par1EntityLivingBase)
public boolean canAttackClass(java.lang.Class par1Class)
public void eatGrassBonus()
protected void entityInit()
entityInit
in class EntityLivingBase
public int getTalkInterval()
public void playLivingSound()
public void onEntityUpdate()
onEntityUpdate
in class EntityLivingBase
protected int getExperiencePoints(EntityPlayer par1EntityPlayer)
getExperiencePoints
in class EntityLivingBase
public void spawnExplosionParticle()
public void onUpdate()
onUpdate
in class EntityLivingBase
protected float func_110146_f(float par1, float par2)
func_110146_f
in class EntityLivingBase
protected java.lang.String getLivingSound()
protected int getDropItemId()
protected void dropFewItems(boolean par1, int par2)
dropFewItems
in class EntityLivingBase
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
writeEntityToNBT
in class EntityLivingBase
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
readEntityFromNBT
in class EntityLivingBase
public void setMoveForward(float par1)
public void setAIMoveSpeed(float par1)
setAIMoveSpeed
in class EntityLivingBase
public void onLivingUpdate()
onLivingUpdate
in class EntityLivingBase
protected boolean isAIEnabled()
isAIEnabled
in class EntityLivingBase
protected boolean canDespawn()
protected void despawnEntity()
protected void updateAITasks()
updateAITasks
in class EntityLivingBase
protected void updateEntityActionState()
updateEntityActionState
in class EntityLivingBase
public int getVerticalFaceSpeed()
public void faceEntity(Entity par1Entity, float par2, float par3)
public boolean getCanSpawnHere()
public float getRenderSizeModifier()
public int getMaxSpawnedInChunk()
public int getMaxSafePointTries()
getMaxSafePointTries
in class Entity
public ItemStack getHeldItem()
getHeldItem
in class EntityLivingBase
public ItemStack getCurrentItemOrArmor(int par1)
getCurrentItemOrArmor
in class EntityLivingBase
public ItemStack func_130225_q(int par1)
public void setCurrentItemOrArmor(int par1, ItemStack par2ItemStack)
setCurrentItemOrArmor
in class EntityLivingBase
public ItemStack[] getLastActiveItems()
getLastActiveItems
in class EntityLivingBase
protected void dropEquipment(boolean par1, int par2)
dropEquipment
in class EntityLivingBase
protected void addRandomArmor()
public static int getArmorPosition(ItemStack par0ItemStack)
public static Item getArmorItemForSlot(int par0, int par1)
protected void enchantEquipment()
public EntityLivingData onSpawnWithEgg(EntityLivingData par1EntityLivingData)
public boolean canBeSteered()
public java.lang.String getEntityName()
getEntityName
in class Entity
public void func_110163_bv()
public void setCustomNameTag(java.lang.String par1Str)
public java.lang.String getCustomNameTag()
public boolean hasCustomNameTag()
public void setAlwaysRenderNameTag(boolean par1)
public boolean getAlwaysRenderNameTag()
public boolean getAlwaysRenderNameTagForRender()
getAlwaysRenderNameTagForRender
in class EntityLivingBase
public void setEquipmentDropChance(int par1, float par2)
public boolean canPickUpLoot()
public void setCanPickUpLoot(boolean par1)
public boolean isNoDespawnRequired()
public final boolean interactFirst(EntityPlayer par1EntityPlayer)
interactFirst
in class Entity
protected boolean interact(EntityPlayer par1EntityPlayer)
protected void func_110159_bB()
public void clearLeashed(boolean par1, boolean par2)
public boolean allowLeashing()
public boolean getLeashed()
public Entity getLeashedToEntity()
public void setLeashedToEntity(Entity par1Entity, boolean par2)