|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minecraft.entity.Entity
net.minecraft.entity.EntityLiving
public abstract class EntityLiving
Field Summary | |
---|---|
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. |
int |
experienceValue
The experience points the Entity gives. |
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. |
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 |
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 |
livingSoundTime
Number of ticks since this EntityLiving last produced its sound |
int |
maxHurtResistantTime
|
int |
maxHurtTime
What the hurt time was max set to last. |
static float[] |
pickUpLootProability
Probability to pick up loot |
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
|
int |
swingProgressInt
|
EntityAITasks |
tasks
|
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 |
canAttackClass(Class par1Class)
Returns true if this entity can attack entities of the specified class. |
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 |
canBeSteered()
returns true if all the conditions for steering the entity are met. |
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. |
int |
func_82143_as()
|
static int |
func_82159_b(ItemStack par0ItemStack)
|
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()
|
static Item |
getArmorItemForSlot(int par0,
int par1)
Params: Armor slot, Item tier |
int |
getArrowCountInEntity()
counts the amount of arrows stuck in the entity. |
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 |
ItemStack |
getCurrentArmor(int par1)
|
ItemStack |
getCurrentItemOrArmor(int par1)
0 = item, 1-n is armor |
EntitySenses |
getEntitySenses()
returns the EntitySenses Object for the EntityLiving |
float |
getEyeHeight()
|
int |
getHealth()
|
ItemStack |
getHeldItem()
Returns the item that this EntityLiving is holding, if any. |
ChunkCoordinates |
getHomePosition()
|
int |
getItemIcon(ItemStack par1ItemStack,
int par2)
|
EntityJumpHelper |
getJumpHelper()
|
ItemStack[] |
getLastActiveItems()
|
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 |
getSpeedModifier()
This method returns a value to be applied directly to entity speed, this factor is less than 1 when a slowdown potion effect is applied, more than 1 when a haste potion effect is applied and 2 for fleeing entities. |
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) |
void |
initCreature()
Initialize this creature. |
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 |
isOnLadder()
returns true if this entity is by a ladder, false otherwise |
boolean |
isPlayerSleeping()
Returns whether player is sleeping or not |
boolean |
isPotionActive(int par1)
|
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 |
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()
|
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)
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 |
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. |
void |
setAttackTarget(EntityLiving par1EntityLiving)
Sets the active target the Task system uses for tracking |
void |
setCurrentItemOrArmor(int par1,
ItemStack par2ItemStack)
Sets the held item, or an armor slot. |
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)
|
float |
setRotationYawHead()
|
boolean |
shouldRiderFaceForward(EntityPlayer player)
Returns true if the entity's rider (EntityPlayer) should face forward when mounted. |
void |
spawnExplosionParticle()
Spawns an explosion particle around the Entity's location |
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. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final float[] pickUpLootProability
public int maxHurtResistantTime
public float field_70769_ao
public float field_70770_ap
public float renderYawOffset
public float prevRenderYawOffset
public float rotationYawHead
public float prevRotationYawHead
public float landMovementFactor
public float jumpMovementFactor
public float prevSwingProgress
public float swingProgress
public int prevHealth
public int carryoverDamage
public int livingSoundTime
public int hurtTime
public int maxHurtTime
public float attackedAtYaw
public int deathTime
public int attackTime
public float prevCameraPitch
public float cameraPitch
public int experienceValue
public int field_70731_aW
public float field_70730_aX
public float prevLegYaw
public float legYaw
public float legSwing
public int arrowHitTimer
public final EntityAITasks tasks
public boolean isSwingInProgress
public int swingProgressInt
public boolean isJumping
Constructor Detail |
---|
public EntityLiving(World par1World)
Method Detail |
---|
public EntityLookHelper getLookHelper()
public EntityMoveHelper getMoveHelper()
public EntityJumpHelper getJumpHelper()
public PathNavigate getNavigator()
public EntitySenses getEntitySenses()
public Random getRNG()
public EntityLiving getAITarget()
public EntityLiving getLastAttackingEntity()
public void setLastAttackingEntity(Entity par1Entity)
public int getAge()
public float setRotationYawHead()
setRotationYawHead
in class Entity
public void setHeadRotationYaw(float par1)
setHeadRotationYaw
in class Entity
public float getAIMoveSpeed()
public void setAIMoveSpeed(float par1)
public boolean attackEntityAsMob(Entity par1Entity)
public EntityLiving getAttackTarget()
public void setAttackTarget(EntityLiving par1EntityLiving)
public boolean canAttackClass(Class par1Class)
public void eatGrassBonus()
public boolean isWithinHomeDistanceCurrentPosition()
public boolean isWithinHomeDistance(int par1, int par2, int par3)
public void setHomeArea(int par1, int par2, int par3, int par4)
public ChunkCoordinates getHomePosition()
public float getMaximumHomeDistance()
public void detachHome()
public boolean hasHome()
public void setRevengeTarget(EntityLiving par1EntityLiving)
public boolean canEntityBeSeen(Entity par1Entity)
public String getTexture()
getTexture
in class Entity
public boolean canBeCollidedWith()
canBeCollidedWith
in class Entity
public boolean canBePushed()
canBePushed
in class Entity
public float getEyeHeight()
getEyeHeight
in class Entity
public int getTalkInterval()
public void playLivingSound()
public void onEntityUpdate()
onEntityUpdate
in class Entity
public void spawnExplosionParticle()
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 onUpdate()
onUpdate
in class Entity
public void heal(int par1)
public abstract int getMaxHealth()
public int getHealth()
public void setEntityHealth(int par1)
public boolean attackEntityFrom(DamageSource par1DamageSource, int par2)
attackEntityFrom
in class Entity
public void performHurtAnimation()
performHurtAnimation
in class Entity
public int getTotalArmorValue()
public void knockBack(Entity par1Entity, int par2, double par3, double par5)
public void onDeath(DamageSource par1DamageSource)
public void moveEntityWithHeading(float par1, float par2)
public boolean isOnLadder()
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
public boolean isEntityAlive()
isEntityAlive
in class Entity
public boolean canBreatheUnderwater()
public void setMoveForward(float par1)
public void setJumping(boolean par1)
public void onLivingUpdate()
public boolean isBlocking()
public int getVerticalFaceSpeed()
public void faceEntity(Entity par1Entity, float par2, float par3)
public boolean getCanSpawnHere()
public float getSwingProgress(float par1)
public Vec3 getPosition(float par1)
public Vec3 getLookVec()
getLookVec
in class Entity
public Vec3 getLook(float par1)
public float getRenderSizeModifier()
public MovingObjectPosition rayTrace(double par1, float par3)
public int getMaxSpawnedInChunk()
public void handleHealthUpdate(byte par1)
handleHealthUpdate
in class Entity
public boolean isPlayerSleeping()
public int getItemIcon(ItemStack par1ItemStack, int par2)
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 float getSpeedModifier()
public void setPositionAndUpdate(double par1, double par3, double par5)
public boolean isChild()
public EnumCreatureAttribute getCreatureAttribute()
public void renderBrokenItemStack(ItemStack par1ItemStack)
public int func_82143_as()
func_82143_as
in class Entity
public ItemStack getHeldItem()
public ItemStack getCurrentItemOrArmor(int par1)
public ItemStack getCurrentArmor(int par1)
public void setCurrentItemOrArmor(int par1, ItemStack par2ItemStack)
setCurrentItemOrArmor
in class Entity
public ItemStack[] getLastActiveItems()
getLastActiveItems
in class Entity
public void onItemPickup(Entity par1Entity, int par2)
public static int func_82159_b(ItemStack par0ItemStack)
public static Item getArmorItemForSlot(int par0, int par1)
public void initCreature()
public void swingItem()
public boolean canBeSteered()
public final int getArrowCountInEntity()
public final void setArrowCountInEntity(int par1)
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |