Package net.minecraft.entity
Class EntityLivingBase
- java.lang.Object
-
- net.zxmushroom63.plugins.BaseData
-
- net.zxmushroom63.plugins.PluginData
-
- net.minecraft.entity.Entity
-
- net.minecraft.entity.EntityLivingBase
-
- All Implemented Interfaces:
org.teavm.jso.JSObject
- Direct Known Subclasses:
EntityArmorStand
,EntityLiving
,EntityPlayer
public abstract class EntityLivingBase extends Entity
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.zxmushroom63.plugins.BaseData
BaseData.BooleanCallback, BaseData.BooleanCallbackArr, BaseData.DataBooleanCallback, BaseData.DataBooleanCallbackArr, BaseData.DataDoubleCallback, BaseData.DataDoubleCallbackArr, BaseData.DataFloatCallback, BaseData.DataFloatCallbackArr, BaseData.DataIntCallback, BaseData.DataIntCallbackArr, BaseData.DataObjectCallback, BaseData.DataObjectCallbackArr, BaseData.DataStringCallback, BaseData.DataStringCallbackArr, BaseData.DataVoidCallback, BaseData.DoubleCallback, BaseData.DoubleCallbackArr, BaseData.FloatCallback, BaseData.FloatCallbackArr, BaseData.IntCallback, BaseData.IntCallbackArr, BaseData.ObjectCallback, BaseData.ObjectCallbackArr, BaseData.StringCallback, BaseData.StringCallbackArr, BaseData.VoidCallback
-
-
Field Summary
Fields Modifier and Type Field Description int
arrowHitTimer
float
attackedAtYaw
protected EntityPlayer
attackingPlayer
float
cameraPitch
protected boolean
dead
int
deathTime
protected int
entityAge
protected float
field_70741_aB
float
field_70769_ao
float
field_70770_ap
int
hurtTime
protected boolean
isJumping
boolean
isSwingInProgress
float
jumpMovementFactor
+ A factor used to determine how far this entity will move each tick if it is jumping or falling.protected float
lastDamage
float
limbSwing
float
limbSwingAmount
int
maxHurtResistantTime
int
maxHurtTime
protected float
movedDistance
float
moveForward
float
moveStrafing
protected int
newPosRotationIncrements
protected double
newPosX
protected double
newPosY
protected double
newPosZ
protected double
newRotationPitch
protected double
newRotationYaw
protected float
onGroundSpeedFactor
float
prevCameraPitch
float
prevLimbSwingAmount
protected float
prevMovedDistance
protected float
prevOnGroundSpeedFactor
float
prevRenderYawOffset
float
prevRotationYawHead
float
prevSwingProgress
protected float
randomYawVelocity
protected int
recentlyHit
float
renderYawOffset
float
rotationYawHead
protected int
scoreValue
float
swingProgress
int
swingProgressInt
-
Fields inherited from class net.minecraft.entity.Entity
addedToChunk, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, field_181016_an, field_181017_ao, field_181018_ap, fireResistance, firstUpdate, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj
-
-
Constructor Summary
Constructors Constructor Description EntityLivingBase(World worldIn)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addPotionEffect(PotionEffect potioneffectIn)
+ adds a PotionEffect to the entityprotected void
addRandomDrop()
+ Causes this Entity to drop a random item.protected float
applyArmorCalculations(DamageSource source, float damage)
+ Reduces damage, depending on armorprotected void
applyEntityAttributes()
protected float
applyPotionDamageCalculations(DamageSource source, float damage)
+ Reduces damage, depending on potionsboolean
attackEntityAsMob(Entity entityIn)
boolean
attackEntityFrom(DamageSource damagesource, float f)
+ 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()
protected boolean
canDropLoot()
+ Entity won't drop items or experience points if this returns falseboolean
canEntityBeSeen(Entity entityIn)
+ returns true if the entity provided in the argument can be seen.void
clearActivePotions()
protected void
collideWithEntity(Entity parEntity)
protected void
collideWithNearbyEntities()
protected void
damageArmor(float parFloat1)
protected void
damageEntity(DamageSource damagesource, float f)
+ Deals damage to the entity.protected int
decreaseAirSupply(int parInt1)
+ Decrements the entity's air supply when underwatervoid
dismountEntity(Entity parEntity)
+ Moves the entity to a position out of the way of its mount.protected void
dropEquipment(boolean parFlag, int parInt1)
+ Drop the equipment for this entity.protected void
dropFewItems(boolean parFlag, int parInt1)
+ Drop 0-2 items of this living's typeprotected void
entityInit()
void
fall(float f, float f1)
protected float
func_110146_f(float parFloat1, float parFloat2)
void
func_181013_g(float f)
EntityLivingBase
func_94060_bK()
float
getAbsorptionAmount()
PotionEffect
getActivePotionEffect(Potion potionIn)
+ returns the PotionEffect for the supplied Potion if it is active, null otherwise.java.util.Collection<PotionEffect>
getActivePotionEffects()
int
getAge()
float
getAIMoveSpeed()
+ the movespeed used for the new AI systemEntityLivingBase
getAITarget()
boolean
getAlwaysRenderNameTagForRender()
int
getArrowCountInEntity()
+ counts the amount of arrows stuck in the entity.BaseAttributeMap
getAttributeMap()
CombatTracker
getCombatTracker()
EnumCreatureAttribute
getCreatureAttribute()
+ Get this Entity's EnumCreatureAttributeabstract ItemStack
getCurrentArmor(int var1)
protected java.lang.String
getDeathSound()
+ Returns the sound this mob makes on death.IAttributeInstance
getEntityAttribute(IAttribute attribute)
abstract ItemStack
getEquipmentInSlot(int var1)
protected int
getExperiencePoints(EntityPlayer player)
+ Get the experience points the entity currently has.protected java.lang.String
getFallSoundString(int damageValue)
float
getHealth()
abstract ItemStack
getHeldItem()
protected java.lang.String
getHurtSound()
+ Returns the sound this mob makes when it is hurt.abstract ItemStack[]
getInventory()
+ returns the inventory of this entity (only used in EntityPlayerMP it seems)protected float
getJumpUpwardsMotion()
EntityLivingBase
getLastAttacker()
int
getLastAttackerTime()
Vec3
getLook(float f)
+ interpolated look vectorVec3
getLookVec()
+ returns a (normalized) vector of where this entity is lookingfloat
getMaxHealth()
int
getRevengeTimer()
EaglercraftRandom
getRNG()
float
getRotationYawHead()
protected float
getSoundPitch()
+ Gets the pitch of living sounds in living entities.protected float
getSoundVolume()
+ Returns the volume for the sounds this mob makes.float
getSwingProgress(float partialTickTime)
+ Returns where in the swing animation the living entity is (from 0 to 1).Team
getTeam()
int
getTotalArmorValue()
+ Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValueprotected void
handleJumpLava()
void
handleStatusUpdate(byte b0)
void
heal(float f)
+ Heal living entity (param: amount of half-hearts)boolean
isChild()
+ If Animal, checks if the age timer is negativeboolean
isEntityAlive()
+ Checks whether target entity is alive.boolean
isEntityUndead()
+ Returns true if this entity is undead.protected boolean
isMovementBlocked()
+ Dead and sleeping entities cannot moveboolean
isOnLadder()
+ returns true if this entity is by a ladder, false otherwiseboolean
isOnSameTeam(EntityLivingBase otherEntity)
boolean
isOnTeam(Team parTeam)
+ Returns true if the entity is on a specific team.protected boolean
isPlayer()
+ Only use is to identify if class is an instance of player for experience droppingboolean
isPlayerSleeping()
+ Returns whether player is sleeping or notboolean
isPotionActive(int potionId)
boolean
isPotionActive(Potion potionIn)
boolean
isPotionApplicable(PotionEffect potioneffectIn)
boolean
isServerWorld()
+ Returns whether the entity is in a server worldprotected void
jump()
+ Causes this entity to do an upwards motion (jumping).protected void
kill()
+ sets the dead flag.void
knockBack(Entity entityIn, float parFloat1, double parDouble1, double parDouble2)
+ knocks back this entityvoid
loadPluginData(BaseData data)
PluginData
makePluginData()
protected void
markPotionsDirty()
void
mountEntity(Entity entity)
+ Called when a player mounts an entity.void
moveEntityWithHeading(float f, float f1)
+ Moves the entity based on the specified heading.protected void
onChangedPotionEffect(PotionEffect potioneffect, boolean flag)
void
onDeath(DamageSource damagesource)
+ Called when the mob's health reaches 0.protected void
onDeathUpdate()
+ handles entity death timer, experience orb and particle creationvoid
onEntityUpdate()
+ Gets called every tick from main Entity classprotected void
onFinishedPotionEffect(PotionEffect potioneffect)
void
onItemPickup(Entity entity, int var2)
+ Called whenever an item is picked up from walking over it.void
onKillCommand()
+ Called by the /kill command.void
onLivingUpdate()
+ Called frequently so the entity can update its state every tick as required.protected void
onNewPotionEffect(PotionEffect potioneffect)
void
onUpdate()
+ Called to update the entity's position/logic.void
performHurtAnimation()
+ Setups the entity to do the hurt animation.void
readEntityFromNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to read subclass entity data from NBT.void
removePotionEffect(int potionId)
+ Remove the specified potion effect from this entity.void
removePotionEffectClient(int potionId)
+ Remove the speified potion effect from this entity.void
renderBrokenItemStack(ItemStack stack)
+ Renders broken item particles using the given ItemStackprotected void
resetPotionEffectMetadata()
+ Resets the potion effect color and ambience metadata valuesvoid
sendEndCombat()
+ Sends an END_COMBAT packet to the clientvoid
sendEnterCombat()
+ Sends an ENTER_COMBAT packet to the clientvoid
setAbsorptionAmount(float amount)
void
setAIMoveSpeed(float speedIn)
+ set the movespeed used for the new AI systemvoid
setArrowCountInEntity(int count)
+ sets the amount of arrows stuck in the entity.protected void
setBeenAttacked()
+ Sets that this entity has been attacked.abstract void
setCurrentItemOrArmor(int var1, ItemStack var2)
+ Sets the held item, or an armor slot.void
setHealth(float health)
void
setJumping(boolean parFlag)
void
setLastAttacker(Entity entityIn)
void
setPositionAndRotation2(double d0, double d1, double d2, float f, float f1, int i, boolean var10)
void
setRevengeTarget(EntityLivingBase livingBase)
void
setRotationYawHead(float f)
+ Sets the head's yaw rotation of the entity.void
setSprinting(boolean flag)
+ Set sprinting switch for Entity.void
swingItem()
+ Swings the item the player is holding.protected void
updateAITick()
+ main AI tick function, replaces updateEntityActionStateprotected void
updateArmSwingProgress()
+ Updates the arm swing progress counters and animation progressprotected void
updateEntityActionState()
protected void
updateFallState(double d0, boolean flag, Block block, BlockPos blockpos)
protected void
updatePotionEffects()
protected void
updatePotionMetadata()
+ Clears potion metadata values if the entity has no potion effects.void
updateRidden()
+ Handles updating while being ridden by an entityvoid
writeEntityToNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to write subclass entity data to NBT.-
Methods inherited from class net.minecraft.entity.Entity
addChatMessage, addEntityCrashInfo, addToPlayerScore, addVelocity, applyEnchantments, applyEntityCollision, canAttackWithItem, canCommandSenderUseCommand, canRenderOnFire, canTriggerWalking, clientUpdateEntityNBT, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fromNBT, func_181012_aH, func_181014_aG, func_181015_d, getAir, getAlwaysRenderNameTag, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCustomNameTag, getDataWatcher, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityId, getEntityString, getEntityWorld, getExplosionResistance, getEyeHeight, getFlag, getHorizontalFacing, getHoverEvent, getMaxFallHeight, getMaxInPortalTime, getMountedYOffset, getName, getNBTTagCompound, getParts, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getSplashSound, getSwimSound, getUniqueID, getVectorForRotation, getYOffset, handleWaterMovement, hasCustomName, hashCode, hitByEntity, interactAt, interactFirst, isBurning, isEating, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isOutsideBorder, isPushedByWater, isRiding, isSilent, isSneaking, isSprinting, isWet, moveEntity, moveFlying, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onDataWatcherUpdate, onKillEntity, onStruckByLightning, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, replaceItemInInventory, resetHeight, sendCommandFeedback, setAir, setAlwaysRenderNameTag, setAngles, setCustomNameTag, setDead, setEating, setEntityBoundingBox, setEntityId, setFire, setFlag, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPosition, setPositionAndRotation, setPositionAndUpdate, setRotation, setSilent, setSize, setSneaking, setVelocity, setWorld, shouldSetPosAfterLoading, spawnRunningParticles, toNBT, toString, travelToDimension, updateRiderPosition, verifyExplosion, writeMountToNBT, writeToNBT, writeToNBTOptional
-
Methods inherited from class net.zxmushroom63.plugins.BaseData
execFuncBaseData, execFuncObject, execFuncString, getBaseData, getBaseDataArr, getBoolean, getBooleanArr, getByte, getByteArr, getChar, getCharArr, getDouble, getDoubleArr, getFloat, getFloatArr, getInt, getIntArr, getObject, getObjectArr, getShort, getShortArr, getString, getStringArr, has, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setCallbackBoolean, setCallbackBooleanArr, setCallbackBooleanArrWithDataArg, setCallbackBooleanWithDataArg, setCallbackDouble, setCallbackDoubleArr, setCallbackDoubleArrWithDataArg, setCallbackDoubleWithDataArg, setCallbackFloat, setCallbackFloatArr, setCallbackFloatArrWithDataArg, setCallbackFloatWithDataArg, setCallbackInt, setCallbackIntArr, setCallbackIntArrWithDataArg, setCallbackIntWithDataArg, setCallbackObject, setCallbackObjectArr, setCallbackObjectArrWithDataArg, setCallbackObjectWithDataArg, setCallbackString, setCallbackStringArr, setCallbackStringArrWithDataArg, setCallbackStringWithDataArg, setCallbackVoid, setCallbackVoidWithDataArg, setNull
-
-
-
-
Field Detail
-
isSwingInProgress
public boolean isSwingInProgress
-
swingProgressInt
public int swingProgressInt
-
arrowHitTimer
public int arrowHitTimer
-
hurtTime
public int hurtTime
-
maxHurtTime
public int maxHurtTime
-
attackedAtYaw
public float attackedAtYaw
-
deathTime
public int deathTime
-
prevSwingProgress
public float prevSwingProgress
-
swingProgress
public float swingProgress
-
prevLimbSwingAmount
public float prevLimbSwingAmount
-
limbSwingAmount
public float limbSwingAmount
-
limbSwing
public float limbSwing
-
maxHurtResistantTime
public int maxHurtResistantTime
-
prevCameraPitch
public float prevCameraPitch
-
cameraPitch
public float cameraPitch
-
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
-
prevRotationYawHead
public float prevRotationYawHead
-
jumpMovementFactor
public float jumpMovementFactor
+ A factor used to determine how far this entity will move each tick if it is jumping or falling.
-
attackingPlayer
protected EntityPlayer attackingPlayer
-
recentlyHit
protected int recentlyHit
-
dead
protected boolean dead
-
entityAge
protected int entityAge
-
prevOnGroundSpeedFactor
protected float prevOnGroundSpeedFactor
-
onGroundSpeedFactor
protected float onGroundSpeedFactor
-
movedDistance
protected float movedDistance
-
prevMovedDistance
protected float prevMovedDistance
-
field_70741_aB
protected float field_70741_aB
-
scoreValue
protected int scoreValue
-
lastDamage
protected float lastDamage
-
isJumping
protected boolean isJumping
-
moveStrafing
public float moveStrafing
-
moveForward
public float moveForward
-
randomYawVelocity
protected float randomYawVelocity
-
newPosRotationIncrements
protected int newPosRotationIncrements
-
newPosX
protected double newPosX
-
newPosY
protected double newPosY
-
newPosZ
protected double newPosZ
-
newRotationYaw
protected double newRotationYaw
-
newRotationPitch
protected double newRotationPitch
-
-
Constructor Detail
-
EntityLivingBase
public EntityLivingBase(World worldIn)
-
-
Method Detail
-
onKillCommand
public void onKillCommand()
+ Called by the /kill command.- Overrides:
onKillCommand
in classEntity
-
loadPluginData
public void loadPluginData(BaseData data)
- Overrides:
loadPluginData
in classEntity
-
makePluginData
public PluginData makePluginData()
- Overrides:
makePluginData
in classEntity
-
entityInit
protected void entityInit()
- Specified by:
entityInit
in classEntity
-
applyEntityAttributes
protected void applyEntityAttributes()
-
updateFallState
protected void updateFallState(double d0, boolean flag, Block block, BlockPos blockpos)
- Overrides:
updateFallState
in classEntity
-
canBreatheUnderwater
public boolean canBreatheUnderwater()
-
onEntityUpdate
public void onEntityUpdate()
+ Gets called every tick from main Entity class- Overrides:
onEntityUpdate
in classEntity
-
isChild
public boolean isChild()
+ If Animal, checks if the age timer is negative
-
onDeathUpdate
protected void onDeathUpdate()
+ handles entity death timer, experience orb and particle creation
-
canDropLoot
protected boolean canDropLoot()
+ Entity won't drop items or experience points if this returns false
-
decreaseAirSupply
protected int decreaseAirSupply(int parInt1)
+ Decrements the entity's air supply when underwater
-
getExperiencePoints
protected int getExperiencePoints(EntityPlayer player)
+ Get the experience points the entity currently has.
-
isPlayer
protected boolean isPlayer()
+ Only use is to identify if class is an instance of player for experience dropping
-
getRNG
public EaglercraftRandom getRNG()
-
getAITarget
public EntityLivingBase getAITarget()
-
getRevengeTimer
public int getRevengeTimer()
-
setRevengeTarget
public void setRevengeTarget(EntityLivingBase livingBase)
-
getLastAttacker
public EntityLivingBase getLastAttacker()
-
getLastAttackerTime
public int getLastAttackerTime()
-
setLastAttacker
public void setLastAttacker(Entity entityIn)
-
getAge
public int getAge()
-
writeEntityToNBT
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to write subclass entity data to NBT.- Specified by:
writeEntityToNBT
in classEntity
-
readEntityFromNBT
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to read subclass entity data from NBT.- Specified by:
readEntityFromNBT
in classEntity
-
updatePotionEffects
protected void updatePotionEffects()
-
updatePotionMetadata
protected void updatePotionMetadata()
+ Clears potion metadata values if the entity has no potion effects. Otherwise, updates potion effect color, ambience, and invisibility metadata values
-
resetPotionEffectMetadata
protected void resetPotionEffectMetadata()
+ Resets the potion effect color and ambience metadata values
-
clearActivePotions
public void clearActivePotions()
-
getActivePotionEffects
public java.util.Collection<PotionEffect> getActivePotionEffects()
-
isPotionActive
public boolean isPotionActive(int potionId)
-
isPotionActive
public boolean isPotionActive(Potion potionIn)
-
getActivePotionEffect
public PotionEffect getActivePotionEffect(Potion potionIn)
+ returns the PotionEffect for the supplied Potion if it is active, null otherwise.
-
addPotionEffect
public void addPotionEffect(PotionEffect potioneffectIn)
+ adds a PotionEffect to the entity
-
isPotionApplicable
public boolean isPotionApplicable(PotionEffect potioneffectIn)
-
isEntityUndead
public boolean isEntityUndead()
+ Returns true if this entity is undead.
-
removePotionEffectClient
public void removePotionEffectClient(int potionId)
+ Remove the speified potion effect from this entity.
-
removePotionEffect
public void removePotionEffect(int potionId)
+ Remove the specified potion effect from this entity.
-
onNewPotionEffect
protected void onNewPotionEffect(PotionEffect potioneffect)
-
onChangedPotionEffect
protected void onChangedPotionEffect(PotionEffect potioneffect, boolean flag)
-
onFinishedPotionEffect
protected void onFinishedPotionEffect(PotionEffect potioneffect)
-
heal
public void heal(float f)
+ Heal living entity (param: amount of half-hearts)
-
getHealth
public final float getHealth()
-
setHealth
public void setHealth(float health)
-
attackEntityFrom
public boolean attackEntityFrom(DamageSource damagesource, float f)
+ Called when the entity is attacked.- Overrides:
attackEntityFrom
in classEntity
-
renderBrokenItemStack
public void renderBrokenItemStack(ItemStack stack)
+ Renders broken item particles using the given ItemStack
-
onDeath
public void onDeath(DamageSource damagesource)
+ Called when the mob's health reaches 0.
-
dropEquipment
protected void dropEquipment(boolean parFlag, int parInt1)
+ Drop the equipment for this entity.
-
knockBack
public void knockBack(Entity entityIn, float parFloat1, double parDouble1, double parDouble2)
+ knocks back this entity
-
getHurtSound
protected java.lang.String getHurtSound()
+ Returns the sound this mob makes when it is hurt.
-
getDeathSound
protected java.lang.String getDeathSound()
+ Returns the sound this mob makes on death.
-
addRandomDrop
protected void addRandomDrop()
+ Causes this Entity to drop a random item.
-
dropFewItems
protected void dropFewItems(boolean parFlag, int parInt1)
+ Drop 0-2 items of this living's type
-
isOnLadder
public boolean isOnLadder()
+ returns true if this entity is by a ladder, false otherwise
-
isEntityAlive
public boolean isEntityAlive()
+ Checks whether target entity is alive.- Overrides:
isEntityAlive
in classEntity
-
getFallSoundString
protected java.lang.String getFallSoundString(int damageValue)
-
performHurtAnimation
public void performHurtAnimation()
+ Setups the entity to do the hurt animation. Only used by packets in multiplayer.- Overrides:
performHurtAnimation
in classEntity
-
getTotalArmorValue
public int getTotalArmorValue()
+ Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
-
damageArmor
protected void damageArmor(float parFloat1)
-
applyArmorCalculations
protected float applyArmorCalculations(DamageSource source, float damage)
+ Reduces damage, depending on armor
-
applyPotionDamageCalculations
protected float applyPotionDamageCalculations(DamageSource source, float damage)
+ Reduces damage, depending on potions
-
damageEntity
protected void damageEntity(DamageSource damagesource, float f)
+ Deals damage to the entity. If its a EntityPlayer then will take damage from the armor first and then health second with the reduced value. Args: damageAmount
-
getCombatTracker
public CombatTracker getCombatTracker()
-
func_94060_bK
public EntityLivingBase func_94060_bK()
-
getMaxHealth
public final float getMaxHealth()
-
getArrowCountInEntity
public final int getArrowCountInEntity()
+ counts the amount of arrows stuck in the entity. getting hit by arrows increases this, used in rendering
-
setArrowCountInEntity
public final void setArrowCountInEntity(int count)
+ sets the amount of arrows stuck in the entity. used for rendering those
-
swingItem
public void swingItem()
+ Swings the item the player is holding.
-
handleStatusUpdate
public void handleStatusUpdate(byte b0)
- Overrides:
handleStatusUpdate
in classEntity
-
kill
protected void kill()
+ sets the dead flag. Used when you fall off the bottom of the world.
-
updateArmSwingProgress
protected void updateArmSwingProgress()
+ Updates the arm swing progress counters and animation progress
-
getEntityAttribute
public IAttributeInstance getEntityAttribute(IAttribute attribute)
-
getAttributeMap
public BaseAttributeMap getAttributeMap()
-
getCreatureAttribute
public EnumCreatureAttribute getCreatureAttribute()
+ Get this Entity's EnumCreatureAttribute
-
getHeldItem
public abstract ItemStack getHeldItem()
-
getEquipmentInSlot
public abstract ItemStack getEquipmentInSlot(int var1)
-
getCurrentArmor
public abstract ItemStack getCurrentArmor(int var1)
-
setCurrentItemOrArmor
public abstract void setCurrentItemOrArmor(int var1, ItemStack var2)
Description copied from class:Entity
+ Sets the held item, or an armor slot. Slot 0 is held item. Slot 1-4 is armor. Params: Item, slot- Overrides:
setCurrentItemOrArmor
in classEntity
-
setSprinting
public void setSprinting(boolean flag)
+ Set sprinting switch for Entity.- Overrides:
setSprinting
in classEntity
-
getInventory
public abstract ItemStack[] getInventory()
Description copied from class:Entity
+ returns the inventory of this entity (only used in EntityPlayerMP it seems)- Overrides:
getInventory
in classEntity
-
getSoundVolume
protected float getSoundVolume()
+ Returns the volume for the sounds this mob makes.
-
getSoundPitch
protected float getSoundPitch()
+ Gets the pitch of living sounds in living entities.
-
isMovementBlocked
protected boolean isMovementBlocked()
+ Dead and sleeping entities cannot move
-
dismountEntity
public void dismountEntity(Entity parEntity)
+ Moves the entity to a position out of the way of its mount.
-
getAlwaysRenderNameTagForRender
public boolean getAlwaysRenderNameTagForRender()
- Overrides:
getAlwaysRenderNameTagForRender
in classEntity
-
getJumpUpwardsMotion
protected float getJumpUpwardsMotion()
-
jump
protected void jump()
+ Causes this entity to do an upwards motion (jumping).
-
updateAITick
protected void updateAITick()
+ main AI tick function, replaces updateEntityActionState
-
handleJumpLava
protected void handleJumpLava()
-
moveEntityWithHeading
public void moveEntityWithHeading(float f, float f1)
+ Moves the entity based on the specified heading. Args: strafe, forward
-
getAIMoveSpeed
public float getAIMoveSpeed()
+ the movespeed used for the new AI system
-
setAIMoveSpeed
public void setAIMoveSpeed(float speedIn)
+ set the movespeed used for the new AI system
-
attackEntityAsMob
public boolean attackEntityAsMob(Entity entityIn)
-
isPlayerSleeping
public boolean isPlayerSleeping()
+ Returns whether player is sleeping or not
-
onUpdate
public void onUpdate()
+ Called to update the entity's position/logic.
-
func_110146_f
protected float func_110146_f(float parFloat1, float parFloat2)
-
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.
-
updateEntityActionState
protected void updateEntityActionState()
-
collideWithNearbyEntities
protected void collideWithNearbyEntities()
-
collideWithEntity
protected void collideWithEntity(Entity parEntity)
-
mountEntity
public void mountEntity(Entity entity)
+ Called when a player mounts an entity. e.g. mounts a pig, mounts a boat.- Overrides:
mountEntity
in classEntity
-
updateRidden
public void updateRidden()
+ Handles updating while being ridden by an entity- Overrides:
updateRidden
in classEntity
-
setPositionAndRotation2
public void setPositionAndRotation2(double d0, double d1, double d2, float f, float f1, int i, boolean var10)
- Overrides:
setPositionAndRotation2
in classEntity
-
setJumping
public void setJumping(boolean parFlag)
-
onItemPickup
public void onItemPickup(Entity entity, int var2)
+ Called whenever an item is picked up from walking over it. Args: pickedUpEntity, stackSize
-
canEntityBeSeen
public boolean canEntityBeSeen(Entity entityIn)
+ returns true if the entity provided in the argument can be seen. (Raytrace)
-
getLookVec
public Vec3 getLookVec()
+ returns a (normalized) vector of where this entity is looking- Overrides:
getLookVec
in classEntity
-
getSwingProgress
public float getSwingProgress(float partialTickTime)
+ Returns where in the swing animation the living entity is (from 0 to 1). Args: partialTickTime
-
isServerWorld
public boolean isServerWorld()
+ Returns whether the entity is in a server world
-
canBeCollidedWith
public boolean canBeCollidedWith()
+ Returns true if other Entities should be prevented from moving through this Entity.- Overrides:
canBeCollidedWith
in classEntity
-
canBePushed
public boolean canBePushed()
+ Returns true if this entity should push and be pushed by other entities when colliding.- Overrides:
canBePushed
in classEntity
-
setBeenAttacked
protected void setBeenAttacked()
+ Sets that this entity has been attacked.- Overrides:
setBeenAttacked
in classEntity
-
getRotationYawHead
public float getRotationYawHead()
- Overrides:
getRotationYawHead
in classEntity
-
setRotationYawHead
public void setRotationYawHead(float f)
+ Sets the head's yaw rotation of the entity.- Overrides:
setRotationYawHead
in classEntity
-
func_181013_g
public void func_181013_g(float f)
- Overrides:
func_181013_g
in classEntity
-
getAbsorptionAmount
public float getAbsorptionAmount()
-
setAbsorptionAmount
public void setAbsorptionAmount(float amount)
-
getTeam
public Team getTeam()
-
isOnSameTeam
public boolean isOnSameTeam(EntityLivingBase otherEntity)
-
isOnTeam
public boolean isOnTeam(Team parTeam)
+ Returns true if the entity is on a specific team.
-
sendEnterCombat
public void sendEnterCombat()
+ Sends an ENTER_COMBAT packet to the client
-
sendEndCombat
public void sendEndCombat()
+ Sends an END_COMBAT packet to the client
-
markPotionsDirty
protected void markPotionsDirty()
-
-