public abstract class LivingEntity extends Entity
Entity.IMoveCallback
addedToChunk, cachedUniqueIdString, chunkCoordX, chunkCoordY, chunkCoordZ, collided, collidedHorizontally, collidedVertically, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, eyesInWater, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, hurtResistantTime, ignoreFrustumCheck, inLava, inPortal, inWater, isAirBorne, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, LOGGER, motionMultiplier, noClip, onGround, portalCounter, POSE, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, removed, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, submergedHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, world
DUMMY
Modifier | Constructor and Description |
---|---|
protected |
LivingEntity(EntityType<? extends LivingEntity> type,
World worldIn) |
Modifier and Type | Method and Description |
---|---|
private void |
addItemParticles(ItemStack stack,
int count) |
boolean |
addPotionEffect(EffectInstance effectInstanceIn) |
protected float |
applyArmorCalculations(DamageSource source,
float damage) |
void |
applyEntityCollision(Entity entityIn) |
private void |
applyFoodEffects(ItemStack p_213349_1_,
World p_213349_2_,
LivingEntity p_213349_3_) |
protected float |
applyPotionDamageCalculations(DamageSource source,
float damage) |
static boolean |
areAllPotionsAmbient(java.util.Collection<EffectInstance> potionEffects) |
boolean |
attackable() |
boolean |
attackEntityAsMob(Entity entityIn) |
boolean |
attackEntityFrom(DamageSource source,
float amount) |
boolean |
attemptTeleport(double p_213373_1_,
double p_213373_3_,
double p_213373_5_,
boolean p_213373_7_) |
void |
baseTick() |
protected void |
blockUsingShield(LivingEntity entityIn) |
protected int |
calculateFallDamage(float p_225508_1_,
float p_225508_2_) |
boolean |
canAttack(EntityType<?> typeIn) |
boolean |
canAttack(LivingEntity target) |
boolean |
canAttack(LivingEntity livingentityIn,
EntityPredicate predicateIn) |
boolean |
canBeCollidedWith() |
boolean |
canBeHitWithPotion() |
boolean |
canBePushed() |
boolean |
canBeRiddenInWater() |
private boolean |
canBlockDamageSource(DamageSource damageSourceIn) |
boolean |
canBreatheUnderwater() |
protected boolean |
canDropLoot() |
boolean |
canEntityBeSeen(Entity entityIn) |
private boolean |
canGoThroughtTrapDoorOnLadder(BlockPos pos,
BlockState state) |
boolean |
canPickUpItem(ItemStack itemstackIn) |
private boolean |
checkTotemDeathProtection(DamageSource damageSourceIn) |
boolean |
clearActivePotions() |
void |
clearBedPosition() |
protected void |
collideWithEntity(Entity entityIn) |
protected void |
collideWithNearbyEntities() |
protected void |
constructKnockBackVector(LivingEntity entityIn) |
protected Brain<?> |
createBrain(com.mojang.datafixers.Dynamic<?> dynamicIn) |
IPacket<?> |
createSpawnPacket() |
protected void |
createWitherRose(LivingEntity p_226298_1_) |
boolean |
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) |
protected void |
damageShield(float damage) |
protected int |
decreaseAirSupply(int air) |
protected int |
determineNextAir(int currentAir) |
private void |
dismountEntity(Entity entityIn) |
protected void |
dropExperience() |
protected void |
dropInventory() |
protected void |
dropLoot(DamageSource damageSourceIn,
boolean p_213354_2_) |
protected void |
dropSpecialItems(DamageSource source,
int looting,
boolean recentlyHitIn) |
private static byte |
equipmentSlotToEntityState(EquipmentSlotType p_213350_0_) |
ItemStack |
findAmmo(ItemStack shootable) |
protected void |
frostWalk(BlockPos pos) |
float |
getAbsorptionAmount() |
Hand |
getActiveHand() |
ItemStack |
getActiveItemStack() |
EffectInstance |
getActivePotionEffect(Effect potionIn) |
java.util.Collection<EffectInstance> |
getActivePotionEffects() |
java.util.Map<Effect,EffectInstance> |
getActivePotionMap() |
float |
getAIMoveSpeed() |
boolean |
getAlwaysRenderNameTagForRender() |
float |
getArmorCoverPercentage() |
abstract java.lang.Iterable<ItemStack> |
getArmorInventoryList() |
private int |
getArmSwingAnimationEnd() |
int |
getArrowCountInEntity() |
LivingEntity |
getAttackingEntity() |
IAttributeInstance |
getAttribute(IAttribute attribute) |
AbstractAttributeMap |
getAttributes() |
Direction |
getBedDirection() |
java.util.Optional<BlockPos> |
getBedPosition() |
int |
getBeeStingCount() |
BlockState |
getBlockState() |
Brain<?> |
getBrain() |
<T> LazyOptional<T> |
getCapability(Capability<T> capability,
Direction facing)
Retrieves the Optional handler for the capability requested on the specific side.
|
CombatTracker |
getCombatTracker() |
CreatureAttribute |
getCreatureAttribute() |
protected SoundEvent |
getDeathSound() |
protected SoundEvent |
getDrinkSound(ItemStack stack) |
SoundEvent |
getEatSound(ItemStack itemStackIn) |
protected int |
getExperiencePoints(PlayerEntity player) |
protected float |
getEyeHeight(Pose poseIn,
EntitySize sizeIn) |
protected SoundEvent |
getFallSound(int heightIn) |
float |
getHealth() |
ItemStack |
getHeldItem(Hand hand) |
ItemStack |
getHeldItemMainhand() |
ItemStack |
getHeldItemOffhand() |
protected SoundEvent |
getHurtSound(DamageSource damageSourceIn) |
int |
getIdleTime() |
int |
getItemInUseCount() |
int |
getItemInUseMaxCount() |
abstract ItemStack |
getItemStackFromSlot(EquipmentSlotType slotIn) |
protected float |
getJumpUpwardsMotion() |
LivingEntity |
getLastAttackedEntity() |
int |
getLastAttackedEntityTime() |
DamageSource |
getLastDamageSource() |
protected LootContext.Builder |
getLootContextBuilder(boolean p_213363_1_,
DamageSource damageSourceIn) |
ResourceLocation |
getLootTableResourceLocation() |
float |
getMaxHealth() |
abstract HandSide |
getPrimaryHand() |
private float |
getRelevantMoveFactor(float p_213335_1_) |
float |
getRenderScale() |
LivingEntity |
getRevengeTarget() |
int |
getRevengeTimer() |
java.util.Random |
getRNG() |
float |
getRotationYawHead() |
EntitySize |
getSize(Pose poseIn) |
protected float |
getSoundPitch() |
protected float |
getSoundVolume() |
protected float |
getStandingEyeHeight(Pose poseIn,
EntitySize sizeIn) |
float |
getSwimAnimation(float partialTicks) |
float |
getSwingProgress(float partialTickTime) |
int |
getTicksElytraFlying() |
int |
getTotalArmorValue() |
double |
getVisibilityMultiplier(Entity lookingEntity) |
protected float |
getWaterSlowDown() |
float |
getYaw(float partialTicks) |
protected void |
handleFluidJump(Tag<Fluid> fluidTag) |
protected void |
handleFluidSneak() |
private Vec3d |
handleOnClimbable(Vec3d p_213362_1_) |
void |
handleStatusUpdate(byte id) |
boolean |
hasItemInSlot(EquipmentSlotType slotIn) |
void |
heal(float healAmount) |
boolean |
isActiveItemStackBlocking() |
boolean |
isActualySwimming() |
boolean |
isAlive() |
boolean |
isChild() |
boolean |
isElytraFlying() |
boolean |
isEntityInsideOpaqueBlock() |
boolean |
isEntityUndead() |
boolean |
isHandActive() |
private boolean |
isInValidBed() |
protected boolean |
isMovementBlocked() |
boolean |
isOnLadder() |
protected boolean |
isPlayer() |
boolean |
isPotionActive(Effect potionIn) |
boolean |
isPotionApplicable(EffectInstance potioneffectIn) |
boolean |
isServerWorld() |
boolean |
isSleeping() |
boolean |
isSpinAttacking() |
boolean |
isSuppressingSlidingDownLadder() |
protected void |
jump() |
void |
knockBack(Entity entityIn,
float strength,
double xRatio,
double zRatio) |
void |
livingTick() |
void |
lookAt(EntityAnchorArgument.Type p_200602_1_,
Vec3d p_200602_2_) |
protected void |
markPotionsDirty() |
protected void |
markVelocityChanged() |
void |
notifyDataManagerChange(DataParameter<?> key) |
protected void |
onChangedPotionEffect(EffectInstance id,
boolean reapply) |
void |
onDeath(DamageSource cause) |
protected void |
onDeathUpdate() |
protected void |
onFinishedPotionEffect(EffectInstance effect) |
ItemStack |
onFoodEaten(World p_213357_1_,
ItemStack p_213357_2_) |
void |
onItemPickup(Entity entityIn,
int quantity) |
protected void |
onItemUseFinish() |
void |
onKillCommand() |
boolean |
onLivingFall(float distance,
float damageMultiplier) |
protected void |
onNewPotionEffect(EffectInstance id) |
protected void |
outOfWorld() |
void |
performHurtAnimation() |
protected void |
playEquipSound(ItemStack stack) |
protected void |
playFallSound() |
protected void |
playHurtSound(DamageSource source) |
void |
readAdditional(CompoundNBT compound) |
protected void |
registerAttributes() |
protected void |
registerData() |
void |
remove(boolean keepData) |
EffectInstance |
removeActivePotionEffect(Effect potioneffectin) |
boolean |
removePotionEffect(Effect effectIn) |
private void |
renderBrokenItemStack(ItemStack stack) |
void |
resetActiveHand() |
protected void |
resetPotionEffectMetadata() |
void |
sendBreakAnimation(EquipmentSlotType p_213361_1_) |
void |
sendBreakAnimation(Hand p_213334_1_) |
void |
sendEndCombat() |
void |
sendEnterCombat() |
void |
setAbsorptionAmount(float amount) |
void |
setActiveHand(Hand hand) |
void |
setAIMoveSpeed(float speedIn) |
void |
setArrowCountInEntity(int count) |
void |
setBedPosition(BlockPos p_213369_1_) |
void |
setBeeStingCount(int p_226300_1_) |
void |
setHeadRotation(float yaw,
int pitch) |
void |
setHealth(float health) |
void |
setHeldItem(Hand hand,
ItemStack stack) |
void |
setIdleTime(int idleTimeIn) |
abstract void |
setItemStackToSlot(EquipmentSlotType slotIn,
ItemStack stack) |
void |
setJumping(boolean jumping) |
void |
setLastAttackedEntity(Entity entityIn) |
protected void |
setLivingFlag(int key,
boolean value) |
void |
setPartying(BlockPos pos,
boolean isPartying) |
void |
setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport) |
void |
setRenderYawOffset(float offset) |
void |
setRevengeTarget(LivingEntity livingBase) |
void |
setRotationYawHead(float rotation) |
private void |
setSleepingPosition(BlockPos p_213370_1_) |
void |
setSprinting(boolean sprinting) |
boolean |
shouldRiderFaceForward(PlayerEntity player)
Returns true if the entity's rider (EntityPlayer) should face forward when mounted.
|
private boolean |
shouldTriggerItemUseEffects() |
protected void |
spawnDrops(DamageSource damageSourceIn) |
protected void |
spinAttack(LivingEntity p_204804_1_) |
void |
startSleeping(BlockPos pos) |
void |
startSpinAttack(int p_204803_1_) |
void |
stopActiveHand() |
void |
stopRiding() |
void |
swing(Hand handIn,
boolean p_226292_2_) |
void |
swingArm(Hand hand) |
void |
tick() |
void |
travel(Vec3d p_213352_1_) |
protected void |
triggerItemUseEffects(ItemStack p_226293_1_,
int p_226293_2_) |
private void |
updateActiveHand() |
protected void |
updateArmSwingProgress() |
protected float |
updateDistance(float p_110146_1_,
float p_110146_2_) |
private void |
updateElytra() |
protected void |
updateEntityActionState() |
protected void |
updateFallState(double y,
boolean onGroundIn,
BlockState state,
BlockPos pos) |
protected void |
updatePotionEffects() |
protected void |
updatePotionMetadata() |
void |
updateRidden() |
protected void |
updateSpinAttack(AxisAlignedBB p_204801_1_,
AxisAlignedBB p_204801_2_) |
private void |
updateSwimAnimation() |
void |
wakeUp() |
void |
writeAdditional(CompoundNBT compound) |
addPassenger, addTag, addTrackingPlayer, addVelocity, allowLogging, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, areEyesInFluid, areEyesInFluid, awardKillScore, calculateUpVector, canBeAttackedWithItem, canBeRidden, canExplosionDestroyBlock, canFitPassenger, canPassengerSteer, canRenderOnFire, canSwim, canTrample, canTriggerWalking, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkDespawn, collideBoundingBox, collideBoundingBoxHeuristically, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, detach, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, entityDropItem, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fillCrashReport, forceSetPosition, getAdjustedHorizontalFacing, getAir, getAllowedMovement, getBoundingBox, getBoundingBox, getBrightness, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSource, getControllingPassenger, getCustomName, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getEyeHeight, getEyePosition, getFireImmuneTicks, getFireTimer, getFlag, getForward, getHeight, getHeldEquipment, getHighspeedSplashSound, getHorizontalFacing, getHoverEvent, getJumpFactor, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxFallHeight, getMaxInPortalTime, getMirroredYaw, getMotion, getMountedYOffset, getName, getOnPosition, getPassengers, getPermissionLevel, getPersistentData, getPitch, getPitchYaw, getPortalCooldown, getPose, getPosition, getPositionUnderneath, getPositionVec, getPositionVector, getPosX, getPosXRandom, getPosXWidth, getPosY, getPosYEye, getPosYHeight, getPosYRandom, getPosZ, getPosZRandom, getPosZWidth, getProfessionName, getPushReaction, getRecursivePassengers, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getScoreboardName, getSelfAndPassengers, getServer, getSoundCategory, getSpeedFactor, getSplashSound, getSubmergedHeight, getSwimSound, getTags, getTeam, getTeamColor, getTeleportDirection, getType, getUniqueID, getUpVector, getVectorForRotation, getWidth, getYOffset, handleFluidAcceleration, handlePistonMovement, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hasPermissionLevel, hitByEntity, horizontalMag, ignoreItemEntityData, isAddedToWorld, isBeingRidden, isBurning, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEntityEqual, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInvisible, isInvisibleToPlayer, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubbleColumn, isInWaterRainOrBubbleColumn, isLiving, isNonBoss, isOffsetPositionInLiquid, isOnePlayerRiding, isOnSameTeam, isOnScoreboardTeam, isPassenger, isPassenger, isPassenger, isPoseClear, isPushedByWater, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isVisuallySwimming, isWet, makeFlySound, maybeBackOffFromEdge, move, moveForced, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onKillEntity, onRemovedFromWorld, onStruckByLightning, pick, playFlySound, playSound, playStepSound, playSwimSound, positionRider, preparePlayerToSpawn, processInitialInteract, pushOutOfBlocks, read, recalculateSize, recenterBoundingBox, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, repositionDirectPassengers, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFire, setFireTimer, setFlag, setGlowing, setInLava, setInvisible, setInvulnerable, setLocationAndAngles, setMotion, setMotion, setMotionMultiplier, setNoGravity, setOnFireFromLava, setPacketCoordinates, setPortal, setPose, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRawPosition, setRenderDistanceWeight, setRotation, setSilent, setSneaking, setSwimming, setUniqueId, setVelocity, setWorld, shouldReceiveErrors, shouldReceiveFeedback, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, startRiding, teleportKeepLoaded, toString, updatePassenger, updatePortal, updateSwimming, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeId
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCaps
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSit
getCapability
private static final java.util.UUID SPRINTING_SPEED_BOOST_ID
private static final java.util.UUID SLOW_FALLING_ID
private static final AttributeModifier SPRINTING_SPEED_BOOST
private static final AttributeModifier SLOW_FALLING
public static final IAttribute SWIM_SPEED
public static final IAttribute NAMETAG_DISTANCE
public static final IAttribute ENTITY_GRAVITY
protected static final DataParameter<java.lang.Byte> LIVING_FLAGS
private static final DataParameter<java.lang.Float> HEALTH
private static final DataParameter<java.lang.Integer> POTION_EFFECTS
private static final DataParameter<java.lang.Boolean> HIDE_PARTICLES
private static final DataParameter<java.lang.Integer> ARROW_COUNT_IN_ENTITY
private static final DataParameter<java.lang.Integer> BEE_STING_COUNT
private static final DataParameter<java.util.Optional<BlockPos>> BED_POSITION
protected static final EntitySize SLEEPING_SIZE
private AbstractAttributeMap attributes
private final CombatTracker combatTracker
private final java.util.Map<Effect,EffectInstance> activePotionsMap
private final NonNullList<ItemStack> handInventory
private final NonNullList<ItemStack> armorArray
public boolean isSwingInProgress
public Hand swingingHand
public int swingProgressInt
public int arrowHitTimer
public int beeStingRemovalCooldown
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 final int maxHurtResistantTime
public final float randomUnused2
public final float randomUnused1
public float renderYawOffset
public float prevRenderYawOffset
public float rotationYawHead
public float prevRotationYawHead
public float jumpMovementFactor
protected PlayerEntity attackingPlayer
protected int recentlyHit
protected boolean dead
protected int idleTime
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 moveVertical
public float moveForward
protected int newPosRotationIncrements
protected double interpTargetX
protected double interpTargetY
protected double interpTargetZ
protected double interpTargetYaw
protected double interpTargetPitch
protected double interpTargetHeadYaw
protected int interpTicksHead
private boolean potionsNeedUpdate
@Nullable private LivingEntity revengeTarget
private int revengeTimer
private LivingEntity lastAttackedEntity
private int lastAttackedEntityTime
private float landMovementFactor
private int jumpTicks
private float absorptionAmount
protected ItemStack activeItemStack
protected int activeItemStackUseCount
protected int ticksElytraFlying
private BlockPos prevBlockpos
private DamageSource lastDamageSource
private long lastDamageStamp
protected int spinAttackDuration
private float swimAnimation
private float lastSwimAnimation
protected Brain<?> brain
private final LazyOptional<?>[] handlers
protected LivingEntity(EntityType<? extends LivingEntity> type, World worldIn)
public Brain<?> getBrain()
protected Brain<?> createBrain(com.mojang.datafixers.Dynamic<?> dynamicIn)
public void onKillCommand()
onKillCommand
in class Entity
public boolean canAttack(EntityType<?> typeIn)
protected void registerData()
registerData
in class Entity
protected void registerAttributes()
protected void updateFallState(double y, boolean onGroundIn, BlockState state, BlockPos pos)
updateFallState
in class Entity
public boolean canBreatheUnderwater()
public float getSwimAnimation(float partialTicks)
protected void frostWalk(BlockPos pos)
public boolean isChild()
public float getRenderScale()
public boolean canBeRiddenInWater()
canBeRiddenInWater
in class Entity
protected void onDeathUpdate()
protected boolean canDropLoot()
protected int decreaseAirSupply(int air)
protected int determineNextAir(int currentAir)
protected int getExperiencePoints(PlayerEntity player)
protected boolean isPlayer()
public java.util.Random getRNG()
@Nullable public LivingEntity getRevengeTarget()
public int getRevengeTimer()
public void setRevengeTarget(@Nullable LivingEntity livingBase)
@Nullable public LivingEntity getLastAttackedEntity()
public int getLastAttackedEntityTime()
public void setLastAttackedEntity(Entity entityIn)
public int getIdleTime()
public void setIdleTime(int idleTimeIn)
protected void playEquipSound(ItemStack stack)
public void writeAdditional(CompoundNBT compound)
writeAdditional
in class Entity
public void readAdditional(CompoundNBT compound)
readAdditional
in class Entity
protected void updatePotionEffects()
protected void updatePotionMetadata()
public double getVisibilityMultiplier(@Nullable Entity lookingEntity)
public boolean canAttack(LivingEntity target)
public boolean canAttack(LivingEntity livingentityIn, EntityPredicate predicateIn)
public static boolean areAllPotionsAmbient(java.util.Collection<EffectInstance> potionEffects)
protected void resetPotionEffectMetadata()
public boolean clearActivePotions()
public java.util.Collection<EffectInstance> getActivePotionEffects()
public java.util.Map<Effect,EffectInstance> getActivePotionMap()
public boolean isPotionActive(Effect potionIn)
@Nullable public EffectInstance getActivePotionEffect(Effect potionIn)
public boolean addPotionEffect(EffectInstance effectInstanceIn)
public boolean isPotionApplicable(EffectInstance potioneffectIn)
public boolean isEntityUndead()
@Nullable public EffectInstance removeActivePotionEffect(@Nullable Effect potioneffectin)
public boolean removePotionEffect(Effect effectIn)
protected void onNewPotionEffect(EffectInstance id)
protected void onChangedPotionEffect(EffectInstance id, boolean reapply)
protected void onFinishedPotionEffect(EffectInstance effect)
public void heal(float healAmount)
public float getHealth()
public void setHealth(float health)
public boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom
in class Entity
protected void blockUsingShield(LivingEntity entityIn)
protected void constructKnockBackVector(LivingEntity entityIn)
private boolean checkTotemDeathProtection(DamageSource damageSourceIn)
@Nullable public DamageSource getLastDamageSource()
protected void playHurtSound(DamageSource source)
private boolean canBlockDamageSource(DamageSource damageSourceIn)
private void renderBrokenItemStack(ItemStack stack)
public void onDeath(DamageSource cause)
protected void createWitherRose(@Nullable LivingEntity p_226298_1_)
protected void spawnDrops(DamageSource damageSourceIn)
protected void dropInventory()
protected void dropExperience()
protected void dropSpecialItems(DamageSource source, int looting, boolean recentlyHitIn)
public ResourceLocation getLootTableResourceLocation()
protected void dropLoot(DamageSource damageSourceIn, boolean p_213354_2_)
protected LootContext.Builder getLootContextBuilder(boolean p_213363_1_, DamageSource damageSourceIn)
public void knockBack(Entity entityIn, float strength, double xRatio, double zRatio)
@Nullable protected SoundEvent getHurtSound(DamageSource damageSourceIn)
@Nullable protected SoundEvent getDeathSound()
protected SoundEvent getFallSound(int heightIn)
protected SoundEvent getDrinkSound(ItemStack stack)
public SoundEvent getEatSound(ItemStack itemStackIn)
public boolean isOnLadder()
public BlockState getBlockState()
private boolean canGoThroughtTrapDoorOnLadder(BlockPos pos, BlockState state)
public boolean onLivingFall(float distance, float damageMultiplier)
onLivingFall
in class Entity
protected int calculateFallDamage(float p_225508_1_, float p_225508_2_)
protected void playFallSound()
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()
@Nullable public LivingEntity getAttackingEntity()
public final float getMaxHealth()
public final int getArrowCountInEntity()
public final void setArrowCountInEntity(int count)
public final int getBeeStingCount()
public final void setBeeStingCount(int p_226300_1_)
private int getArmSwingAnimationEnd()
public void swingArm(Hand hand)
public void swing(Hand handIn, boolean p_226292_2_)
public void handleStatusUpdate(byte id)
handleStatusUpdate
in class Entity
protected void outOfWorld()
outOfWorld
in class Entity
protected void updateArmSwingProgress()
public IAttributeInstance getAttribute(IAttribute attribute)
public AbstractAttributeMap getAttributes()
public CreatureAttribute getCreatureAttribute()
public ItemStack getHeldItemMainhand()
public ItemStack getHeldItemOffhand()
public boolean hasItemInSlot(EquipmentSlotType slotIn)
public abstract java.lang.Iterable<ItemStack> getArmorInventoryList()
getArmorInventoryList
in class Entity
public abstract ItemStack getItemStackFromSlot(EquipmentSlotType slotIn)
public abstract void setItemStackToSlot(EquipmentSlotType slotIn, ItemStack stack)
setItemStackToSlot
in class Entity
public float getArmorCoverPercentage()
public void setSprinting(boolean sprinting)
setSprinting
in class Entity
protected float getSoundVolume()
protected float getSoundPitch()
protected boolean isMovementBlocked()
public void applyEntityCollision(Entity entityIn)
applyEntityCollision
in class Entity
private void dismountEntity(Entity entityIn)
public boolean getAlwaysRenderNameTagForRender()
getAlwaysRenderNameTagForRender
in class Entity
protected float getJumpUpwardsMotion()
protected void jump()
protected void handleFluidSneak()
protected float getWaterSlowDown()
public void travel(Vec3d p_213352_1_)
private float getRelevantMoveFactor(float p_213335_1_)
public float getAIMoveSpeed()
public void setAIMoveSpeed(float speedIn)
public boolean attackEntityAsMob(Entity entityIn)
protected float updateDistance(float p_110146_1_, float p_110146_2_)
public void livingTick()
private void updateElytra()
protected void updateEntityActionState()
protected void collideWithNearbyEntities()
protected void updateSpinAttack(AxisAlignedBB p_204801_1_, AxisAlignedBB p_204801_2_)
protected void collideWithEntity(Entity entityIn)
protected void spinAttack(LivingEntity p_204804_1_)
public void startSpinAttack(int p_204803_1_)
public boolean isSpinAttacking()
public void stopRiding()
stopRiding
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 setHeadRotation(float yaw, int pitch)
setHeadRotation
in class Entity
public void setJumping(boolean jumping)
public void onItemPickup(Entity entityIn, int quantity)
public boolean canEntityBeSeen(Entity entityIn)
public float getSwingProgress(float partialTickTime)
public boolean isServerWorld()
public boolean canBeCollidedWith()
canBeCollidedWith
in class Entity
public boolean canBePushed()
canBePushed
in class Entity
protected void markVelocityChanged()
markVelocityChanged
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 abstract HandSide getPrimaryHand()
public boolean isHandActive()
public Hand getActiveHand()
private void updateActiveHand()
private boolean shouldTriggerItemUseEffects()
private void updateSwimAnimation()
protected void setLivingFlag(int key, boolean value)
public void setActiveHand(Hand hand)
public void notifyDataManagerChange(DataParameter<?> key)
notifyDataManagerChange
in class Entity
public void lookAt(EntityAnchorArgument.Type p_200602_1_, Vec3d p_200602_2_)
protected void triggerItemUseEffects(ItemStack p_226293_1_, int p_226293_2_)
private void addItemParticles(ItemStack stack, int count)
protected void onItemUseFinish()
public ItemStack getActiveItemStack()
public int getItemInUseCount()
public int getItemInUseMaxCount()
public void stopActiveHand()
public void resetActiveHand()
public boolean isActiveItemStackBlocking()
public boolean isSuppressingSlidingDownLadder()
public boolean isElytraFlying()
public boolean isActualySwimming()
isActualySwimming
in class Entity
public int getTicksElytraFlying()
public boolean attemptTeleport(double p_213373_1_, double p_213373_3_, double p_213373_5_, boolean p_213373_7_)
public boolean canBeHitWithPotion()
public boolean attackable()
public void setPartying(BlockPos pos, boolean isPartying)
public boolean canPickUpItem(ItemStack itemstackIn)
public IPacket<?> createSpawnPacket()
createSpawnPacket
in class Entity
public EntitySize getSize(Pose poseIn)
public java.util.Optional<BlockPos> getBedPosition()
public void setBedPosition(BlockPos p_213369_1_)
public void clearBedPosition()
public boolean isSleeping()
public void startSleeping(BlockPos pos)
private void setSleepingPosition(BlockPos p_213370_1_)
private boolean isInValidBed()
public void wakeUp()
@Nullable public Direction getBedDirection()
public boolean isEntityInsideOpaqueBlock()
isEntityInsideOpaqueBlock
in class Entity
protected final float getEyeHeight(Pose poseIn, EntitySize sizeIn)
getEyeHeight
in class Entity
protected float getStandingEyeHeight(Pose poseIn, EntitySize sizeIn)
private void applyFoodEffects(ItemStack p_213349_1_, World p_213349_2_, LivingEntity p_213349_3_)
private static byte equipmentSlotToEntityState(EquipmentSlotType p_213350_0_)
public void sendBreakAnimation(EquipmentSlotType p_213361_1_)
public void sendBreakAnimation(Hand p_213334_1_)
public boolean curePotionEffects(ItemStack curativeItem)
curativeItem
- The itemstack we are using to cure potion effectspublic boolean shouldRiderFaceForward(PlayerEntity player)
player
- The player who is riding the entity.public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class CapabilityProvider<Entity>