public abstract class EntityLivingBase extends Entity
Modifier and Type | Field and Description |
---|---|
protected ItemStack |
activeItemStack |
protected int |
activeItemStackUseCount |
int |
arrowHitTimer |
float |
attackedAtYaw
The yaw at which this entity was last attacked from.
|
protected EntityPlayer |
attackingPlayer
The most recent player that has attacked this entity
|
float |
cameraPitch |
protected boolean |
dead
This gets set on entity death, but never used.
|
int |
deathTime
The amount of time remaining this entity should act 'dead', i.e.
|
protected int |
entityAge
The age of this EntityLiving (used to determine when it dies)
|
protected static DataParameter<java.lang.Byte> |
HAND_STATES |
int |
hurtTime
The amount of time remaining this entity should act 'hurt'.
|
protected double |
interpTargetPitch
The pitch rotation the entity will be interpolated to.
|
protected double |
interpTargetX
The X position the entity will be interpolated to.
|
protected double |
interpTargetY
The Y position the entity will be interpolated to.
|
protected double |
interpTargetYaw
The yaw rotation the entity will be interpolated to.
|
protected double |
interpTargetZ
The Z position the entity will be interpolated to.
|
protected 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.
|
protected float |
lastDamage
Damage taken in the last hit.
|
float |
limbSwing |
float |
limbSwingAmount |
int |
maxHurtResistantTime |
int |
maxHurtTime
What the hurt time was max set to last.
|
protected float |
movedDistance |
float |
moveForward |
float |
moveStrafing |
protected int |
newPosRotationIncrements
The number of updates over which the new position and rotation are to be applied to the entity.
|
protected float |
onGroundSpeedFactor |
float |
prevCameraPitch |
float |
prevLimbSwingAmount |
protected float |
prevMovedDistance |
protected float |
prevOnGroundSpeedFactor |
float |
prevRenderYawOffset |
float |
prevRotationYawHead
Entity head rotation yaw at previous tick
|
float |
prevSwingProgress |
float |
randomUnused1 |
float |
randomUnused2 |
float |
randomYawVelocity |
protected int |
recentlyHit
Set to 60 when hit by the player or the player's wolf, then decrements.
|
float |
renderYawOffset |
float |
rotationYawHead
Entity head rotation yaw
|
protected int |
scoreValue
The score value of the Mob, the amount of points the mob is worth.
|
EnumHand |
swingingHand |
float |
swingProgress |
int |
swingProgressInt |
protected int |
ticksElytraFlying |
protected int |
ticksSinceLastSwing |
protected float |
unused180 |
addedToChunk, cachedUniqueIdString, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, updateBlocked, velocityChanged, width, world
Constructor and Description |
---|
EntityLivingBase(World worldIn) |
Modifier and Type | Method and Description |
---|---|
void |
addPotionEffect(PotionEffect potioneffectIn)
adds a PotionEffect to the entity
|
protected float |
applyArmorCalculations(DamageSource source,
float damage)
Reduces damage, depending on armor
|
protected void |
applyEntityAttributes() |
protected float |
applyPotionDamageCalculations(DamageSource source,
float damage)
Reduces damage, depending on potions
|
static boolean |
areAllPotionsAmbient(java.util.Collection<PotionEffect> potionEffects)
Returns true if all of the potion effects in the specified collection are ambient.
|
boolean |
attackable() |
boolean |
attackEntityAsMob(Entity entityIn) |
boolean |
attackEntityFrom(DamageSource source,
float amount)
Called when the entity is attacked.
|
boolean |
attemptTeleport(double x,
double y,
double z)
Teleports the entity to the specified location.
|
protected void |
blockUsingShield(EntityLivingBase p_190629_1_) |
boolean |
canBeCollidedWith()
Returns true if other Entities should be prevented from moving through this Entity.
|
boolean |
canBeHitWithPotion()
Returns false if the entity is an armor stand.
|
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 false
|
boolean |
canEntityBeSeen(Entity entityIn)
returns true if the entity provided in the argument can be seen.
|
void |
clearActivePotions() |
protected void |
collideWithEntity(Entity entityIn) |
protected void |
collideWithNearbyEntities() |
void |
curePotionEffects(ItemStack curativeItem)
Removes all potion effects that have curativeItem as a curative item for its effect
|
protected void |
damageArmor(float damage) |
protected void |
damageEntity(DamageSource damageSrc,
float damageAmount)
Deals damage to the entity.
|
protected void |
damageShield(float damage) |
protected int |
decreaseAirSupply(int air)
Decrements the entity's air supply when underwater
|
void |
dismountEntity(Entity entityIn)
Moves the entity to a position out of the way of its mount.
|
void |
dismountRidingEntity() |
protected void |
dropEquipment(boolean wasRecentlyHit,
int lootingModifier)
Drop the equipment for this entity.
|
protected void |
dropFewItems(boolean wasRecentlyHit,
int lootingModifier)
Drop 0-2 items of this living's type
|
protected void |
dropLoot(boolean wasRecentlyHit,
int lootingModifier,
DamageSource source)
drops the loot of this entity upon death
|
protected void |
entityInit() |
void |
fall(float distance,
float damageMultiplier) |
protected void |
frostWalk(BlockPos pos) |
float |
getAbsorptionAmount()
Returns the amount of health added by the Absorption effect.
|
EnumHand |
getActiveHand() |
ItemStack |
getActiveItemStack() |
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 system
|
EntityLivingBase |
getAITarget() |
boolean |
getAlwaysRenderNameTagForRender() |
abstract java.lang.Iterable<ItemStack> |
getArmorInventoryList() |
int |
getArrowCountInEntity()
counts the amount of arrows stuck in the entity.
|
EntityLivingBase |
getAttackingEntity() |
AbstractAttributeMap |
getAttributeMap()
Returns this entity's attribute map (where all its attributes are stored)
|
<T> T |
getCapability(Capability<T> capability,
EnumFacing facing)
Retrieves the handler for the capability requested on the specific side.
|
CombatTracker |
getCombatTracker()
1.8.9
|
EnumCreatureAttribute |
getCreatureAttribute()
Get this Entity's EnumCreatureAttribute
|
protected SoundEvent |
getDeathSound() |
IAttributeInstance |
getEntityAttribute(IAttribute attribute) |
protected int |
getExperiencePoints(EntityPlayer player)
Get the experience points the entity currently has.
|
protected SoundEvent |
getFallSound(int heightIn) |
float |
getHealth() |
ItemStack |
getHeldItem(EnumHand hand) |
ItemStack |
getHeldItemMainhand() |
ItemStack |
getHeldItemOffhand() |
protected SoundEvent |
getHurtSound() |
int |
getItemInUseCount() |
int |
getItemInUseMaxCount() |
abstract ItemStack |
getItemStackFromSlot(EntityEquipmentSlot slotIn) |
protected float |
getJumpUpwardsMotion() |
EntityLivingBase |
getLastAttacker() |
int |
getLastAttackerTime() |
DamageSource |
getLastDamageSource() |
Vec3d |
getLook(float partialTicks)
interpolated look vector
|
Vec3d |
getLookVec()
returns a (normalized) vector of where this entity is looking
|
float |
getMaxHealth()
Returns the maximum health of the entity (what it is able to regenerate up to, what it spawned with, etc)
|
abstract EnumHandSide |
getPrimaryHand() |
int |
getRevengeTimer() |
java.util.Random |
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)
Gets the progression of the swing animation, ranges from 0.0 to 1.0.
|
int |
getTicksElytraFlying() |
int |
getTotalArmorValue()
Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
|
protected float |
getWaterSlowDown() |
protected void |
handleJumpLava() |
protected void |
handleJumpWater()
Handles the jump when the entity is in water
|
void |
handleStatusUpdate(byte id) |
boolean |
hasCapability(Capability<?> capability,
EnumFacing facing)
Determines if this object has support for the capability in question on the specific side.
|
boolean |
hasItemInSlot(EntityEquipmentSlot p_190630_1_) |
void |
heal(float healAmount)
Heal living entity (param: amount of half-hearts)
|
boolean |
isActiveItemStackBlocking() |
boolean |
isChild()
If Animal, checks if the age timer is negative
|
boolean |
isElytraFlying() |
boolean |
isEntityAlive()
Checks whether target entity is alive.
|
boolean |
isEntityUndead()
Returns true if this entity is undead.
|
boolean |
isHandActive() |
protected boolean |
isMovementBlocked()
Dead and sleeping entities cannot move
|
boolean |
isOnLadder()
returns true if this entity is by a ladder, false otherwise
|
protected boolean |
isPlayer()
Only use is to identify if class is an instance of player for experience dropping
|
boolean |
isPlayerSleeping()
Returns whether player is sleeping or not
|
boolean |
isPotionActive(Potion potionIn) |
boolean |
isPotionApplicable(PotionEffect potioneffectIn) |
boolean |
isServerWorld()
Returns whether the entity is in a server world
|
protected void |
jump()
Causes this entity to do an upwards motion (jumping).
|
protected void |
kill()
sets the dead flag.
|
void |
knockBack(Entity entityIn,
float strength,
double xRatio,
double zRatio)
Constructs a knockback vector from the given direction ratio and magnitude and adds it to the entity's velocity.
|
protected void |
markPotionsDirty() |
void |
moveEntityWithHeading(float strafe,
float forward)
Moves the entity based on the specified heading.
|
void |
notifyDataManagerChange(DataParameter<?> key) |
protected void |
onChangedPotionEffect(PotionEffect id,
boolean p_70695_2_) |
void |
onDeath(DamageSource cause)
Called when the mob's health reaches 0.
|
protected void |
onDeathUpdate()
handles entity death timer, experience orb and particle creation
|
void |
onEntityUpdate()
Gets called every tick from main Entity class
|
protected void |
onFinishedPotionEffect(PotionEffect effect) |
void |
onItemPickup(Entity entityIn,
int quantity)
Called when the entity picks up an item.
|
protected void |
onItemUseFinish()
Used for when item use count runs out, ie: eating completed
|
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 id) |
void |
onUpdate()
Called to update the entity's position/logic.
|
void |
performHurtAnimation()
Setups the entity to do the hurt animation.
|
protected void |
playEquipSound(ItemStack stack) |
protected void |
playHurtSound(DamageSource source) |
void |
readEntityFromNBT(NBTTagCompound compound)
(abstract) Protected helper method to read subclass entity data from NBT.
|
PotionEffect |
removeActivePotionEffect(Potion potioneffectin)
Removes the given potion effect from the active potion map and returns it.
|
void |
removePotionEffect(Potion potionIn)
Removes the given potion effect.
|
void |
renderBrokenItemStack(ItemStack stack)
Renders broken item particles using the given ItemStack
|
void |
resetActiveHand() |
protected void |
resetPotionEffectMetadata()
Resets the potion effect color and ambience metadata values
|
void |
sendEndCombat()
Sends an END_COMBAT packet to the client
|
void |
sendEnterCombat()
Sends an ENTER_COMBAT packet to the client
|
void |
setAbsorptionAmount(float amount) |
void |
setActiveHand(EnumHand hand) |
void |
setAIMoveSpeed(float speedIn)
set the movespeed used for the new AI system
|
void |
setArrowCountInEntity(int count)
sets the amount of arrows stuck in the entity.
|
protected void |
setBeenAttacked()
Sets that this entity has been attacked.
|
void |
setHealth(float health) |
void |
setHeldItem(EnumHand hand,
ItemStack stack) |
abstract void |
setItemStackToSlot(EntityEquipmentSlot slotIn,
ItemStack stack) |
void |
setJumping(boolean jumping) |
void |
setLastAttacker(Entity entityIn) |
void |
setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport)
Set the position and rotation values directly without any clamping.
|
void |
setRenderYawOffset(float offset)
Set the render yaw offset
|
void |
setRevengeTarget(EntityLivingBase livingBase) |
void |
setRotationYawHead(float rotation)
Sets the head's yaw rotation of the entity.
|
void |
setSprinting(boolean sprinting)
Set sprinting switch for Entity.
|
boolean |
shouldRiderFaceForward(EntityPlayer player)
Returns true if the entity's rider (EntityPlayer) should face forward when mounted.
|
void |
stopActiveHand() |
void |
swingArm(EnumHand hand) |
protected void |
updateActiveHand() |
protected void |
updateArmSwingProgress()
Updates the arm swing progress counters and animation progress
|
protected float |
updateDistance(float p_110146_1_,
float p_110146_2_) |
protected void |
updateEntityActionState() |
protected void |
updateFallState(double y,
boolean onGroundIn,
IBlockState state,
BlockPos pos) |
protected void |
updateItemUse(ItemStack stack,
int eatingParticleCount)
Plays sounds and makes particles for item in use state
|
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 entity
|
void |
writeEntityToNBT(NBTTagCompound compound)
(abstract) Protected helper method to write subclass entity data to NBT.
|
addEntityCrashInfo, addPassenger, addTag, addToPlayerScore, addTrackingPlayer, addVelocity, applyEnchantments, applyEntityCollision, applyOrientationToEntity, applyPlayerInteraction, canBeAttackedWithItem, canBeRidden, canFitPassenger, canPassengerSteer, canRenderOnFire, canRiderInteract, canTrample, canTriggerWalking, canUseCommand, changeDimension, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, deserializeNBT, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, getAdjustedHorizontalFacing, getAir, getAlwaysRenderNameTag, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getControllingPassenger, getCustomNameTag, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getFireImmuneTicks, getFlag, getForward, getHeldEquipment, getHorizontalFacing, getHoverEvent, getIsInvulnerable, getLastPortalVec, getLowestRidingEntity, getMaxFallHeight, getMaxInPortalTime, getMirroredYaw, getMountedYOffset, getName, getParts, getPassengers, getPersistentID, getPickedResult, getPitchYaw, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getPushReaction, getRecursivePassengers, getRecursivePassengersByType, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getServer, getSoundCategory, getSplashSound, getSwimSound, getTags, getTeam, getTeleportDirection, getUniqueID, getVectorForRotation, getYOffset, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hitByEntity, ignoreItemEntityData, isBeingRidden, isBurning, isCreatureType, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isNonBoss, isOffsetPositionInLiquid, isOnSameTeam, isOnScoreboardTeam, isOutsideBorder, isPassenger, isPushedByWater, isRiding, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, move, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onCollideWithPlayer, onKillEntity, onStruckByLightning, playSound, playStepSound, preparePlayerToSpawn, processInitialInteract, pushOutOfBlocks, rayTrace, readFromNBT, registerFixes, removePassenger, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, resetEntityId, resetHeight, resetPositionToBB, sendCommandFeedback, sendMessage, serializeNBT, setAir, setAlwaysRenderNameTag, setCommandStat, setCommandStats, setCustomNameTag, setDead, setDropItemsWhenDead, setEntityBoundingBox, setEntityId, setEntityInvulnerable, setFire, setFlag, setGlowing, setInvisible, setInWeb, setLocationAndAngles, setNoGravity, setOnFireFromLava, setOutsideBorder, setPortal, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRotation, setSilent, setSize, setSneaking, setUniqueId, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, startRiding, toString, turn, updatePassenger, verifyExplosion, writeToNBT, writeToNBTAtomically, writeToNBTOptional
protected static final DataParameter<java.lang.Byte> HAND_STATES
public boolean isSwingInProgress
public EnumHand swingingHand
public int swingProgressInt
public int arrowHitTimer
public int hurtTime
public int maxHurtTime
public float attackedAtYaw
public int deathTime
public float prevSwingProgress
public float swingProgress
protected int ticksSinceLastSwing
public float prevLimbSwingAmount
public float limbSwingAmount
public float limbSwing
public int maxHurtResistantTime
public float prevCameraPitch
public float cameraPitch
public float randomUnused2
public float randomUnused1
public float renderYawOffset
public float prevRenderYawOffset
public float rotationYawHead
public float prevRotationYawHead
public float jumpMovementFactor
protected EntityPlayer attackingPlayer
protected int recentlyHit
protected boolean dead
protected int entityAge
protected float prevOnGroundSpeedFactor
protected float onGroundSpeedFactor
protected float movedDistance
protected float prevMovedDistance
protected float unused180
protected int scoreValue
protected float lastDamage
protected boolean isJumping
public float moveStrafing
public float moveForward
public float randomYawVelocity
protected int newPosRotationIncrements
protected double interpTargetX
protected double interpTargetY
protected double interpTargetZ
protected double interpTargetYaw
protected double interpTargetPitch
protected ItemStack activeItemStack
protected int activeItemStackUseCount
protected int ticksElytraFlying
public EntityLivingBase(World worldIn)
public void onKillCommand()
onKillCommand
in class Entity
protected void entityInit()
entityInit
in class Entity
protected void applyEntityAttributes()
protected void updateFallState(double y, boolean onGroundIn, IBlockState state, BlockPos pos)
updateFallState
in class Entity
public boolean canBreatheUnderwater()
public void onEntityUpdate()
onEntityUpdate
in class Entity
protected void frostWalk(BlockPos pos)
public boolean isChild()
protected void onDeathUpdate()
protected boolean canDropLoot()
protected int decreaseAirSupply(int air)
protected int getExperiencePoints(EntityPlayer player)
protected boolean isPlayer()
public java.util.Random getRNG()
public EntityLivingBase getAITarget()
public int getRevengeTimer()
public void setRevengeTarget(EntityLivingBase livingBase)
public EntityLivingBase getLastAttacker()
public int getLastAttackerTime()
public void setLastAttacker(Entity entityIn)
public int getAge()
protected void playEquipSound(ItemStack stack)
public void writeEntityToNBT(NBTTagCompound compound)
writeEntityToNBT
in class Entity
public void readEntityFromNBT(NBTTagCompound compound)
readEntityFromNBT
in class Entity
protected void updatePotionEffects()
protected void updatePotionMetadata()
public static boolean areAllPotionsAmbient(java.util.Collection<PotionEffect> potionEffects)
protected void resetPotionEffectMetadata()
public void clearActivePotions()
public java.util.Collection<PotionEffect> getActivePotionEffects()
public boolean isPotionActive(Potion potionIn)
public PotionEffect getActivePotionEffect(Potion potionIn)
public void addPotionEffect(PotionEffect potioneffectIn)
public boolean isPotionApplicable(PotionEffect potioneffectIn)
public boolean isEntityUndead()
public PotionEffect removeActivePotionEffect(Potion potioneffectin)
public void removePotionEffect(Potion potionIn)
protected void onNewPotionEffect(PotionEffect id)
protected void onChangedPotionEffect(PotionEffect id, boolean p_70695_2_)
protected void onFinishedPotionEffect(PotionEffect effect)
public void heal(float healAmount)
public final float getHealth()
public void setHealth(float health)
public boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom
in class Entity
protected void blockUsingShield(EntityLivingBase p_190629_1_)
public DamageSource getLastDamageSource()
protected void playHurtSound(DamageSource source)
public void renderBrokenItemStack(ItemStack stack)
public void onDeath(DamageSource cause)
protected void dropLoot(boolean wasRecentlyHit, int lootingModifier, DamageSource source)
protected void dropEquipment(boolean wasRecentlyHit, int lootingModifier)
public void knockBack(Entity entityIn, float strength, double xRatio, double zRatio)
this.onGround
), the Y-velocity is increased as well, clamping it to .4
.
The entity's existing horizontal velocity is halved, and if the entity is on the ground the Y-velocity is too.protected SoundEvent getHurtSound()
protected SoundEvent getDeathSound()
protected SoundEvent getFallSound(int heightIn)
protected void dropFewItems(boolean wasRecentlyHit, int lootingModifier)
public boolean isOnLadder()
public boolean isEntityAlive()
isEntityAlive
in class Entity
public void performHurtAnimation()
performHurtAnimation
in class Entity
public int getTotalArmorValue()
protected void damageArmor(float damage)
protected void damageShield(float damage)
protected float applyArmorCalculations(DamageSource source, float damage)
protected float applyPotionDamageCalculations(DamageSource source, float damage)
protected void damageEntity(DamageSource damageSrc, float damageAmount)
public CombatTracker getCombatTracker()
public EntityLivingBase getAttackingEntity()
public final float getMaxHealth()
public final int getArrowCountInEntity()
public final void setArrowCountInEntity(int count)
public void swingArm(EnumHand hand)
public void handleStatusUpdate(byte id)
handleStatusUpdate
in class Entity
protected void kill()
protected void updateArmSwingProgress()
public IAttributeInstance getEntityAttribute(IAttribute attribute)
public AbstractAttributeMap getAttributeMap()
public EnumCreatureAttribute getCreatureAttribute()
public ItemStack getHeldItemMainhand()
public ItemStack getHeldItemOffhand()
public boolean hasItemInSlot(EntityEquipmentSlot p_190630_1_)
public abstract java.lang.Iterable<ItemStack> getArmorInventoryList()
getArmorInventoryList
in class Entity
public abstract ItemStack getItemStackFromSlot(EntityEquipmentSlot slotIn)
public abstract void setItemStackToSlot(EntityEquipmentSlot slotIn, ItemStack stack)
setItemStackToSlot
in class Entity
public void setSprinting(boolean sprinting)
setSprinting
in class Entity
protected float getSoundVolume()
protected float getSoundPitch()
protected boolean isMovementBlocked()
public void dismountEntity(Entity entityIn)
public boolean getAlwaysRenderNameTagForRender()
getAlwaysRenderNameTagForRender
in class Entity
protected float getJumpUpwardsMotion()
protected void jump()
protected void handleJumpWater()
protected void handleJumpLava()
protected float getWaterSlowDown()
public void moveEntityWithHeading(float strafe, float forward)
public float getAIMoveSpeed()
public void setAIMoveSpeed(float speedIn)
public boolean attackEntityAsMob(Entity entityIn)
public boolean isPlayerSleeping()
public void onUpdate()
protected float updateDistance(float p_110146_1_, float p_110146_2_)
public void onLivingUpdate()
protected void updateEntityActionState()
protected void collideWithNearbyEntities()
protected void collideWithEntity(Entity entityIn)
public void dismountRidingEntity()
dismountRidingEntity
in class Entity
public void updateRidden()
updateRidden
in class Entity
public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport)
setPositionAndRotationDirect
in class Entity
public void setJumping(boolean jumping)
public void onItemPickup(Entity entityIn, int quantity)
public boolean canEntityBeSeen(Entity entityIn)
public Vec3d getLookVec()
getLookVec
in class Entity
public Vec3d getLook(float partialTicks)
public float getSwingProgress(float partialTickTime)
public boolean isServerWorld()
public boolean canBeCollidedWith()
canBeCollidedWith
in class Entity
public boolean canBePushed()
canBePushed
in class Entity
protected void setBeenAttacked()
setBeenAttacked
in class Entity
public float getRotationYawHead()
getRotationYawHead
in class Entity
public void setRotationYawHead(float rotation)
setRotationYawHead
in class Entity
public void setRenderYawOffset(float offset)
setRenderYawOffset
in class Entity
public float getAbsorptionAmount()
public void setAbsorptionAmount(float amount)
public void sendEnterCombat()
public void sendEndCombat()
protected void markPotionsDirty()
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.public abstract EnumHandSide getPrimaryHand()
public boolean isHandActive()
public EnumHand getActiveHand()
protected void updateActiveHand()
public void setActiveHand(EnumHand hand)
public void notifyDataManagerChange(DataParameter<?> key)
notifyDataManagerChange
in class Entity
protected void updateItemUse(ItemStack stack, int eatingParticleCount)
protected void onItemUseFinish()
public ItemStack getActiveItemStack()
public int getItemInUseCount()
public int getItemInUseMaxCount()
public void stopActiveHand()
public void resetActiveHand()
public boolean isActiveItemStackBlocking()
public boolean isElytraFlying()
public int getTicksElytraFlying()
public boolean attemptTeleport(double x, double y, double z)
public boolean canBeHitWithPotion()
public boolean attackable()
public <T> T getCapability(Capability<T> capability, EnumFacing facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class Entity
capability
- The capability to checkfacing
- The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'ICapabilityProvider.hasCapability(Capability, EnumFacing)
would return false.public boolean hasCapability(Capability<?> capability, EnumFacing facing)
ICapabilityProvider
hasCapability
in interface ICapabilityProvider
hasCapability
in class Entity
capability
- The capability to checkfacing
- The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'