public abstract class EntityLivingBase extends Entity
Modifier and Type | Field and Description |
---|---|
int |
arrowHitTimer |
float |
attackedAtYaw
The yaw at which this entity was last attacked from.
|
int |
attackTime |
float |
cameraPitch |
int |
deathTime
The amount of time remaining this entity should act 'dead', i.e.
|
float |
field_70769_ao |
float |
field_70770_ap |
int |
hurtTime
The amount of time remaining this entity should act 'hurt'.
|
boolean |
isSwingInProgress
Whether an arm swing is currently in progress.
|
float |
jumpMovementFactor
A factor used to determine how far this entity will move each tick if it is jumping or falling.
|
float |
limbSwing
Only relevant when limbYaw is not 0(the entity is moving).
|
float |
limbSwingAmount |
int |
maxHurtResistantTime |
int |
maxHurtTime
What the hurt time was max set to last.
|
float |
moveForward |
float |
moveStrafing |
float |
prevCameraPitch |
float |
prevHealth |
float |
prevLimbSwingAmount |
float |
prevRenderYawOffset |
float |
prevRotationYawHead
Entity head rotation yaw at previous tick
|
float |
prevSwingProgress |
float |
renderYawOffset |
float |
rotationYawHead
Entity head rotation yaw
|
float |
swingProgress |
int |
swingProgressInt |
addedToChunk, boundingBox, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityId, fallDistance, field_70135_K, fireResistance, forceSpawn, 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, stepHeight, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj, yOffset, ySize
Constructor and Description |
---|
EntityLivingBase(World par1World) |
Modifier and Type | Method and Description |
---|---|
void |
addPotionEffect(PotionEffect par1PotionEffect)
adds a PotionEffect to the entity
|
boolean |
attackEntityAsMob(Entity par1Entity) |
boolean |
attackEntityFrom(DamageSource par1DamageSource,
float 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 |
dismountEntity(Entity par1Entity)
Moves the entity to a position out of the way of its mount.
|
CombatTracker |
func_110142_aN() |
int |
func_142015_aE() |
EntityLivingBase |
func_94060_bK() |
float |
getAbsorptionAmount() |
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
|
EntityLivingBase |
getAITarget() |
boolean |
getAlwaysRenderNameTagForRender() |
int |
getArrowCountInEntity()
counts the amount of arrows stuck in the entity.
|
BaseAttributeMap |
getAttributeMap() |
EnumCreatureAttribute |
getCreatureAttribute()
Get this Entity's EnumCreatureAttribute
|
abstract ItemStack |
getCurrentItemOrArmor(int i)
0 = item, 1-n is armor
|
AttributeInstance |
getEntityAttribute(Attribute par1Attribute) |
float |
getEyeHeight() |
float |
getHealth() |
abstract ItemStack |
getHeldItem()
Returns the item that this EntityLiving is holding, if any.
|
Icon |
getItemIcon(ItemStack par1ItemStack,
int par2) |
abstract ItemStack[] |
getLastActiveItems() |
EntityLivingBase |
getLastAttacker() |
int |
getLastAttackerTime() |
Vec3 |
getLook(float par1)
interpolated look vector
|
Vec3 |
getLookVec()
returns a (normalized) vector of where this entity is looking
|
float |
getMaxHealth() |
Vec3 |
getPosition(float par1) |
Random |
getRNG() |
float |
getRotationYawHead() |
float |
getSwingProgress(float par1) |
Team |
getTeam() |
int |
getTotalArmorValue()
Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
|
void |
handleHealthUpdate(byte par1) |
void |
heal(float par1)
Heal living entity (param: amount of half-hearts)
|
boolean |
isChild()
If Animal, checks if the age timer is negative
|
boolean |
isClientWorld()
Returns whether the entity is in a local (client) world
|
boolean |
isEntityAlive()
Checks whether target entity is alive.
|
boolean |
isEntityUndead()
Returns true if this entity is undead.
|
boolean |
isOnLadder()
returns true if this entity is by a ladder, false otherwise
|
boolean |
isOnSameTeam(EntityLivingBase par1EntityLivingBase) |
boolean |
isOnTeam(Team par1Team)
Returns true if the entity is on a specific team.
|
boolean |
isPlayerSleeping()
Returns whether player is sleeping or not
|
boolean |
isPotionActive(int par1) |
boolean |
isPotionActive(Potion par1Potion) |
boolean |
isPotionApplicable(PotionEffect par1PotionEffect) |
void |
knockBack(Entity par1Entity,
float 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 |
onItemPickup(Entity par1Entity,
int par2)
Called whenever an item is picked up from walking over it.
|
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() |
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)
Remove the specified potion effect from this entity.
|
void |
removePotionEffectClient(int par1)
Remove the speified potion effect from this entity.
|
void |
renderBrokenItemStack(ItemStack par1ItemStack)
Renders broken item particles using the given ItemStack
|
void |
setAbsorptionAmount(float par1) |
void |
setAIMoveSpeed(float par1)
set the movespeed used for the new AI system
|
void |
setArrowCountInEntity(int par1)
sets the amount of arrows stuck in the entity.
|
abstract void |
setCurrentItemOrArmor(int i,
ItemStack itemstack)
Sets the held item, or an armor slot.
|
void |
setHealth(float par1) |
void |
setJumping(boolean par1) |
void |
setLastAttacker(Entity par1Entity) |
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(EntityLivingBase par1EntityLivingBase) |
void |
setRotationYawHead(float par1) |
void |
setSprinting(boolean par1)
Set sprinting switch for Entity.
|
boolean |
shouldRiderFaceForward(EntityPlayer player)
Returns true if the entity's rider (EntityPlayer) should face forward when mounted.
|
void |
swingItem()
Swings the item the player is holding.
|
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.
|
addEntityCrashInfo, addToPlayerScore, addVelocity, applyEntityCollision, canAttackWithItem, canRenderOnFire, canRiderInteract, copyDataFrom, copyLocationAndAnglesFrom, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, getAir, getBlockExplosionResistance, getBoundingBox, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBox, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityData, getEntityName, getExtendedProperties, getMaxInPortalTime, getMaxSafePointTries, getMountedYOffset, getParts, getPersistentID, getPickedResult, getPortalCooldown, getShadowSize, getTeleportDirection, getTranslatedEntityName, getUniqueID, getYOffset, handleLavaMovement, handleWaterMovement, hashCode, hitByEntity, interactFirst, isBurning, isCreatureType, isEating, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToFire, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isPushedByWater, isRiding, isSneaking, isSprinting, isWet, mountEntity, moveEntity, moveFlying, onChunkLoad, onCollideWithPlayer, onKillEntity, onStruckByLightning, playSound, readFromNBT, registerExtendedProperties, resetEntityId, setAir, setAngles, setDead, setEating, setFire, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setPosition, setPositionAndRotation, setSneaking, setVelocity, setWorld, shouldDismountInWater, shouldExplodeBlock, shouldRenderInPass, shouldRiderSit, toString, travelToDimension, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptional
public boolean isSwingInProgress
public int swingProgressInt
public int arrowHitTimer
public float prevHealth
public int hurtTime
public int maxHurtTime
public float attackedAtYaw
public int deathTime
public int attackTime
public float prevSwingProgress
public float swingProgress
public float prevLimbSwingAmount
public float limbSwingAmount
public float limbSwing
public int maxHurtResistantTime
public float prevCameraPitch
public float cameraPitch
public float field_70769_ao
public float field_70770_ap
public float renderYawOffset
public float prevRenderYawOffset
public float rotationYawHead
public float prevRotationYawHead
public float jumpMovementFactor
public float moveStrafing
public float moveForward
public EntityLivingBase(World par1World)
public boolean canBreatheUnderwater()
public void onEntityUpdate()
onEntityUpdate
in class Entity
public boolean isChild()
public Random getRNG()
public EntityLivingBase getAITarget()
public int func_142015_aE()
public void setRevengeTarget(EntityLivingBase par1EntityLivingBase)
public EntityLivingBase getLastAttacker()
public int getLastAttackerTime()
public void setLastAttacker(Entity par1Entity)
public int getAge()
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
public void clearActivePotions()
public Collection getActivePotionEffects()
public boolean isPotionActive(int par1)
public boolean isPotionActive(Potion par1Potion)
public PotionEffect getActivePotionEffect(Potion par1Potion)
public void addPotionEffect(PotionEffect par1PotionEffect)
public boolean isPotionApplicable(PotionEffect par1PotionEffect)
public boolean isEntityUndead()
public void removePotionEffectClient(int par1)
public void removePotionEffect(int par1)
public void heal(float par1)
public final float getHealth()
public void setHealth(float par1)
public boolean attackEntityFrom(DamageSource par1DamageSource, float par2)
attackEntityFrom
in class Entity
public void renderBrokenItemStack(ItemStack par1ItemStack)
public void onDeath(DamageSource par1DamageSource)
public void knockBack(Entity par1Entity, float par2, double par3, double par5)
public boolean isOnLadder()
public boolean isEntityAlive()
isEntityAlive
in class Entity
public void performHurtAnimation()
performHurtAnimation
in class Entity
public int getTotalArmorValue()
public CombatTracker func_110142_aN()
public EntityLivingBase func_94060_bK()
public final float getMaxHealth()
public final int getArrowCountInEntity()
public final void setArrowCountInEntity(int par1)
public void swingItem()
public void handleHealthUpdate(byte par1)
handleHealthUpdate
in class Entity
public AttributeInstance getEntityAttribute(Attribute par1Attribute)
public BaseAttributeMap getAttributeMap()
public EnumCreatureAttribute getCreatureAttribute()
public abstract ItemStack getHeldItem()
public abstract ItemStack getCurrentItemOrArmor(int i)
public abstract void setCurrentItemOrArmor(int i, ItemStack itemstack)
setCurrentItemOrArmor
in class Entity
public void setSprinting(boolean par1)
setSprinting
in class Entity
public abstract ItemStack[] getLastActiveItems()
getLastActiveItems
in class Entity
public void setPositionAndUpdate(double par1, double par3, double par5)
public void dismountEntity(Entity par1Entity)
public boolean getAlwaysRenderNameTagForRender()
public void moveEntityWithHeading(float par1, float par2)
public float getAIMoveSpeed()
public void setAIMoveSpeed(float par1)
public boolean attackEntityAsMob(Entity par1Entity)
public boolean isPlayerSleeping()
public void onUpdate()
public void onLivingUpdate()
public void updateRidden()
updateRidden
in class Entity
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9)
setPositionAndRotation2
in class Entity
public void setJumping(boolean par1)
public void onItemPickup(Entity par1Entity, int par2)
public boolean canEntityBeSeen(Entity par1Entity)
public Vec3 getLookVec()
getLookVec
in class Entity
public Vec3 getLook(float par1)
public float getSwingProgress(float par1)
public Vec3 getPosition(float par1)
public MovingObjectPosition rayTrace(double par1, float par3)
public boolean isClientWorld()
public boolean canBeCollidedWith()
canBeCollidedWith
in class Entity
public boolean canBePushed()
canBePushed
in class Entity
public float getEyeHeight()
getEyeHeight
in class Entity
public float getRotationYawHead()
getRotationYawHead
in class Entity
public void setRotationYawHead(float par1)
setRotationYawHead
in class Entity
public float getAbsorptionAmount()
public void setAbsorptionAmount(float par1)
public Team getTeam()
public boolean isOnSameTeam(EntityLivingBase par1EntityLivingBase)
public boolean isOnTeam(Team par1Team)
public void curePotionEffects(ItemStack curativeItem)
curativeItem
- The itemstack we are using to cure potion effectspublic boolean shouldRiderFaceForward(EntityPlayer player)
player
- The player who is riding the entity.