Package net.minecraft.src
Class EntityLivingBase
java.lang.Object
net.minecraft.src.Entity
net.minecraft.src.EntityLivingBase
- Direct Known Subclasses:
EntityLiving,EntityPlayer
-
Field Summary
FieldsModifier and TypeFieldDescriptionintfloatThe yaw at which this entity was last attacked from.protected EntityPlayerThe most recent player that has attacked this entityintfloatprotected booleanThis gets set on entity death, but never used.intThe amount of time remaining this entity should act 'dead', i.e. have a corpse in the world.protected intHolds the living entity age, used to control the despawn.protected EntityLivingBaseis only being set, has no uses as of MC 1.1protected floatprotected floatprotected floatprotected floatprotected floatfloatfloatintThe amount of time remaining this entity should act 'hurt'.protected booleanused to check whether entity is jumping.boolean// +++START EDIT+++ Tells if a creature has shed its mortal coil.booleanWhether an arm swing is currently in progress.floatA factor used to determine how far this entity will move each tick if it is jumping or falling.protected floatA factor used to determine how far this entity will move each tick if it is walking on land.protected floatDamage taken in the last hit.floatOnly relevant when limbYaw is not 0(the entity is moving).floatintintWhat the hurt time was max set to last.floatfloatprotected intThe number of updates over which the new position and rotation are to be applied to the entity.protected doubleThe new X position to be applied to the entity.protected doubleThe new Y position to be applied to the entity.protected doubleprotected doubleThe new yaw rotation to be applied to the entity.protected doubleThe new yaw rotation to be applied to the entity.static final intfloatfloatfloatfloatfloatEntity head rotation yaw at previous tickfloatprotected floatprotected intSet to 60 when hit by the player or the player's wolf, then decrements.protected intfloatprotected intprotected intfloatEntity head rotation yawprotected intThe score value of the Mob, the amount of points the mob is worth.floatintFields inherited from class net.minecraft.src.Entity
addedToChunk, boundingBox, 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, lastGroundPosX, lastGroundPosY, lastGroundPosZ, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, nextBlockCheckDistance, 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPotionEffect(PotionEffect par1PotionEffect) adds a PotionEffect to the entityprotected floatapplyArmorCalculations(DamageSource damageSource, float damageAmount) Reduces damage, depending on armorprotected voidprotected floatapplyPotionDamageCalculations(DamageSource par1DamageSource, float par2) Reduces damage, depending on potionsbooleanattackEntityAsMob(Entity par1Entity) booleanattackEntityFrom(DamageSource par1DamageSource, float par2) Called when the entity is attacked.booleanReturns true if other Entities should be prevented from moving through this Entity.booleanReturns true if this entity should push and be pushed by other entities when colliding.booleanbooleancanEntityBeSeen(Entity par1Entity) returns true if the entity provided in the argument can be seen.booleancanJump()booleanbooleancanSwim()protected voidcheckForHeadDrop(DamageSource source, int iLootingModifier) protected voidcheckForRareDrop(DamageSource source, int iLootingModifier) voidvoidprotected voidcollideWithEntity(Entity par1Entity) protected voidprotected voiddamageArmor(float par1) protected voiddamageEntity(DamageSource par1DamageSource, float par2) Deals damage to the entity.protected intdecreaseAirSupply(int par1) Decrements the entity's air supply when underwatervoiddismountEntity(Entity par1Entity) Moves the entity to a position out of the way of its mount.protected voiddropEquipment(boolean par1, int par2) Drop the equipment for this entity.protected voiddropFewItems(boolean par1, int par2) Drop 0-2 items of this living's type.protected voiddropHead()protected voiddropRareDrop(int par1) protected voidprotected voidentityLivingBaseFall(float par1) voidentityLivingOnDeath(DamageSource source) protected voidfall(float par1) Called when the mob is falling.protected floatfunc_110146_f(float par1, float par2) intfloatgetActivePotionEffect(Potion par1Potion) returns the PotionEffect for the supplied Potion if it is active, null otherwise.intgetAge()floatthe movespeed used for the new AI systembooleanprotected intfinal intcounts the amount of arrows stuck in the entity. getting hit by arrows increases this, used in renderingGet this Entity's EnumCreatureAttributeabstract ItemStackgetCurrentItemOrArmor(int var1) 0 = item, 1-n is armorprotected StringReturns the sound this mob makes on death.floatgetEntityAttribute(Attribute par1Attribute) protected intgetExperiencePoints(EntityPlayer par1EntityPlayer) Get the experience points the entity currently has.floatfinal floatprotected floatabstract ItemStackReturns the item that this EntityLiving is holding, if any.protected StringReturns the sound this mob makes when it is hurt.getItemIcon(ItemStack par1ItemStack, int par2) Gets the Icon Index of the item currently heldprotected floatprotected floatabstract ItemStack[]intgetLook(float par1) interpolated look vectorreturns a (normalized) vector of where this entity is lookingfinal floatintgetMeleeAttackStrength(Entity target) Deprecated.getPosition(float par1) interpolated position vectorgetRNG()floatfloatgetSlipperinessRelativeToBlock(int iBlockID) protected floatGets the pitch of living sounds in living entities.protected floatReturns the volume for the sounds this mob makes.floatprotected floatfloatgetSwingProgress(float par1) Returns where in the swing animation the living entity is (from 0 to 1).getTeam()intReturns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValuevoidhandleHealthUpdate(byte par1) voidheal(float par1) Heal living entity (param: amount of half-hearts)protected booleanReturns true if the newer Entity AI code should be runbooleanisChild()If Animal, checks if the age timer is negativebooleanReturns whether the entity is in a local (client) worldbooleanChecks whether target entity is alive.booleanReturns true if this entity is undead.protected booleanDead and sleeping entities cannot movebooleanreturns true if this entity is by a ladder, false otherwisebooleanisOnSameTeam(EntityLivingBase par1EntityLivingBase) booleanReturns 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 droppingbooleanReturns whether player is sleeping or notbooleanisPotionActive(int par1) booleanisPotionActive(Potion par1Potion) booleanisPotionApplicable(PotionEffect par1PotionEffect) booleanprotected booleanvoidjump()Causes this entity to do an upwards motion (jumping).protected voidkill()sets the dead flag.voidknocks back this entityfloatmouseOverCustomRayTrace(double dDistance, float fInterpolationFactor) voidmoveEntityWithHeading(float par1, float par2) Moves the entity based on the specified heading.protected voidonChangedPotionEffect(PotionEffect par1PotionEffect, boolean par2) voidonDeath(DamageSource source) Called when the mob's health reaches 0.protected voidhandles entity death timer, experience orb and particle creationvoidGets called every tick from main Entity classprotected voidonFinishedPotionEffect(PotionEffect par1PotionEffect) voidonItemPickup(Entity par1Entity, int par2) Called whenever an item is picked up from walking over it.voidCalled frequently so the entity can update its state every tick as required.protected voidonNewPotionEffect(PotionEffect par1PotionEffect) voidonUpdate()Called to update the entity's position/logic.voidSetups the entity to do the hurt animation.rayTrace(double par1, float par3) Performs a ray trace for the distance specified and using the partial tick time.voidreadEntityFromNBT(NBTTagCompound par1NBTTagCompound) (abstract) Protected helper method to read subclass entity data from NBT.protected voidvoidremovePotionEffect(int par1) Remove the specified potion effect from this entity.voidremovePotionEffectClient(int par1) Remove the speified potion effect from this entity.voidrenderBrokenItemStack(ItemStack par1ItemStack) Renders broken item particles using the given ItemStackvoidsetAbsorptionAmount(float par1) voidsetAIMoveSpeed(float par1) set the movespeed used for the new AI systemfinal voidsetArrowCountInEntity(int par1) sets the amount of arrows stuck in the entity. used for rendering thosevoidSets that this entity has been attacked.abstract voidsetCurrentItemOrArmor(int var1, ItemStack var2) Sets the held item, or an armor slot.voidsetHealth(float par1) voidsetJumping(boolean par1) voidsetLastAttacker(Entity par1Entity) voidsetPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) Sets the position and rotation.voidsetPositionAndUpdate(double par1, double par3, double par5) Move the entity to the coordinates informed, but keep yaw/pitch values.voidsetRevengeTarget(EntityLivingBase par1EntityLivingBase) voidsetRotationYawHead(float par1) Sets the head's yaw rotation of the entity.voidsetSprinting(boolean par1) Set sprinting switch for Entity.voidSwings the item the player is holding.protected voidprotected voidmain AI tick function, replaces updateEntityActionStateprotected voidUpdates the arm swing progress counters and animation progressprotected voidprotected voidupdateFallState(double par1, boolean par3) Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance and deal fall damage if landing on the ground.protected voidvoidHandles updating while being ridden by an entityvoidwriteEntityToNBT(NBTTagCompound par1NBTTagCompound) (abstract) Protected helper method to write subclass entity data to NBT.Methods inherited from class net.minecraft.src.Entity
addComponent, addEntityCrashInfo, addToPlayerScore, addVelocity, appliesConstantForceWhenRidingBoat, applyEntityCollision, attractsLightning, canAttackWithItem, canCollideWithEntity, canEntityTriggerTripwire, canRenderOnFire, canTriggerWalking, copyDataFrom, copyLocationAndAnglesFrom, dealFireDamage, doBlockCollisions, doesEntityApplyToSpawnCap, doesEntityApplyToSquidPossessionCap, doesEntityNotTriggerPressurePlate, doesNotDismountInWater, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, flagAllWatchedObjectsDirty, flingAwayFromEntity, getAir, getAnimalKickMovementMultiplier, getBlockExplosionResistance, getBoundingBox, getBrightness, getBrightnessForRender, getCanBeHeadCrabbed, getCollisionBorderSize, getCollisionBox, getComponent, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityName, getEntityString, getFlag, getHeadCrabSharedAttackTarget, getMaxInPortalTime, getMaxSafePointTries, getMountedYOffset, getParts, getPortalCooldown, getShadowSize, getTeleportDirection, getTranslatedEntityName, getUniqueID, getVisualBoundingBox, getXZDistanceSqToEntity, getYOffset, handleLavaMovement, handleWaterMovement, hasComponent, hashCode, hasHeadCrabbedSquid, hitByEntity, initComponents, interactFirst, isAffectedByMovementModifiers, isBeingRainedOn, isBurning, isEating, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInsideOpaqueBlock, isEntityInsideSuffocatingBlock, isEntityInsideSuffocatingBlock, isEntityInvulnerable, isImmuneToFire, isImmuneToHeadCrabDamage, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isItemEntity, isOffsetPositionInLiquid, isPushedByWater, isRiding, isSecondaryTargetForSquid, isSneaking, isSprinting, isUsingSpecialKey, isValidOngoingAttackTargetForSquid, isValidZombieSecondaryTarget, isWet, mountEntity, mountEntityRemote, moveEntity, moveFlying, movementModifierWhenRidingBoat, newDoubleNBTList, newFloatNBTList, notifyOfWolfHowl, onBlockDispenserConsume, onChunkLoad, onCollideWithPlayer, onFlungBySquidTentacle, onHeadCrabbedBySquid, onKickedByAnimal, onKillEntity, onPossessedRidingEntityDeath, onStruckByLightning, outOfUpdateRangeUpdate, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, readFromNBT, setAir, setAngles, setDead, setEating, setFire, setFlag, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setPosition, setPositionAndRotation, setRotation, setSize, setSneaking, setVelocity, setWorld, shouldExplodeBlock, shouldSetPosAfterLoading, shouldSetPositionOnLoad, toString, travelToDimension, tryToSetFireToBlocksInContact, updateCloak, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptional
-
Field Details
-
recentlyOnChoppingBlockCountdown
protected int recentlyOnChoppingBlockCountdown -
onChoppingBlockMaxCountdown
public static final int onChoppingBlockMaxCountdown- See Also:
-
isLivingDead
public boolean isLivingDead// +++START EDIT+++ Tells if a creature has shed its mortal coil. Entity.isDead is whether an entity is flagged to be removed from the game // ---END EDIT--- -
isSwingInProgress
public boolean isSwingInProgressWhether an arm swing is currently in progress. -
swingProgressInt
public int swingProgressInt -
arrowHitTimer
public int arrowHitTimer -
prevHealth
public float prevHealth -
hurtTime
public int hurtTimeThe amount of time remaining this entity should act 'hurt'. (Visual appearance of red tint) -
maxHurtTime
public int maxHurtTimeWhat the hurt time was max set to last. -
attackedAtYaw
public float attackedAtYawThe yaw at which this entity was last attacked from. -
deathTime
public int deathTimeThe amount of time remaining this entity should act 'dead', i.e. have a corpse in the world. -
attackTime
public int attackTime -
prevSwingProgress
public float prevSwingProgress -
swingProgress
public float swingProgress -
prevLimbSwingAmount
public float prevLimbSwingAmount -
limbSwingAmount
public float limbSwingAmount -
limbSwing
public float limbSwingOnly relevant when limbYaw is not 0(the entity is moving). Influences where in its swing legs and arms currently are. -
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 rotationYawHeadEntity head rotation yaw -
prevRotationYawHead
public float prevRotationYawHeadEntity head rotation yaw at previous tick -
jumpMovementFactor
public float jumpMovementFactorA factor used to determine how far this entity will move each tick if it is jumping or falling. -
attackingPlayer
The most recent player that has attacked this entity -
recentlyHit
protected int recentlyHitSet to 60 when hit by the player or the player's wolf, then decrements. Used to determine whether the entity should drop items on death. -
dead
protected boolean deadThis gets set on entity death, but never used. Looks like a duplicate of isDead -
entityAge
protected int entityAgeHolds the living entity age, used to control the despawn. -
field_70768_au
protected float field_70768_au -
field_110154_aX
protected float field_110154_aX -
field_70764_aw
protected float field_70764_aw -
field_70763_ax
protected float field_70763_ax -
field_70741_aB
protected float field_70741_aB -
scoreValue
protected int scoreValueThe score value of the Mob, the amount of points the mob is worth. -
lastDamage
protected float lastDamageDamage taken in the last hit. Mobs are resistant to damage less than this for a short time after taking damage. -
isJumping
protected boolean isJumpingused to check whether entity is jumping. -
moveStrafing
public float moveStrafing -
moveForward
public float moveForward -
randomYawVelocity
protected float randomYawVelocity -
newPosRotationIncrements
protected int newPosRotationIncrementsThe number of updates over which the new position and rotation are to be applied to the entity. -
newPosX
protected double newPosXThe new X position to be applied to the entity. -
newPosY
protected double newPosYThe new Y position to be applied to the entity. -
newPosZ
protected double newPosZ -
newRotationYaw
protected double newRotationYawThe new yaw rotation to be applied to the entity. -
newRotationPitch
protected double newRotationPitchThe new yaw rotation to be applied to the entity. -
entityLivingToAttack
is only being set, has no uses as of MC 1.1 -
revengeTimer
protected int revengeTimer -
revengeCountdown
protected int revengeCountdown -
landMovementFactor
protected float landMovementFactorA factor used to determine how far this entity will move each tick if it is walking on land. Adjusted by speed, and slipperiness of the current block.
-
-
Constructor Details
-
EntityLivingBase
-
-
Method Details
-
entityInit
protected void entityInit()- Specified by:
entityInitin classEntity
-
applyEntityAttributes
protected void applyEntityAttributes() -
updateFallState
protected void updateFallState(double par1, boolean par3) Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround- 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 -
decreaseAirSupply
protected int decreaseAirSupply(int par1) Decrements the entity's air supply when underwater -
getExperiencePoints
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
-
getAITarget
-
func_142015_aE
public int func_142015_aE() -
setRevengeTarget
-
getLastAttacker
-
getLastAttackerTime
public int getLastAttackerTime() -
setLastAttacker
-
getAge
public int getAge() -
writeEntityToNBT
(abstract) Protected helper method to write subclass entity data to NBT.- Specified by:
writeEntityToNBTin classEntity
-
readEntityFromNBT
(abstract) Protected helper method to read subclass entity data from NBT.- Specified by:
readEntityFromNBTin classEntity
-
updatePotionEffects
protected void updatePotionEffects() -
clearActivePotions
public void clearActivePotions() -
getActivePotionEffects
-
isPotionActive
public boolean isPotionActive(int par1) -
isPotionActive
-
getActivePotionEffect
returns the PotionEffect for the supplied Potion if it is active, null otherwise. -
addPotionEffect
adds a PotionEffect to the entity -
isPotionApplicable
-
isEntityUndead
public boolean isEntityUndead()Returns true if this entity is undead. -
removePotionEffectClient
public void removePotionEffectClient(int par1) Remove the speified potion effect from this entity. -
removePotionEffect
public void removePotionEffect(int par1) Remove the specified potion effect from this entity. -
onNewPotionEffect
-
onChangedPotionEffect
-
onFinishedPotionEffect
-
heal
public void heal(float par1) Heal living entity (param: amount of half-hearts) -
getHealth
public final float getHealth() -
setHealth
public void setHealth(float par1) -
attackEntityFrom
Called when the entity is attacked.- Overrides:
attackEntityFromin classEntity
-
renderBrokenItemStack
Renders broken item particles using the given ItemStack -
onDeath
Called when the mob's health reaches 0. -
entityLivingOnDeath
-
checkForRareDrop
-
checkForScrollDrop
public void checkForScrollDrop() -
checkForHeadDrop
-
getAmbientLootingModifier
protected int getAmbientLootingModifier() -
dropHead
protected void dropHead() -
dropEquipment
protected void dropEquipment(boolean par1, int par2) Drop the equipment for this entity. -
knockBack
knocks back this entity -
getHurtSound
Returns the sound this mob makes when it is hurt. -
getDeathSound
Returns the sound this mob makes on death. -
dropRareDrop
protected void dropRareDrop(int par1) -
dropFewItems
protected void dropFewItems(boolean par1, int par2) Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param par2 - Level of Looting used to kill this mob. -
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
-
fall
protected void fall(float par1) Called when the mob is falling. Calculates and applies fall damage. -
entityLivingBaseFall
protected void entityLivingBaseFall(float par1) -
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 par1) -
applyArmorCalculations
Reduces damage, depending on armor -
applyPotionDamageCalculations
Reduces damage, depending on potions -
damageEntity
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 -
func_110142_aN
-
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 par1) sets the amount of arrows stuck in the entity. used for rendering those -
swingItem
public void swingItem()Swings the item the player is holding. -
handleHealthUpdate
public void handleHealthUpdate(byte par1) - Overrides:
handleHealthUpdatein 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
-
getAttributeMap
-
getCreatureAttribute
Get this Entity's EnumCreatureAttribute -
getHeldItem
Returns the item that this EntityLiving is holding, if any. -
getCurrentItemOrArmor
0 = item, 1-n is armor -
setCurrentItemOrArmor
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 par1) Set sprinting switch for Entity.- Overrides:
setSprintingin classEntity
-
getSpeedModifier
public float getSpeedModifier() -
getLastActiveItems
- Overrides:
getLastActiveItemsin 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 -
setPositionAndUpdate
public void setPositionAndUpdate(double par1, double par3, double par5) Move the entity to the coordinates informed, but keep yaw/pitch values. -
dismountEntity
Moves the entity to a position out of the way of its mount. -
getAlwaysRenderNameTagForRender
public boolean getAlwaysRenderNameTagForRender() -
getItemIcon
Gets the Icon Index of the item currently held -
jump
public void jump()Causes this entity to do an upwards motion (jumping). -
moveEntityWithHeading
public void moveEntityWithHeading(float par1, float par2) Moves the entity based on the specified heading. Args: strafe, forward -
isAIEnabled
protected boolean isAIEnabled()Returns true if the newer Entity AI code should be run -
getAIMoveSpeed
public float getAIMoveSpeed()the movespeed used for the new AI system -
setAIMoveSpeed
public void setAIMoveSpeed(float par1) set the movespeed used for the new AI system -
attackEntityAsMob
-
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 par1, float par2) -
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. -
updateAITasks
protected void updateAITasks() -
collideWithNearbyEntities
protected void collideWithNearbyEntities() -
collideWithEntity
-
updateRidden
public void updateRidden()Handles updating while being ridden by an entity- Overrides:
updateRiddenin classEntity
-
setPositionAndRotation2
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, posY, posZ, yaw, pitch- Overrides:
setPositionAndRotation2in classEntity
-
updateAITick
protected void updateAITick()main AI tick function, replaces updateEntityActionState -
updateEntityActionState
protected void updateEntityActionState() -
setJumping
public void setJumping(boolean par1) -
onItemPickup
Called whenever an item is picked up from walking over it. Args: pickedUpEntity, stackSize -
canEntityBeSeen
returns true if the entity provided in the argument can be seen. (Raytrace) -
getLookVec
returns a (normalized) vector of where this entity is looking- Overrides:
getLookVecin classEntity
-
getLook
interpolated look vector -
getSwingProgress
public float getSwingProgress(float par1) Returns where in the swing animation the living entity is (from 0 to 1). Args: partialTickTime -
getPosition
interpolated position vector -
rayTrace
Performs a ray trace for the distance specified and using the partial tick time. Args: distance, partialTickTime -
isClientWorld
public boolean isClientWorld()Returns whether the entity is in a local (client) 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
-
getEyeHeight
public float getEyeHeight()- Overrides:
getEyeHeightin classEntity
-
setBeenAttacked
public void setBeenAttacked()Sets that this entity has been attacked.- Overrides:
setBeenAttackedin classEntity
-
getRotationYawHead
public float getRotationYawHead()- Overrides:
getRotationYawHeadin classEntity
-
setRotationYawHead
public void setRotationYawHead(float par1) Sets the head's yaw rotation of the entity.- Overrides:
setRotationYawHeadin classEntity
-
getAbsorptionAmount
public float getAbsorptionAmount() -
setAbsorptionAmount
public void setAbsorptionAmount(float par1) -
getTeam
-
isOnSameTeam
-
isOnTeam
Returns true if the entity is on a specific team. -
getHealthAndExhaustionModifier
protected float getHealthAndExhaustionModifier() -
getSwimmingHorizontalModifier
protected float getSwimmingHorizontalModifier() -
getLandMovementModifier
protected float getLandMovementModifier() -
getLadderVerticalMovementModifier
protected float getLadderVerticalMovementModifier() -
knockbackMagnitude
public float knockbackMagnitude() -
getDefaultSlipperinessOnGround
public float getDefaultSlipperinessOnGround() -
getSlipperinessRelativeToBlock
public float getSlipperinessRelativeToBlock(int iBlockID) -
canJump
public boolean canJump() -
canSwim
public boolean canSwim() -
isWeighted
public boolean isWeighted() -
isWeightedByHeadCrab
protected boolean isWeightedByHeadCrab() -
recoverAirSupply
protected void recoverAirSupply() -
canJumpMidWater
public boolean canJumpMidWater() -
getMeleeAttackStrength
Deprecated. -
mouseOverCustomRayTrace
@Environment(CLIENT) public MovingObjectPosition mouseOverCustomRayTrace(double dDistance, float fInterpolationFactor)
-