Class LivingEntity

All Implemented Interfaces:
CommandSource, SyncedDataHolder, Attackable, EntityAccess, Nameable, ScoreHolder, IAttachmentHolder, IEntityExtension, ILivingEntityExtension, INBTSerializable<CompoundTag>
Direct Known Subclasses:
ArmorStand, EntityRendererEventsTest.MyEntity, Mob, Player

public abstract class LivingEntity extends Entity implements Attackable, ILivingEntityExtension
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • TAG_ACTIVE_EFFECTS

      private static final String TAG_ACTIVE_EFFECTS
      See Also:
    • SPEED_MODIFIER_SOUL_SPEED_UUID

      private static final UUID SPEED_MODIFIER_SOUL_SPEED_UUID
    • SPEED_MODIFIER_POWDER_SNOW_UUID

      private static final UUID SPEED_MODIFIER_POWDER_SNOW_UUID
    • SPEED_MODIFIER_SPRINTING

      private static final AttributeModifier SPEED_MODIFIER_SPRINTING
    • HAND_SLOTS

      public static final int HAND_SLOTS
      See Also:
    • ARMOR_SLOTS

      public static final int ARMOR_SLOTS
      See Also:
    • EQUIPMENT_SLOT_OFFSET

      public static final int EQUIPMENT_SLOT_OFFSET
      See Also:
    • ARMOR_SLOT_OFFSET

      public static final int ARMOR_SLOT_OFFSET
      See Also:
    • BODY_ARMOR_OFFSET

      public static final int BODY_ARMOR_OFFSET
      See Also:
    • SWING_DURATION

      public static final int SWING_DURATION
      See Also:
    • PLAYER_HURT_EXPERIENCE_TIME

      public static final int PLAYER_HURT_EXPERIENCE_TIME
      See Also:
    • DAMAGE_SOURCE_TIMEOUT

      private static final int DAMAGE_SOURCE_TIMEOUT
      See Also:
    • MIN_MOVEMENT_DISTANCE

      public static final double MIN_MOVEMENT_DISTANCE
      See Also:
    • DEFAULT_BASE_GRAVITY

      public static final double DEFAULT_BASE_GRAVITY
      See Also:
    • DEATH_DURATION

      public static final int DEATH_DURATION
      See Also:
    • TICKS_PER_ELYTRA_FREE_FALL_EVENT

      private static final int TICKS_PER_ELYTRA_FREE_FALL_EVENT
      See Also:
    • FREE_FALL_EVENTS_PER_ELYTRA_BREAK

      private static final int FREE_FALL_EVENTS_PER_ELYTRA_BREAK
      See Also:
    • USE_ITEM_INTERVAL

      public static final int USE_ITEM_INTERVAL
      See Also:
    • BASE_JUMP_POWER

      public static final float BASE_JUMP_POWER
      See Also:
    • MAX_LINE_OF_SIGHT_TEST_RANGE

      private static final double MAX_LINE_OF_SIGHT_TEST_RANGE
      See Also:
    • LIVING_ENTITY_FLAG_IS_USING

      protected static final int LIVING_ENTITY_FLAG_IS_USING
      See Also:
    • LIVING_ENTITY_FLAG_OFF_HAND

      protected static final int LIVING_ENTITY_FLAG_OFF_HAND
      See Also:
    • LIVING_ENTITY_FLAG_SPIN_ATTACK

      protected static final int LIVING_ENTITY_FLAG_SPIN_ATTACK
      See Also:
    • DATA_LIVING_ENTITY_FLAGS

      protected static final EntityDataAccessor<Byte> DATA_LIVING_ENTITY_FLAGS
    • DATA_HEALTH_ID

      private static final EntityDataAccessor<Float> DATA_HEALTH_ID
    • DATA_EFFECT_PARTICLES

      private static final EntityDataAccessor<List<ParticleOptions>> DATA_EFFECT_PARTICLES
    • DATA_EFFECT_AMBIENCE_ID

      private static final EntityDataAccessor<Boolean> DATA_EFFECT_AMBIENCE_ID
    • DATA_ARROW_COUNT_ID

      private static final EntityDataAccessor<Integer> DATA_ARROW_COUNT_ID
    • DATA_STINGER_COUNT_ID

      private static final EntityDataAccessor<Integer> DATA_STINGER_COUNT_ID
    • SLEEPING_POS_ID

      private static final EntityDataAccessor<Optional<BlockPos>> SLEEPING_POS_ID
    • PARTICLE_FREQUENCY_WHEN_INVISIBLE

      private static final int PARTICLE_FREQUENCY_WHEN_INVISIBLE
      See Also:
    • SLEEPING_DIMENSIONS

      protected static final EntityDimensions SLEEPING_DIMENSIONS
    • EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT

      public static final float EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT
      See Also:
    • DEFAULT_BABY_SCALE

      public static final float DEFAULT_BABY_SCALE
      See Also:
    • ITEM_USE_EFFECT_START_FRACTION

      private static final float ITEM_USE_EFFECT_START_FRACTION
      See Also:
    • attributes

      private final AttributeMap attributes
    • combatTracker

      private final CombatTracker combatTracker
    • activeEffects

      private final Map<Holder<MobEffect>,MobEffectInstance> activeEffects
    • lastHandItemStacks

      private final NonNullList<ItemStack> lastHandItemStacks
    • lastArmorItemStacks

      private final NonNullList<ItemStack> lastArmorItemStacks
    • lastBodyItemStack

      private ItemStack lastBodyItemStack
    • swinging

      public boolean swinging
    • discardFriction

      private boolean discardFriction
    • swingingArm

      public InteractionHand swingingArm
    • swingTime

      public int swingTime
    • removeArrowTime

      public int removeArrowTime
    • removeStingerTime

      public int removeStingerTime
    • hurtTime

      public int hurtTime
    • hurtDuration

      public int hurtDuration
    • deathTime

      public int deathTime
    • oAttackAnim

      public float oAttackAnim
    • attackAnim

      public float attackAnim
    • attackStrengthTicker

      protected int attackStrengthTicker
    • walkAnimation

      public final WalkAnimationState walkAnimation
    • invulnerableDuration

      public final int invulnerableDuration
      See Also:
    • timeOffs

      public final float timeOffs
    • rotA

      public final float rotA
    • yBodyRot

      public float yBodyRot
    • yBodyRotO

      public float yBodyRotO
    • yHeadRot

      public float yHeadRot
    • yHeadRotO

      public float yHeadRotO
    • lastHurtByPlayer

      @Nullable protected Player lastHurtByPlayer
    • lastHurtByPlayerTime

      protected int lastHurtByPlayerTime
    • dead

      protected boolean dead
    • noActionTime

      protected int noActionTime
    • oRun

      protected float oRun
    • run

      protected float run
    • animStep

      protected float animStep
    • animStepO

      protected float animStepO
    • rotOffs

      protected float rotOffs
    • deathScore

      protected int deathScore
    • lastHurt

      protected float lastHurt
    • jumping

      protected boolean jumping
    • xxa

      public float xxa
    • yya

      public float yya
    • zza

      public float zza
    • lerpSteps

      protected int lerpSteps
    • lerpX

      protected double lerpX
    • lerpY

      protected double lerpY
    • lerpZ

      protected double lerpZ
    • lerpYRot

      protected double lerpYRot
    • lerpXRot

      protected double lerpXRot
    • lerpYHeadRot

      protected double lerpYHeadRot
    • lerpHeadSteps

      protected int lerpHeadSteps
    • effectsDirty

      private boolean effectsDirty
    • lastHurtByMob

      @Nullable private LivingEntity lastHurtByMob
    • lastHurtByMobTimestamp

      private int lastHurtByMobTimestamp
    • lastHurtMob

      private LivingEntity lastHurtMob
    • lastHurtMobTimestamp

      private int lastHurtMobTimestamp
    • speed

      private float speed
    • noJumpDelay

      private int noJumpDelay
    • absorptionAmount

      private float absorptionAmount
    • useItem

      protected ItemStack useItem
    • useItemRemaining

      protected int useItemRemaining
    • fallFlyTicks

      protected int fallFlyTicks
    • lastPos

      private BlockPos lastPos
    • lastClimbablePos

      private Optional<BlockPos> lastClimbablePos
    • lastDamageSource

      @Nullable private DamageSource lastDamageSource
    • lastDamageStamp

      private long lastDamageStamp
    • autoSpinAttackTicks

      protected int autoSpinAttackTicks
    • swimAmount

      private float swimAmount
    • swimAmountO

      private float swimAmountO
    • brain

      protected Brain<?> brain
    • skipDropExperience

      private boolean skipDropExperience
    • appliedScale

      protected float appliedScale
  • Constructor Details

  • Method Details

    • getBrain

      public Brain<?> getBrain()
    • brainProvider

      protected Brain.Provider<?> brainProvider()
    • makeBrain

      protected Brain<?> makeBrain(com.mojang.serialization.Dynamic<?> p_21069_)
    • kill

      public void kill()
      Overrides:
      kill in class Entity
    • canAttackType

      public boolean canAttackType(EntityType<?> p_21032_)
    • defineSynchedData

      protected void defineSynchedData(SynchedEntityData.Builder p_326178_)
      Specified by:
      defineSynchedData in class Entity
    • createLivingAttributes

      public static AttributeSupplier.Builder createLivingAttributes()
    • checkFallDamage

      protected void checkFallDamage(double p_20990_, boolean p_20991_, BlockState p_20992_, BlockPos p_20993_)
      Overrides:
      checkFallDamage in class Entity
    • canBreatheUnderwater

      @Deprecated public final boolean canBreatheUnderwater()
      Deprecated.
    • getSwimAmount

      public float getSwimAmount(float p_20999_)
    • baseTick

      public void baseTick()
      Overrides:
      baseTick in class Entity
    • canSpawnSoulSpeedParticle

      public boolean canSpawnSoulSpeedParticle()
    • spawnSoulSpeedParticle

      protected void spawnSoulSpeedParticle()
    • onSoulSpeedBlock

      protected boolean onSoulSpeedBlock()
    • getBlockSpeedFactor

      protected float getBlockSpeedFactor()
      Overrides:
      getBlockSpeedFactor in class Entity
    • shouldRemoveSoulSpeed

      protected boolean shouldRemoveSoulSpeed(BlockState p_21140_)
    • removeSoulSpeed

      protected void removeSoulSpeed()
    • tryAddSoulSpeed

      protected void tryAddSoulSpeed()
    • removeFrost

      protected void removeFrost()
    • tryAddFrost

      protected void tryAddFrost()
    • onChangedBlock

      protected void onChangedBlock(BlockPos p_21175_)
    • isBaby

      public boolean isBaby()
    • getAgeScale

      public float getAgeScale()
    • getScale

      public float getScale()
    • sanitizeScale

      protected float sanitizeScale(float p_320290_)
    • isAffectedByFluids

      protected boolean isAffectedByFluids()
    • tickDeath

      protected void tickDeath()
    • shouldDropExperience

      public boolean shouldDropExperience()
    • shouldDropLoot

      protected boolean shouldDropLoot()
    • decreaseAirSupply

      protected int decreaseAirSupply(int p_21303_)
    • increaseAirSupply

      protected int increaseAirSupply(int p_21307_)
    • getExperienceReward

      public int getExperienceReward()
    • isAlwaysExperienceDropper

      protected boolean isAlwaysExperienceDropper()
    • getRandom

      public RandomSource getRandom()
    • getLastHurtByMob

      @Nullable public LivingEntity getLastHurtByMob()
    • getLastAttacker

      public LivingEntity getLastAttacker()
      Specified by:
      getLastAttacker in interface Attackable
    • getLastHurtByMobTimestamp

      public int getLastHurtByMobTimestamp()
    • setLastHurtByPlayer

      public void setLastHurtByPlayer(@Nullable Player p_21248_)
    • setLastHurtByMob

      public void setLastHurtByMob(@Nullable LivingEntity p_21039_)
    • getLastHurtMob

      @Nullable public LivingEntity getLastHurtMob()
    • getLastHurtMobTimestamp

      public int getLastHurtMobTimestamp()
    • setLastHurtMob

      public void setLastHurtMob(Entity p_21336_)
    • getNoActionTime

      public int getNoActionTime()
    • setNoActionTime

      public void setNoActionTime(int p_21311_)
    • shouldDiscardFriction

      public boolean shouldDiscardFriction()
    • setDiscardFriction

      public void setDiscardFriction(boolean p_147245_)
    • doesEmitEquipEvent

      protected boolean doesEmitEquipEvent(EquipmentSlot p_217035_)
    • onEquipItem

      public void onEquipItem(EquipmentSlot p_238393_, ItemStack p_238394_, ItemStack p_238395_)
    • remove

      public void remove(Entity.RemovalReason p_276115_)
      Overrides:
      remove in class Entity
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundTag p_21145_)
      Specified by:
      addAdditionalSaveData in class Entity
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundTag p_21096_)
      Specified by:
      readAdditionalSaveData in class Entity
    • tickEffects

      protected void tickEffects()
    • updateInvisibilityStatus

      protected void updateInvisibilityStatus()
    • updateSynchronizedMobEffectParticles

      private void updateSynchronizedMobEffectParticles()
    • updateGlowingStatus

      private void updateGlowingStatus()
    • getVisibilityPercent

      public double getVisibilityPercent(@Nullable Entity p_20969_)
    • canAttack

      public boolean canAttack(LivingEntity p_21171_)
    • canAttack

      public boolean canAttack(LivingEntity p_21041_, TargetingConditions p_21042_)
    • canBeSeenAsEnemy

      public boolean canBeSeenAsEnemy()
    • canBeSeenByAnyone

      public boolean canBeSeenByAnyone()
    • areAllEffectsAmbient

      public static boolean areAllEffectsAmbient(Collection<MobEffectInstance> p_21180_)
    • removeEffectParticles

      protected void removeEffectParticles()
    • removeAllEffects

      public boolean removeAllEffects()
    • getActiveEffects

      public Collection<MobEffectInstance> getActiveEffects()
    • getActiveEffectsMap

      public Map<Holder<MobEffect>,MobEffectInstance> getActiveEffectsMap()
    • hasEffect

      public boolean hasEffect(Holder<MobEffect> p_316430_)
    • getEffect

      @Nullable public MobEffectInstance getEffect(Holder<MobEffect> p_316375_)
    • addEffect

      public final boolean addEffect(MobEffectInstance p_21165_)
    • addEffect

      public boolean addEffect(MobEffectInstance p_147208_, @Nullable Entity p_147209_)
    • canBeAffected

      @Deprecated @OverrideOnly public boolean canBeAffected(MobEffectInstance p_21197_)
      Deprecated.
      Parameters:
      p_21197_ - A mob effect instance
      Returns:
      If the mob effect instance can be applied to this entity
    • forceAddEffect

      public void forceAddEffect(MobEffectInstance p_147216_, @Nullable Entity p_147217_)
    • isInvertedHealAndHarm

      public boolean isInvertedHealAndHarm()
    • removeEffectNoUpdate

      @Nullable public MobEffectInstance removeEffectNoUpdate(Holder<MobEffect> p_316233_)
    • removeEffect

      public boolean removeEffect(Holder<MobEffect> p_316570_)
    • onEffectAdded

      protected void onEffectAdded(MobEffectInstance p_147190_, @Nullable Entity p_147191_)
    • sendEffectToPassengers

      public void sendEffectToPassengers(MobEffectInstance p_289695_)
    • onEffectUpdated

      protected void onEffectUpdated(MobEffectInstance p_147192_, boolean p_147193_, @Nullable Entity p_147194_)
    • onEffectRemoved

      protected void onEffectRemoved(MobEffectInstance p_21126_)
    • refreshDirtyAttributes

      private void refreshDirtyAttributes()
    • onAttributeUpdated

      private void onAttributeUpdated(Holder<Attribute> p_316778_)
    • heal

      public void heal(float p_21116_)
    • getHealth

      public float getHealth()
    • setHealth

      public void setHealth(float p_21154_)
    • isDeadOrDying

      public boolean isDeadOrDying()
    • hurt

      public boolean hurt(DamageSource p_21016_, float p_21017_)
      Overrides:
      hurt in class Entity
    • blockUsingShield

      protected void blockUsingShield(LivingEntity p_21200_)
    • blockedByShield

      protected void blockedByShield(LivingEntity p_21246_)
    • checkTotemDeathProtection

      private boolean checkTotemDeathProtection(DamageSource p_21263_)
    • getLastDamageSource

      @Nullable public DamageSource getLastDamageSource()
    • playHurtSound

      protected void playHurtSound(DamageSource p_21160_)
    • makeSound

      public void makeSound(@Nullable SoundEvent p_320810_)
    • isDamageSourceBlocked

      public boolean isDamageSourceBlocked(DamageSource p_21276_)
    • breakItem

      private void breakItem(ItemStack p_21279_)
    • die

      public void die(DamageSource p_21014_)
    • createWitherRose

      protected void createWitherRose(@Nullable LivingEntity p_21269_)
    • dropAllDeathLoot

      protected void dropAllDeathLoot(DamageSource p_21192_)
    • dropEquipment

      protected void dropEquipment()
    • dropExperience

      protected void dropExperience()
    • dropCustomDeathLoot

      protected void dropCustomDeathLoot(DamageSource p_21018_, int p_21019_, boolean p_21020_)
    • getLootTable

      public ResourceKey<LootTable> getLootTable()
    • getLootTableSeed

      public long getLootTableSeed()
    • dropFromLootTable

      protected void dropFromLootTable(DamageSource p_21021_, boolean p_21022_)
    • knockback

      public void knockback(double p_147241_, double p_147242_, double p_147243_)
    • indicateDamage

      public void indicateDamage(double p_270514_, double p_270826_)
    • getHurtSound

      @Nullable protected SoundEvent getHurtSound(DamageSource p_21239_)
    • getDeathSound

      @Nullable protected SoundEvent getDeathSound()
    • getFallDamageSound

      private SoundEvent getFallDamageSound(int p_21313_)
    • skipDropExperience

      public void skipDropExperience()
    • wasExperienceConsumed

      public boolean wasExperienceConsumed()
    • getHurtDir

      public float getHurtDir()
    • getHitbox

      protected AABB getHitbox()
    • getFallSounds

      public LivingEntity.Fallsounds getFallSounds()
    • getDrinkingSound

      protected SoundEvent getDrinkingSound(ItemStack p_21174_)
    • getEatingSound

      public SoundEvent getEatingSound(ItemStack p_21202_)
    • getLastClimbablePos

      public Optional<BlockPos> getLastClimbablePos()
    • onClimbable

      public boolean onClimbable()
    • trapdoorUsableAsLadder

      private boolean trapdoorUsableAsLadder(BlockPos p_21177_, BlockState p_21178_)
    • isAlive

      public boolean isAlive()
      Overrides:
      isAlive in class Entity
    • getMaxFallDistance

      public int getMaxFallDistance()
      Overrides:
      getMaxFallDistance in class Entity
    • getComfortableFallDistance

      protected final int getComfortableFallDistance(float p_326294_)
    • causeFallDamage

      public boolean causeFallDamage(float p_147187_, float p_147188_, DamageSource p_147189_)
      Overrides:
      causeFallDamage in class Entity
    • calculateFallDamage

      protected int calculateFallDamage(float p_21237_, float p_21238_)
    • playBlockFallSound

      protected void playBlockFallSound()
    • animateHurt

      public void animateHurt(float p_265265_)
      Overrides:
      animateHurt in class Entity
    • getArmorValue

      public int getArmorValue()
    • hurtArmor

      protected void hurtArmor(DamageSource p_21122_, float p_21123_)
    • hurtHelmet

      protected void hurtHelmet(DamageSource p_147213_, float p_147214_)
    • hurtCurrentlyUsedShield

      protected void hurtCurrentlyUsedShield(float p_21316_)
    • doHurtEquipment

      protected void doHurtEquipment(DamageSource p_330843_, float p_330394_, EquipmentSlot... p_331314_)
    • getDamageAfterArmorAbsorb

      protected float getDamageAfterArmorAbsorb(DamageSource p_21162_, float p_21163_)
    • getDamageAfterMagicAbsorb

      protected float getDamageAfterMagicAbsorb(DamageSource p_21193_, float p_21194_)
    • actuallyHurt

      protected void actuallyHurt(DamageSource p_21240_, float p_21241_)
    • getCombatTracker

      public CombatTracker getCombatTracker()
    • getKillCredit

      @Nullable public LivingEntity getKillCredit()
    • getMaxHealth

      public final float getMaxHealth()
    • getMaxAbsorption

      public final float getMaxAbsorption()
    • getArrowCount

      public final int getArrowCount()
    • setArrowCount

      public final void setArrowCount(int p_21318_)
    • getStingerCount

      public final int getStingerCount()
    • setStingerCount

      public final void setStingerCount(int p_21322_)
    • getCurrentSwingDuration

      private int getCurrentSwingDuration()
    • swing

      public void swing(InteractionHand p_21007_)
    • swing

      public void swing(InteractionHand p_21012_, boolean p_21013_)
    • handleDamageEvent

      public void handleDamageEvent(DamageSource p_270229_)
      Overrides:
      handleDamageEvent in class Entity
    • handleEntityEvent

      public void handleEntityEvent(byte p_20975_)
      Overrides:
      handleEntityEvent in class Entity
    • makePoofParticles

      private void makePoofParticles()
    • swapHandItems

      private void swapHandItems()
    • onBelowWorld

      protected void onBelowWorld()
      Overrides:
      onBelowWorld in class Entity
    • updateSwingTime

      protected void updateSwingTime()
    • getAttribute

      @Nullable public AttributeInstance getAttribute(Holder<Attribute> p_316333_)
    • getAttributeValue

      public double getAttributeValue(Holder<Attribute> p_251296_)
    • getAttributeBaseValue

      public double getAttributeBaseValue(Holder<Attribute> p_248605_)
    • getAttributes

      public AttributeMap getAttributes()
    • getMainHandItem

      public ItemStack getMainHandItem()
    • getOffhandItem

      public ItemStack getOffhandItem()
    • isHolding

      public boolean isHolding(Item p_21056_)
    • isHolding

      public boolean isHolding(Predicate<ItemStack> p_21094_)
    • getItemInHand

      public ItemStack getItemInHand(InteractionHand p_21121_)
    • setItemInHand

      public void setItemInHand(InteractionHand p_21009_, ItemStack p_21010_)
    • hasItemInSlot

      public boolean hasItemInSlot(EquipmentSlot p_21034_)
    • canUseSlot

      public boolean canUseSlot(EquipmentSlot p_326058_)
    • getArmorSlots

      public abstract Iterable<ItemStack> getArmorSlots()
    • getItemBySlot

      public abstract ItemStack getItemBySlot(EquipmentSlot p_21127_)
    • setItemSlot

      public abstract void setItemSlot(EquipmentSlot p_21036_, ItemStack p_21037_)
    • getHandSlots

      public Iterable<ItemStack> getHandSlots()
    • getArmorAndBodyArmorSlots

      public Iterable<ItemStack> getArmorAndBodyArmorSlots()
    • getAllSlots

      public Iterable<ItemStack> getAllSlots()
    • verifyEquippedItem

      protected void verifyEquippedItem(ItemStack p_181123_)
    • getArmorCoverPercentage

      public float getArmorCoverPercentage()
    • setSprinting

      public void setSprinting(boolean p_21284_)
      Overrides:
      setSprinting in class Entity
    • getSoundVolume

      protected float getSoundVolume()
    • getVoicePitch

      public float getVoicePitch()
    • isImmobile

      protected boolean isImmobile()
    • push

      public void push(Entity p_21294_)
      Overrides:
      push in class Entity
    • dismountVehicle

      private void dismountVehicle(Entity p_21029_)
    • shouldShowName

      public boolean shouldShowName()
      Overrides:
      shouldShowName in class Entity
    • getJumpPower

      protected float getJumpPower()
    • getJumpPower

      protected float getJumpPower(float p_326107_)
    • getJumpBoostPower

      public float getJumpBoostPower()
    • jumpFromGround

      protected void jumpFromGround()
    • goDownInWater

      @Deprecated protected void goDownInWater()
      Deprecated.
    • jumpInLiquid

      @Deprecated protected void jumpInLiquid(TagKey<Fluid> p_204043_)
      Deprecated.
    • getWaterSlowDown

      protected float getWaterSlowDown()
    • canStandOnFluid

      public boolean canStandOnFluid(FluidState p_204042_)
    • getDefaultGravity

      protected double getDefaultGravity()
      Overrides:
      getDefaultGravity in class Entity
    • travel

      public void travel(Vec3 p_21280_)
    • travelRidden

      private void travelRidden(Player p_278244_, Vec3 p_278231_)
    • tickRidden

      protected void tickRidden(Player p_278262_, Vec3 p_275242_)
    • getRiddenInput

      protected Vec3 getRiddenInput(Player p_278326_, Vec3 p_275300_)
    • getRiddenSpeed

      protected float getRiddenSpeed(Player p_278286_)
    • calculateEntityAnimation

      public void calculateEntityAnimation(boolean p_268129_)
    • updateWalkAnimation

      protected void updateWalkAnimation(float p_268283_)
    • handleRelativeFrictionAndCalculateMovement

      public Vec3 handleRelativeFrictionAndCalculateMovement(Vec3 p_21075_, float p_21076_)
    • getFluidFallingAdjustedMovement

      public Vec3 getFluidFallingAdjustedMovement(double p_20995_, boolean p_20996_, Vec3 p_20997_)
    • handleOnClimbable

      private Vec3 handleOnClimbable(Vec3 p_21298_)
    • getFrictionInfluencedSpeed

      private float getFrictionInfluencedSpeed(float p_21331_)
    • getFlyingSpeed

      protected float getFlyingSpeed()
    • getSpeed

      public float getSpeed()
    • setSpeed

      public void setSpeed(float p_21320_)
    • doHurtTarget

      public boolean doHurtTarget(Entity p_20970_)
    • tick

      public void tick()
      Overrides:
      tick in class Entity
    • detectEquipmentUpdates

      private void detectEquipmentUpdates()
    • collectEquipmentChanges

      @Nullable private Map<EquipmentSlot,ItemStack> collectEquipmentChanges()
    • equipmentHasChanged

      public boolean equipmentHasChanged(ItemStack p_252265_, ItemStack p_251043_)
    • handleHandSwap

      private void handleHandSwap(Map<EquipmentSlot,ItemStack> p_21092_)
    • handleEquipmentChanges

      private void handleEquipmentChanges(Map<EquipmentSlot,ItemStack> p_21143_)
    • getLastArmorItem

      private ItemStack getLastArmorItem(EquipmentSlot p_21199_)
    • setLastArmorItem

      private void setLastArmorItem(EquipmentSlot p_21129_, ItemStack p_21130_)
    • getLastHandItem

      private ItemStack getLastHandItem(EquipmentSlot p_21245_)
    • setLastHandItem

      private void setLastHandItem(EquipmentSlot p_21169_, ItemStack p_21170_)
    • tickHeadTurn

      protected float tickHeadTurn(float p_21260_, float p_21261_)
    • getMaxHeadRotationRelativeToBody

      protected float getMaxHeadRotationRelativeToBody()
    • aiStep

      public void aiStep()
    • isSensitiveToWater

      public boolean isSensitiveToWater()
    • updateFallFlying

      private void updateFallFlying()
    • serverAiStep

      protected void serverAiStep()
    • pushEntities

      protected void pushEntities()
    • checkAutoSpinAttack

      protected void checkAutoSpinAttack(AABB p_21072_, AABB p_21073_)
    • doPush

      protected void doPush(Entity p_20971_)
    • doAutoAttackOnTouch

      protected void doAutoAttackOnTouch(LivingEntity p_21277_)
    • isAutoSpinAttack

      public boolean isAutoSpinAttack()
    • stopRiding

      public void stopRiding()
      Overrides:
      stopRiding in class Entity
    • rideTick

      public void rideTick()
      Overrides:
      rideTick in class Entity
    • lerpTo

      public void lerpTo(double p_20977_, double p_20978_, double p_20979_, float p_20980_, float p_20981_, int p_20982_)
      Overrides:
      lerpTo in class Entity
    • lerpTargetX

      public double lerpTargetX()
      Overrides:
      lerpTargetX in class Entity
    • lerpTargetY

      public double lerpTargetY()
      Overrides:
      lerpTargetY in class Entity
    • lerpTargetZ

      public double lerpTargetZ()
      Overrides:
      lerpTargetZ in class Entity
    • lerpTargetXRot

      public float lerpTargetXRot()
      Overrides:
      lerpTargetXRot in class Entity
    • lerpTargetYRot

      public float lerpTargetYRot()
      Overrides:
      lerpTargetYRot in class Entity
    • lerpHeadTo

      public void lerpHeadTo(float p_21005_, int p_21006_)
      Overrides:
      lerpHeadTo in class Entity
    • setJumping

      public void setJumping(boolean p_21314_)
    • onItemPickup

      public void onItemPickup(ItemEntity p_21054_)
    • take

      public void take(Entity p_21030_, int p_21031_)
    • hasLineOfSight

      public boolean hasLineOfSight(Entity p_147185_)
    • getViewYRot

      public float getViewYRot(float p_21286_)
      Overrides:
      getViewYRot in class Entity
    • getAttackAnim

      public float getAttackAnim(float p_21325_)
    • isPickable

      public boolean isPickable()
      Overrides:
      isPickable in class Entity
    • isPushable

      public boolean isPushable()
      Overrides:
      isPushable in class Entity
    • getYHeadRot

      public float getYHeadRot()
      Overrides:
      getYHeadRot in class Entity
    • setYHeadRot

      public void setYHeadRot(float p_21306_)
      Overrides:
      setYHeadRot in class Entity
    • setYBodyRot

      public void setYBodyRot(float p_21309_)
      Overrides:
      setYBodyRot in class Entity
    • getRelativePortalPosition

      protected Vec3 getRelativePortalPosition(Direction.Axis p_21085_, BlockUtil.FoundRectangle p_21086_)
      Overrides:
      getRelativePortalPosition in class Entity
    • resetForwardDirectionOfRelativePortalPosition

      public static Vec3 resetForwardDirectionOfRelativePortalPosition(Vec3 p_21290_)
    • getAbsorptionAmount

      public float getAbsorptionAmount()
    • setAbsorptionAmount

      public final void setAbsorptionAmount(float p_21328_)
    • internalSetAbsorptionAmount

      protected void internalSetAbsorptionAmount(float p_295258_)
    • onEnterCombat

      public void onEnterCombat()
    • onLeaveCombat

      public void onLeaveCombat()
    • updateEffectVisibility

      protected void updateEffectVisibility()
    • getMainArm

      public abstract HumanoidArm getMainArm()
    • isUsingItem

      public boolean isUsingItem()
    • getUsedItemHand

      public InteractionHand getUsedItemHand()
    • updatingUsingItem

      private void updatingUsingItem()
    • updateUsingItem

      protected void updateUsingItem(ItemStack p_147201_)
    • shouldTriggerItemUseEffects

      private boolean shouldTriggerItemUseEffects()
    • updateSwimAmount

      private void updateSwimAmount()
    • setLivingEntityFlag

      protected void setLivingEntityFlag(int p_21156_, boolean p_21157_)
    • startUsingItem

      public void startUsingItem(InteractionHand p_21159_)
    • onSyncedDataUpdated

      public void onSyncedDataUpdated(EntityDataAccessor<?> p_21104_)
      Specified by:
      onSyncedDataUpdated in interface SyncedDataHolder
      Overrides:
      onSyncedDataUpdated in class Entity
    • lookAt

      public void lookAt(EntityAnchorArgument.Anchor p_21078_, Vec3 p_21079_)
      Overrides:
      lookAt in class Entity
    • triggerItemUseEffects

      protected void triggerItemUseEffects(ItemStack p_21138_, int p_21139_)
    • spawnItemParticles

      private void spawnItemParticles(ItemStack p_21061_, int p_21062_)
    • completeUsingItem

      protected void completeUsingItem()
    • getUseItem

      public ItemStack getUseItem()
    • getUseItemRemainingTicks

      public int getUseItemRemainingTicks()
    • getTicksUsingItem

      public int getTicksUsingItem()
    • releaseUsingItem

      public void releaseUsingItem()
    • stopUsingItem

      public void stopUsingItem()
    • isBlocking

      public boolean isBlocking()
    • isSuppressingSlidingDownLadder

      public boolean isSuppressingSlidingDownLadder()
    • isFallFlying

      public boolean isFallFlying()
    • isVisuallySwimming

      public boolean isVisuallySwimming()
      Overrides:
      isVisuallySwimming in class Entity
    • getFallFlyingTicks

      public int getFallFlyingTicks()
    • randomTeleport

      public boolean randomTeleport(double p_20985_, double p_20986_, double p_20987_, boolean p_20988_)
    • isAffectedByPotions

      public boolean isAffectedByPotions()
    • attackable

      public boolean attackable()
    • setRecordPlayingNearby

      public void setRecordPlayingNearby(BlockPos p_21082_, boolean p_21083_)
    • canTakeItem

      public boolean canTakeItem(ItemStack p_21249_)
    • getDimensions

      public final EntityDimensions getDimensions(Pose p_21047_)
      Overrides:
      getDimensions in class Entity
    • getDefaultDimensions

      protected EntityDimensions getDefaultDimensions(Pose p_316700_)
    • getDismountPoses

      public com.google.common.collect.ImmutableList<Pose> getDismountPoses()
    • getLocalBoundsForPose

      public AABB getLocalBoundsForPose(Pose p_21271_)
    • wouldNotSuffocateAtTargetPose

      protected boolean wouldNotSuffocateAtTargetPose(Pose p_294977_)
    • canChangeDimensions

      public boolean canChangeDimensions()
      Overrides:
      canChangeDimensions in class Entity
    • getSleepingPos

      public Optional<BlockPos> getSleepingPos()
    • setSleepingPos

      public void setSleepingPos(BlockPos p_21251_)
    • clearSleepingPos

      public void clearSleepingPos()
    • isSleeping

      public boolean isSleeping()
    • startSleeping

      public void startSleeping(BlockPos p_21141_)
    • setPosToBed

      private void setPosToBed(BlockPos p_21081_)
    • checkBedExists

      private boolean checkBedExists()
    • stopSleeping

      public void stopSleeping()
    • getBedOrientation

      @Nullable public Direction getBedOrientation()
    • isInWall

      public boolean isInWall()
      Overrides:
      isInWall in class Entity
    • getProjectile

      public ItemStack getProjectile(ItemStack p_21272_)
    • eat

      public ItemStack eat(Level p_21067_, ItemStack p_21068_)
    • addEatEffect

      private void addEatEffect(FoodProperties p_335472_)
    • entityEventForEquipmentBreak

      private static byte entityEventForEquipmentBreak(EquipmentSlot p_21267_)
    • broadcastBreakEvent

      public void broadcastBreakEvent(EquipmentSlot p_21167_)
    • getSlotForHand

      public static EquipmentSlot getSlotForHand(InteractionHand p_320526_)
    • removeEffectsCuredBy

      public boolean removeEffectsCuredBy(EffectCure cure)
      Removes all potion effects that have the given EffectCure in their set of cures
      Parameters:
      cure - the EffectCure being used
    • shouldRiderFaceForward

      public boolean shouldRiderFaceForward(Player player)
      Returns true if the entity's rider (EntityPlayer) should face forward when mounted. currently only used in vanilla code by pigs.
      Parameters:
      player - The player who is riding the entity.
      Returns:
      If the player should orient the same direction as this entity.
    • getBoundingBoxForCulling

      public AABB getBoundingBoxForCulling()
      Overrides:
      getBoundingBoxForCulling in class Entity
    • getEquipmentSlotForItem

      public static EquipmentSlot getEquipmentSlotForItem(ItemStack p_147234_)
    • createEquipmentSlotAccess

      private static SlotAccess createEquipmentSlotAccess(LivingEntity p_147196_, EquipmentSlot p_147197_)
    • getEquipmentSlot

      @Nullable private static EquipmentSlot getEquipmentSlot(int p_147212_)
    • getSlot

      public SlotAccess getSlot(int p_147238_)
      Overrides:
      getSlot in class Entity
    • canFreeze

      public boolean canFreeze()
      Overrides:
      canFreeze in class Entity
    • isCurrentlyGlowing

      public boolean isCurrentlyGlowing()
      Overrides:
      isCurrentlyGlowing in class Entity
    • getVisualRotationYInDegrees

      public float getVisualRotationYInDegrees()
      Overrides:
      getVisualRotationYInDegrees in class Entity
    • recreateFromPacket

      public void recreateFromPacket(ClientboundAddEntityPacket p_217037_)
      Overrides:
      recreateFromPacket in class Entity
    • canDisableShield

      public boolean canDisableShield()
    • maxUpStep

      public float maxUpStep()
      Overrides:
      maxUpStep in class Entity
    • getPassengerRidingPosition

      public Vec3 getPassengerRidingPosition(Entity p_295664_)
      Overrides:
      getPassengerRidingPosition in class Entity
    • lerpHeadRotationStep

      protected void lerpHeadRotationStep(int p_296134_, double p_296397_)
    • igniteForTicks

      public void igniteForTicks(int p_319861_)
      Overrides:
      igniteForTicks in class Entity
    • hasInfiniteMaterials

      public boolean hasInfiniteMaterials()