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 intarrowHitTimerfloatattackedAtYawprotected EntityPlayerattackingPlayerfloatcameraPitchprotected booleandeadintdeathTimeprotected intentityAgeprotected floatfield_70741_aBfloatfield_70769_aofloatfield_70770_apinthurtTimeprotected booleanisJumpingbooleanisSwingInProgressfloatjumpMovementFactor+ A factor used to determine how far this entity will move each tick if it is jumping or falling.protected floatlastDamagefloatlimbSwingfloatlimbSwingAmountintmaxHurtResistantTimeintmaxHurtTimeprotected floatmovedDistancefloatmoveForwardfloatmoveStrafingprotected intnewPosRotationIncrementsprotected doublenewPosXprotected doublenewPosYprotected doublenewPosZprotected doublenewRotationPitchprotected doublenewRotationYawprotected floatonGroundSpeedFactorfloatprevCameraPitchfloatprevLimbSwingAmountprotected floatprevMovedDistanceprotected floatprevOnGroundSpeedFactorfloatprevRenderYawOffsetfloatprevRotationYawHeadfloatprevSwingProgressprotected floatrandomYawVelocityprotected intrecentlyHitfloatrenderYawOffsetfloatrotationYawHeadprotected intscoreValuefloatswingProgressintswingProgressInt-
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 voidaddPotionEffect(PotionEffect potioneffectIn)+ adds a PotionEffect to the entityprotected voidaddRandomDrop()+ Causes this Entity to drop a random item.protected floatapplyArmorCalculations(DamageSource source, float damage)+ Reduces damage, depending on armorprotected voidapplyEntityAttributes()protected floatapplyPotionDamageCalculations(DamageSource source, float damage)+ Reduces damage, depending on potionsbooleanattackEntityAsMob(Entity entityIn)booleanattackEntityFrom(DamageSource damagesource, float f)+ Called when the entity is attacked.booleancanBeCollidedWith()+ Returns true if other Entities should be prevented from moving through this Entity.booleancanBePushed()+ Returns true if this entity should push and be pushed by other entities when colliding.booleancanBreatheUnderwater()protected booleancanDropLoot()+ Entity won't drop items or experience points if this returns falsebooleancanEntityBeSeen(Entity entityIn)+ returns true if the entity provided in the argument can be seen.voidclearActivePotions()protected voidcollideWithEntity(Entity parEntity)protected voidcollideWithNearbyEntities()protected voiddamageArmor(float parFloat1)protected voiddamageEntity(DamageSource damagesource, float f)+ Deals damage to the entity.protected intdecreaseAirSupply(int parInt1)+ Decrements the entity's air supply when underwatervoiddismountEntity(Entity parEntity)+ Moves the entity to a position out of the way of its mount.protected voiddropEquipment(boolean parFlag, int parInt1)+ Drop the equipment for this entity.protected voiddropFewItems(boolean parFlag, int parInt1)+ Drop 0-2 items of this living's typeprotected voidentityInit()voidfall(float f, float f1)protected floatfunc_110146_f(float parFloat1, float parFloat2)voidfunc_181013_g(float f)EntityLivingBasefunc_94060_bK()floatgetAbsorptionAmount()PotionEffectgetActivePotionEffect(Potion potionIn)+ returns the PotionEffect for the supplied Potion if it is active, null otherwise.java.util.Collection<PotionEffect>getActivePotionEffects()intgetAge()floatgetAIMoveSpeed()+ the movespeed used for the new AI systemEntityLivingBasegetAITarget()booleangetAlwaysRenderNameTagForRender()intgetArrowCountInEntity()+ counts the amount of arrows stuck in the entity.BaseAttributeMapgetAttributeMap()CombatTrackergetCombatTracker()EnumCreatureAttributegetCreatureAttribute()+ Get this Entity's EnumCreatureAttributeabstract ItemStackgetCurrentArmor(int var1)protected java.lang.StringgetDeathSound()+ Returns the sound this mob makes on death.IAttributeInstancegetEntityAttribute(IAttribute attribute)abstract ItemStackgetEquipmentInSlot(int var1)protected intgetExperiencePoints(EntityPlayer player)+ Get the experience points the entity currently has.protected java.lang.StringgetFallSoundString(int damageValue)floatgetHealth()abstract ItemStackgetHeldItem()protected java.lang.StringgetHurtSound()+ 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 floatgetJumpUpwardsMotion()EntityLivingBasegetLastAttacker()intgetLastAttackerTime()Vec3getLook(float f)+ interpolated look vectorVec3getLookVec()+ returns a (normalized) vector of where this entity is lookingfloatgetMaxHealth()intgetRevengeTimer()EaglercraftRandomgetRNG()floatgetRotationYawHead()protected floatgetSoundPitch()+ Gets the pitch of living sounds in living entities.protected floatgetSoundVolume()+ Returns the volume for the sounds this mob makes.floatgetSwingProgress(float partialTickTime)+ Returns where in the swing animation the living entity is (from 0 to 1).TeamgetTeam()intgetTotalArmorValue()+ Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValueprotected voidhandleJumpLava()voidhandleStatusUpdate(byte b0)voidheal(float f)+ Heal living entity (param: amount of half-hearts)booleanisChild()+ If Animal, checks if the age timer is negativebooleanisEntityAlive()+ Checks whether target entity is alive.booleanisEntityUndead()+ Returns true if this entity is undead.protected booleanisMovementBlocked()+ Dead and sleeping entities cannot movebooleanisOnLadder()+ returns true if this entity is by a ladder, false otherwisebooleanisOnSameTeam(EntityLivingBase otherEntity)booleanisOnTeam(Team parTeam)+ Returns true if the entity is on a specific team.protected booleanisPlayer()+ Only use is to identify if class is an instance of player for experience droppingbooleanisPlayerSleeping()+ Returns whether player is sleeping or notbooleanisPotionActive(int potionId)booleanisPotionActive(Potion potionIn)booleanisPotionApplicable(PotionEffect potioneffectIn)booleanisServerWorld()+ Returns whether the entity is in a server worldprotected voidjump()+ Causes this entity to do an upwards motion (jumping).protected voidkill()+ sets the dead flag.voidknockBack(Entity entityIn, float parFloat1, double parDouble1, double parDouble2)+ knocks back this entityvoidloadPluginData(BaseData data)PluginDatamakePluginData()protected voidmarkPotionsDirty()voidmountEntity(Entity entity)+ Called when a player mounts an entity.voidmoveEntityWithHeading(float f, float f1)+ Moves the entity based on the specified heading.protected voidonChangedPotionEffect(PotionEffect potioneffect, boolean flag)voidonDeath(DamageSource damagesource)+ Called when the mob's health reaches 0.protected voidonDeathUpdate()+ handles entity death timer, experience orb and particle creationvoidonEntityUpdate()+ Gets called every tick from main Entity classprotected voidonFinishedPotionEffect(PotionEffect potioneffect)voidonItemPickup(Entity entity, int var2)+ Called whenever an item is picked up from walking over it.voidonKillCommand()+ Called by the /kill command.voidonLivingUpdate()+ Called frequently so the entity can update its state every tick as required.protected voidonNewPotionEffect(PotionEffect potioneffect)voidonUpdate()+ Called to update the entity's position/logic.voidperformHurtAnimation()+ Setups the entity to do the hurt animation.voidreadEntityFromNBT(NBTTagCompound nbttagcompound)+ (abstract) Protected helper method to read subclass entity data from NBT.voidremovePotionEffect(int potionId)+ Remove the specified potion effect from this entity.voidremovePotionEffectClient(int potionId)+ Remove the speified potion effect from this entity.voidrenderBrokenItemStack(ItemStack stack)+ Renders broken item particles using the given ItemStackprotected voidresetPotionEffectMetadata()+ Resets the potion effect color and ambience metadata valuesvoidsendEndCombat()+ Sends an END_COMBAT packet to the clientvoidsendEnterCombat()+ Sends an ENTER_COMBAT packet to the clientvoidsetAbsorptionAmount(float amount)voidsetAIMoveSpeed(float speedIn)+ set the movespeed used for the new AI systemvoidsetArrowCountInEntity(int count)+ sets the amount of arrows stuck in the entity.protected voidsetBeenAttacked()+ Sets that this entity has been attacked.abstract voidsetCurrentItemOrArmor(int var1, ItemStack var2)+ Sets the held item, or an armor slot.voidsetHealth(float health)voidsetJumping(boolean parFlag)voidsetLastAttacker(Entity entityIn)voidsetPositionAndRotation2(double d0, double d1, double d2, float f, float f1, int i, boolean var10)voidsetRevengeTarget(EntityLivingBase livingBase)voidsetRotationYawHead(float f)+ Sets the head's yaw rotation of the entity.voidsetSprinting(boolean flag)+ Set sprinting switch for Entity.voidswingItem()+ Swings the item the player is holding.protected voidupdateAITick()+ main AI tick function, replaces updateEntityActionStateprotected voidupdateArmSwingProgress()+ Updates the arm swing progress counters and animation progressprotected voidupdateEntityActionState()protected voidupdateFallState(double d0, boolean flag, Block block, BlockPos blockpos)protected voidupdatePotionEffects()protected voidupdatePotionMetadata()+ Clears potion metadata values if the entity has no potion effects.voidupdateRidden()+ Handles updating while being ridden by an entityvoidwriteEntityToNBT(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:
onKillCommandin classEntity
-
loadPluginData
public void loadPluginData(BaseData data)
- Overrides:
loadPluginDatain classEntity
-
makePluginData
public PluginData makePluginData()
- Overrides:
makePluginDatain classEntity
-
entityInit
protected void entityInit()
- Specified by:
entityInitin classEntity
-
applyEntityAttributes
protected void applyEntityAttributes()
-
updateFallState
protected void updateFallState(double d0, boolean flag, Block block, BlockPos blockpos)- Overrides:
updateFallStatein classEntity
-
canBreatheUnderwater
public boolean canBreatheUnderwater()
-
onEntityUpdate
public void onEntityUpdate()
+ Gets called every tick from main Entity class- Overrides:
onEntityUpdatein 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:
writeEntityToNBTin classEntity
-
readEntityFromNBT
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to read subclass entity data from NBT.- Specified by:
readEntityFromNBTin 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:
attackEntityFromin 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:
isEntityAlivein 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:
performHurtAnimationin 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:
handleStatusUpdatein 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:
setCurrentItemOrArmorin classEntity
-
setSprinting
public void setSprinting(boolean flag)
+ Set sprinting switch for Entity.- Overrides:
setSprintingin classEntity
-
getInventory
public abstract ItemStack[] getInventory()
Description copied from class:Entity+ returns the inventory of this entity (only used in EntityPlayerMP it seems)- Overrides:
getInventoryin 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:
getAlwaysRenderNameTagForRenderin 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:
mountEntityin classEntity
-
updateRidden
public void updateRidden()
+ Handles updating while being ridden by an entity- Overrides:
updateRiddenin classEntity
-
setPositionAndRotation2
public void setPositionAndRotation2(double d0, double d1, double d2, float f, float f1, int i, boolean var10)- Overrides:
setPositionAndRotation2in 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:
getLookVecin 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:
canBeCollidedWithin classEntity
-
canBePushed
public boolean canBePushed()
+ Returns true if this entity should push and be pushed by other entities when colliding.- Overrides:
canBePushedin classEntity
-
setBeenAttacked
protected void setBeenAttacked()
+ Sets that this entity has been attacked.- Overrides:
setBeenAttackedin classEntity
-
getRotationYawHead
public float getRotationYawHead()
- Overrides:
getRotationYawHeadin classEntity
-
setRotationYawHead
public void setRotationYawHead(float f)
+ Sets the head's yaw rotation of the entity.- Overrides:
setRotationYawHeadin classEntity
-
func_181013_g
public void func_181013_g(float f)
- Overrides:
func_181013_gin 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()
-
-