Class LivingEntity

java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.LivingEntity
All Implemented Interfaces:
CommandOutput, Nameable
Direct Known Subclasses:
ArmorStandEntity, MobEntity, PlayerEntity

public abstract class LivingEntity
extends Entity
Represents an entity which has a health value and can receive damage.
  • Field Details

    • SPRINTING_SPEED_BOOST_ID

      private static final UUID SPRINTING_SPEED_BOOST_ID
    • SOUL_SPEED_BOOST_ID

      private static final UUID SOUL_SPEED_BOOST_ID
    • SPRINTING_SPEED_BOOST

      private static final EntityAttributeModifier SPRINTING_SPEED_BOOST
    • LIVING_FLAGS

      protected static final TrackedData<Byte> LIVING_FLAGS
    • HEALTH

      private static final TrackedData<Float> HEALTH
    • POTION_SWIRLS_COLOR

      private static final TrackedData<Integer> POTION_SWIRLS_COLOR
    • POTION_SWIRLS_AMBIENT

      private static final TrackedData<Boolean> POTION_SWIRLS_AMBIENT
    • STUCK_ARROW_COUNT

      private static final TrackedData<Integer> STUCK_ARROW_COUNT
    • STINGER_COUNT

      private static final TrackedData<Integer> STINGER_COUNT
    • SLEEPING_POSITION

      private static final TrackedData<Optional<BlockPos>> SLEEPING_POSITION
    • SLEEPING_DIMENSIONS

      protected static final EntityDimensions SLEEPING_DIMENSIONS
    • attributes

      private final AttributeContainer attributes
    • damageTracker

      private final DamageTracker damageTracker
    • activeStatusEffects

      private final Map<StatusEffect,​StatusEffectInstance> activeStatusEffects
    • equippedHand

      private final DefaultedList<ItemStack> equippedHand
    • equippedArmor

      private final DefaultedList<ItemStack> equippedArmor
    • handSwinging

      public boolean handSwinging
    • preferredHand

      public Hand preferredHand
    • handSwingTicks

      public int handSwingTicks
    • stuckArrowTimer

      public int stuckArrowTimer
    • stuckStingerTimer

      public int stuckStingerTimer
    • hurtTime

      public int hurtTime
    • maxHurtTime

      public int maxHurtTime
    • knockbackVelocity

      public float knockbackVelocity
    • deathTime

      public int deathTime
    • lastHandSwingProgress

      public float lastHandSwingProgress
    • handSwingProgress

      public float handSwingProgress
    • lastAttackedTicks

      protected int lastAttackedTicks
    • lastLimbDistance

      public float lastLimbDistance
    • limbDistance

      public float limbDistance
    • limbAngle

      public float limbAngle
    • defaultMaxHealth

      public final int defaultMaxHealth
      See Also:
      Constant Field Values
    • randomLargeSeed

      public final float randomLargeSeed
    • randomSmallSeed

      public final float randomSmallSeed
    • bodyYaw

      public float bodyYaw
    • prevBodyYaw

      public float prevBodyYaw
    • headYaw

      public float headYaw
    • prevHeadYaw

      public float prevHeadYaw
    • flyingSpeed

      public float flyingSpeed
    • attackingPlayer

      @Nullable protected PlayerEntity attackingPlayer
    • playerHitTimer

      protected int playerHitTimer
    • dead

      protected boolean dead
    • despawnCounter

      protected int despawnCounter
    • prevStepBobbingAmount

      protected float prevStepBobbingAmount
    • stepBobbingAmount

      protected float stepBobbingAmount
    • lookDirection

      protected float lookDirection
    • prevLookDirection

      protected float prevLookDirection
    • field_6215

      protected float field_6215
    • scoreAmount

      protected int scoreAmount
    • lastDamageTaken

      protected float lastDamageTaken
    • jumping

      protected boolean jumping
    • sidewaysSpeed

      public float sidewaysSpeed
    • upwardSpeed

      public float upwardSpeed
    • forwardSpeed

      public float forwardSpeed
    • bodyTrackingIncrements

      protected int bodyTrackingIncrements
    • serverX

      protected double serverX
    • serverY

      protected double serverY
    • serverZ

      protected double serverZ
    • serverYaw

      protected double serverYaw
    • serverPitch

      protected double serverPitch
    • serverHeadYaw

      protected double serverHeadYaw
    • headTrackingIncrements

      protected int headTrackingIncrements
    • effectsChanged

      private boolean effectsChanged
    • attacker

      @Nullable private LivingEntity attacker
    • lastAttackedTime

      private int lastAttackedTime
    • attacking

      private LivingEntity attacking
    • lastAttackTime

      private int lastAttackTime
    • movementSpeed

      private float movementSpeed
    • jumpingCooldown

      private int jumpingCooldown
    • absorptionAmount

      private float absorptionAmount
    • activeItemStack

      protected ItemStack activeItemStack
    • itemUseTimeLeft

      protected int itemUseTimeLeft
    • roll

      protected int roll
    • lastBlockPos

      private BlockPos lastBlockPos
    • climbingPos

      private Optional<BlockPos> climbingPos
    • lastDamageSource

      private DamageSource lastDamageSource
    • lastDamageTime

      private long lastDamageTime
    • riptideTicks

      protected int riptideTicks
    • leaningPitch

      private float leaningPitch
    • lastLeaningPitch

      private float lastLeaningPitch
    • brain

      protected Brain<?> brain
  • Constructor Details

  • Method Details

    • getBrain

      public Brain<?> getBrain()
    • createBrainProfile

      protected Brain.Profile<?> createBrainProfile()
    • deserializeBrain

      protected Brain<?> deserializeBrain​(com.mojang.serialization.Dynamic<?> dynamic)
    • kill

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

      public boolean canTarget​(EntityType<?> type)
    • initDataTracker

      protected void initDataTracker()
      Specified by:
      initDataTracker in class Entity
    • createLivingAttributes

      public static DefaultAttributeContainer.Builder createLivingAttributes()
    • fall

      protected void fall​(double heightDifference, boolean onGround, BlockState landedState, BlockPos landedPosition)
      Overrides:
      fall in class Entity
    • canBreatheInWater

      public boolean canBreatheInWater()
    • getLeaningPitch

      @Environment(CLIENT) public float getLeaningPitch​(float tickDelta)
    • baseTick

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

      public boolean shouldDisplaySoulSpeedEffects()
    • displaySoulSpeedEffects

      protected void displaySoulSpeedEffects()
    • isOnSoulSpeedBlock

      protected boolean isOnSoulSpeedBlock()
    • getVelocityMultiplier

      protected float getVelocityMultiplier()
      Overrides:
      getVelocityMultiplier in class Entity
    • method_29500

      protected boolean method_29500​(BlockState blockState)
    • removeSoulSpeedBoost

      protected void removeSoulSpeedBoost()
    • addSoulSpeedBoostIfNeeded

      protected void addSoulSpeedBoostIfNeeded()
    • applyMovementEffects

      protected void applyMovementEffects​(BlockPos pos)
    • isBaby

      public boolean isBaby()
    • getScaleFactor

      public float getScaleFactor()
    • method_29920

      protected boolean method_29920()
    • canBeRiddenInWater

      public boolean canBeRiddenInWater()
      Overrides:
      canBeRiddenInWater in class Entity
    • updatePostDeath

      protected void updatePostDeath()
    • canDropLootAndXp

      protected boolean canDropLootAndXp()
    • shouldDropLoot

      protected boolean shouldDropLoot()
    • getNextAirUnderwater

      protected int getNextAirUnderwater​(int air)
    • getNextAirOnLand

      protected int getNextAirOnLand​(int air)
    • getCurrentExperience

      protected int getCurrentExperience​(PlayerEntity player)
    • shouldAlwaysDropXp

      protected boolean shouldAlwaysDropXp()
    • getRandom

      public Random getRandom()
    • getAttacker

      @Nullable public LivingEntity getAttacker()
    • getLastAttackedTime

      public int getLastAttackedTime()
    • setAttacking

      public void setAttacking​(@Nullable PlayerEntity attacking)
    • setAttacker

      public void setAttacker​(@Nullable LivingEntity attacker)
    • getAttacking

      @Nullable public LivingEntity getAttacking()
    • getLastAttackTime

      public int getLastAttackTime()
    • onAttacking

      public void onAttacking​(Entity target)
    • getDespawnCounter

      public int getDespawnCounter()
    • setDespawnCounter

      public void setDespawnCounter​(int despawnCounter)
    • onEquipStack

      protected void onEquipStack​(ItemStack stack)
    • writeCustomDataToTag

      public void writeCustomDataToTag​(CompoundTag tag)
      Specified by:
      writeCustomDataToTag in class Entity
    • readCustomDataFromTag

      public void readCustomDataFromTag​(CompoundTag tag)
      Specified by:
      readCustomDataFromTag in class Entity
    • tickStatusEffects

      protected void tickStatusEffects()
    • updatePotionVisibility

      protected void updatePotionVisibility()
    • getAttackDistanceScalingFactor

      public double getAttackDistanceScalingFactor​(@Nullable Entity entity)
    • canTarget

      public boolean canTarget​(LivingEntity target)
    • isTarget

      public boolean isTarget​(LivingEntity entity, TargetPredicate predicate)
    • containsOnlyAmbientEffects

      public static boolean containsOnlyAmbientEffects​(Collection<StatusEffectInstance> effects)
    • clearPotionSwirls

      protected void clearPotionSwirls()
    • clearStatusEffects

      public boolean clearStatusEffects()
    • getStatusEffects

      public Collection<StatusEffectInstance> getStatusEffects()
    • getActiveStatusEffects

      public Map<StatusEffect,​StatusEffectInstance> getActiveStatusEffects()
    • hasStatusEffect

      public boolean hasStatusEffect​(StatusEffect effect)
    • getStatusEffect

      @Nullable public StatusEffectInstance getStatusEffect​(StatusEffect effect)
    • addStatusEffect

      public boolean addStatusEffect​(StatusEffectInstance effect)
    • canHaveStatusEffect

      public boolean canHaveStatusEffect​(StatusEffectInstance effect)
    • applyStatusEffect

      @Environment(CLIENT) public void applyStatusEffect​(StatusEffectInstance effect)
    • isUndead

      public boolean isUndead()
    • removeStatusEffectInternal

      @Nullable public StatusEffectInstance removeStatusEffectInternal​(@Nullable StatusEffect type)
      Removes a status effect from this entity without calling any listener.

      This method does not perform any cleanup or synchronization operation. Under most circumstances, calling removeStatusEffect(net.minecraft.entity.effect.StatusEffect) is highly preferable.

    • removeStatusEffect

      public boolean removeStatusEffect​(StatusEffect type)
      Removes a status effect from this entity.

      Calling this method will call cleanup methods on the status effect and trigger synchronization of effect particles with watching clients. If this entity is a player, the change in the list of effects will also be synchronized with the corresponding client.

      Returns:
      true if a StatusEffectInstance with the given type was in effect before the removal.
    • onStatusEffectApplied

      protected void onStatusEffectApplied​(StatusEffectInstance effect)
    • onStatusEffectUpgraded

      protected void onStatusEffectUpgraded​(StatusEffectInstance effect, boolean reapplyEffect)
    • onStatusEffectRemoved

      protected void onStatusEffectRemoved​(StatusEffectInstance effect)
    • heal

      public void heal​(float amount)
    • getHealth

      public float getHealth()
    • setHealth

      public void setHealth​(float health)
    • isDead

      public boolean isDead()
    • damage

      public boolean damage​(DamageSource source, float amount)
      Overrides:
      damage in class Entity
    • takeShieldHit

      protected void takeShieldHit​(LivingEntity attacker)
    • knockback

      protected void knockback​(LivingEntity target)
    • tryUseTotem

      private boolean tryUseTotem​(DamageSource source)
    • getRecentDamageSource

      @Nullable public DamageSource getRecentDamageSource()
    • playHurtSound

      protected void playHurtSound​(DamageSource source)
    • blockedByShield

      private boolean blockedByShield​(DamageSource source)
    • playEquipmentBreakEffects

      @Environment(CLIENT) private void playEquipmentBreakEffects​(ItemStack stack)
    • onDeath

      public void onDeath​(DamageSource source)
    • onKilledBy

      protected void onKilledBy​(@Nullable LivingEntity adversary)
      Performs secondary effects after this mob has been killed.

      The default behavior spawns a wither rose if adversary is a WitherEntity.

      Parameters:
      adversary - the main adversary responsible for this entity's death
    • drop

      protected void drop​(DamageSource source)
    • dropInventory

      protected void dropInventory()
    • dropXp

      protected void dropXp()
    • dropEquipment

      protected void dropEquipment​(DamageSource source, int lootingMultiplier, boolean allowDrops)
    • getLootTable

      public Identifier getLootTable()
    • dropLoot

      protected void dropLoot​(DamageSource source, boolean causedByPlayer)
    • getLootContextBuilder

      protected LootContext.Builder getLootContextBuilder​(boolean causedByPlayer, DamageSource source)
    • takeKnockback

      public void takeKnockback​(float float2, double double2, double double3)
    • getHurtSound

      @Nullable protected SoundEvent getHurtSound​(DamageSource source)
    • getDeathSound

      @Nullable protected SoundEvent getDeathSound()
    • getFallSound

      protected SoundEvent getFallSound​(int distance)
    • getDrinkSound

      protected SoundEvent getDrinkSound​(ItemStack stack)
    • getEatSound

      public SoundEvent getEatSound​(ItemStack stack)
    • setOnGround

      public void setOnGround​(boolean onGround)
      Overrides:
      setOnGround in class Entity
    • getClimbingPos

      public Optional<BlockPos> getClimbingPos()
    • isClimbing

      public boolean isClimbing()
    • getBlockState

      public BlockState getBlockState()
    • canEnterTrapdoor

      private boolean canEnterTrapdoor​(BlockPos pos, BlockState state)
    • isAlive

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

      public boolean handleFallDamage​(float fallDistance, float damageMultiplier)
      Overrides:
      handleFallDamage in class Entity
    • computeFallDamage

      protected int computeFallDamage​(float fallDistance, float damageMultiplier)
    • playBlockFallSound

      protected void playBlockFallSound()
    • animateDamage

      @Environment(CLIENT) public void animateDamage()
      Overrides:
      animateDamage in class Entity
    • getArmor

      public int getArmor()
    • damageArmor

      protected void damageArmor​(DamageSource source, float amount)
    • damageShield

      protected void damageShield​(float amount)
    • applyArmorToDamage

      protected float applyArmorToDamage​(DamageSource source, float amount)
    • applyEnchantmentsToDamage

      protected float applyEnchantmentsToDamage​(DamageSource source, float amount)
    • applyDamage

      protected void applyDamage​(DamageSource source, float amount)
    • getDamageTracker

      public DamageTracker getDamageTracker()
    • getPrimeAdversary

      @Nullable public LivingEntity getPrimeAdversary()
    • getMaxHealth

      public final float getMaxHealth()
    • getStuckArrowCount

      public final int getStuckArrowCount()
    • setStuckArrowCount

      public final void setStuckArrowCount​(int stuckArrowCount)
    • getStingerCount

      public final int getStingerCount()
    • setStingerCount

      public final void setStingerCount​(int stingerCount)
    • getHandSwingDuration

      private int getHandSwingDuration()
    • swingHand

      public void swingHand​(Hand hand)
    • swingHand

      public void swingHand​(Hand hand, boolean bool)
    • handleStatus

      @Environment(CLIENT) public void handleStatus​(byte status)
      Overrides:
      handleStatus in class Entity
    • method_30127

      @Environment(CLIENT) private void method_30127()
    • destroy

      protected void destroy()
      Overrides:
      destroy in class Entity
    • tickHandSwing

      protected void tickHandSwing()
    • getAttributeInstance

      @Nullable public EntityAttributeInstance getAttributeInstance​(EntityAttribute attribute)
    • getAttributeValue

      public double getAttributeValue​(EntityAttribute attribute)
    • getAttributeBaseValue

      public double getAttributeBaseValue​(EntityAttribute attribute)
    • getAttributes

      public AttributeContainer getAttributes()
    • getGroup

      public EntityGroup getGroup()
    • getMainHandStack

      public ItemStack getMainHandStack()
    • getOffHandStack

      public ItemStack getOffHandStack()
    • isHolding

      public boolean isHolding​(Item item)
      Checks if this entity is holding a certain item.

      This checks both the entity's main and off hand.

    • isHolding

      public boolean isHolding​(Predicate<Item> predicate)
      Checks if this entity is holding a certain item.

      This checks both the entity's main and off hand.

    • getStackInHand

      public ItemStack getStackInHand​(Hand hand)
    • setStackInHand

      public void setStackInHand​(Hand hand, ItemStack stack)
    • hasStackEquipped

      public boolean hasStackEquipped​(EquipmentSlot slot)
    • getArmorItems

      public abstract Iterable<ItemStack> getArmorItems()
      Overrides:
      getArmorItems in class Entity
    • getEquippedStack

      public abstract ItemStack getEquippedStack​(EquipmentSlot slot)
    • equipStack

      public abstract void equipStack​(EquipmentSlot slot, ItemStack stack)
      Overrides:
      equipStack in class Entity
    • getArmorVisibility

      public float getArmorVisibility()
    • setSprinting

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

      protected float getSoundVolume()
    • getSoundPitch

      protected float getSoundPitch()
    • isImmobile

      protected boolean isImmobile()
    • pushAwayFrom

      public void pushAwayFrom​(Entity entity)
      Overrides:
      pushAwayFrom in class Entity
    • onDismounted

      private void onDismounted​(Entity vehicle)
    • shouldRenderName

      @Environment(CLIENT) public boolean shouldRenderName()
      Overrides:
      shouldRenderName in class Entity
    • getJumpVelocity

      protected float getJumpVelocity()
    • jump

      protected void jump()
    • knockDownwards

      @Environment(CLIENT) protected void knockDownwards()
    • swimUpward

      protected void swimUpward​(Tag<Fluid> fluid)
    • getBaseMovementSpeedMultiplier

      protected float getBaseMovementSpeedMultiplier()
    • canWalkOnFluid

      public boolean canWalkOnFluid​(Fluid fluid)
    • travel

      public void travel​(Vec3d movementInput)
    • method_29242

      public void method_29242​(LivingEntity livingEntity, boolean bool)
    • method_26318

      public Vec3d method_26318​(Vec3d vec3d, float float2)
    • method_26317

      public Vec3d method_26317​(double double2, boolean bool, Vec3d vec3d)
    • applyClimbingSpeed

      private Vec3d applyClimbingSpeed​(Vec3d motion)
    • getMovementSpeed

      private float getMovementSpeed​(float slipperiness)
    • getMovementSpeed

      public float getMovementSpeed()
    • setMovementSpeed

      public void setMovementSpeed​(float movementSpeed)
    • tryAttack

      public boolean tryAttack​(Entity target)
    • tick

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

      private void method_30128()
    • method_30129

      @Nullable private Map<EquipmentSlot,​ItemStack> method_30129()
    • method_30121

      private void method_30121​(Map<EquipmentSlot,​ItemStack> map)
    • method_30123

      private void method_30123​(Map<EquipmentSlot,​ItemStack> map)
    • method_30125

      private ItemStack method_30125​(EquipmentSlot equipmentSlot)
    • method_30122

      private void method_30122​(EquipmentSlot equipmentSlot, ItemStack itemStack)
    • method_30126

      private ItemStack method_30126​(EquipmentSlot equipmentSlot)
    • method_30124

      private void method_30124​(EquipmentSlot equipmentSlot, ItemStack itemStack)
    • turnHead

      protected float turnHead​(float bodyRotation, float headRotation)
    • tickMovement

      public void tickMovement()
    • hurtByWater

      public boolean hurtByWater()
    • initAi

      private void initAi()
    • tickNewAi

      protected void tickNewAi()
    • tickCramming

      protected void tickCramming()
    • tickRiptide

      protected void tickRiptide​(Box a, Box b)
    • pushAway

      protected void pushAway​(Entity entity)
    • attackLivingEntity

      protected void attackLivingEntity​(LivingEntity target)
    • setRiptideTicks

      public void setRiptideTicks​(int int2)
    • isUsingRiptide

      public boolean isUsingRiptide()
    • stopRiding

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

      public void tickRiding()
      Overrides:
      tickRiding in class Entity
    • updateTrackedPositionAndAngles

      @Environment(CLIENT) public void updateTrackedPositionAndAngles​(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate)
      Overrides:
      updateTrackedPositionAndAngles in class Entity
    • updateTrackedHeadRotation

      @Environment(CLIENT) public void updateTrackedHeadRotation​(float yaw, int interpolationSteps)
      Overrides:
      updateTrackedHeadRotation in class Entity
    • setJumping

      public void setJumping​(boolean jumping)
    • method_29499

      public void method_29499​(ItemEntity itemEntity)
    • sendPickup

      public void sendPickup​(Entity item, int count)
    • canSee

      public boolean canSee​(Entity entity)
    • getYaw

      public float getYaw​(float tickDelta)
      Overrides:
      getYaw in class Entity
    • getHandSwingProgress

      @Environment(CLIENT) public float getHandSwingProgress​(float tickDelta)
    • canMoveVoluntarily

      public boolean canMoveVoluntarily()
    • collides

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

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

      protected void scheduleVelocityUpdate()
      Overrides:
      scheduleVelocityUpdate in class Entity
    • getHeadYaw

      public float getHeadYaw()
      Overrides:
      getHeadYaw in class Entity
    • setHeadYaw

      public void setHeadYaw​(float headYaw)
      Overrides:
      setHeadYaw in class Entity
    • setYaw

      public void setYaw​(float yaw)
      Overrides:
      setYaw in class Entity
    • method_30633

      protected Vec3d method_30633​(Direction.Axis axis, class_5459.class_5460 class_5460)
      Overrides:
      method_30633 in class Entity
    • method_31079

      public static Vec3d method_31079​(Vec3d vec3d)
    • getAbsorptionAmount

      public float getAbsorptionAmount()
    • setAbsorptionAmount

      public void setAbsorptionAmount​(float amount)
    • enterCombat

      public void enterCombat()
    • endCombat

      public void endCombat()
    • markEffectsDirty

      protected void markEffectsDirty()
    • getMainArm

      public abstract Arm getMainArm()
    • isUsingItem

      public boolean isUsingItem()
    • getActiveHand

      public Hand getActiveHand()
    • tickActiveItemStack

      private void tickActiveItemStack()
    • shouldSpawnConsumptionEffects

      private boolean shouldSpawnConsumptionEffects()
    • updateLeaningPitch

      private void updateLeaningPitch()
    • setLivingFlag

      protected void setLivingFlag​(int mask, boolean value)
    • setCurrentHand

      public void setCurrentHand​(Hand hand)
    • onTrackedDataSet

      public void onTrackedDataSet​(TrackedData<?> data)
      Overrides:
      onTrackedDataSet in class Entity
    • lookAt

      public void lookAt​(EntityAnchorArgumentType.EntityAnchor anchorPoint, Vec3d target)
      Overrides:
      lookAt in class Entity
    • spawnConsumptionEffects

      protected void spawnConsumptionEffects​(ItemStack stack, int particleCount)
    • spawnItemParticles

      private void spawnItemParticles​(ItemStack stack, int count)
    • consumeItem

      protected void consumeItem()
    • getActiveItem

      public ItemStack getActiveItem()
    • getItemUseTimeLeft

      public int getItemUseTimeLeft()
    • getItemUseTime

      public int getItemUseTime()
    • stopUsingItem

      public void stopUsingItem()
    • clearActiveItem

      public void clearActiveItem()
    • isBlocking

      public boolean isBlocking()
    • isHoldingOntoLadder

      public boolean isHoldingOntoLadder()
      Returns:
      true if this entity should not lose height while in a climbing state
      See Also:
      LivingEntity
    • isFallFlying

      public boolean isFallFlying()
    • isInSwimmingPose

      public boolean isInSwimmingPose()
      Overrides:
      isInSwimmingPose in class Entity
    • getRoll

      @Environment(CLIENT) public int getRoll()
    • teleport

      public boolean teleport​(double x, double y, double z, boolean particleEffects)
    • isAffectedBySplashPotions

      public boolean isAffectedBySplashPotions()
    • isMobOrPlayer

      public boolean isMobOrPlayer()
    • setNearbySongPlaying

      @Environment(CLIENT) public void setNearbySongPlaying​(BlockPos songPosition, boolean playing)
    • canEquip

      public boolean canEquip​(ItemStack stack)
    • createSpawnPacket

      public Packet<?> createSpawnPacket()
      Specified by:
      createSpawnPacket in class Entity
    • getDimensions

      public EntityDimensions getDimensions​(EntityPose pose)
      Overrides:
      getDimensions in class Entity
    • getPoses

      public ImmutableList<EntityPose> getPoses()
    • getBoundingBox

      public Box getBoundingBox​(EntityPose pose)
    • getSleepingPosition

      public Optional<BlockPos> getSleepingPosition()
    • setSleepingPosition

      public void setSleepingPosition​(BlockPos pos)
    • clearSleepingPosition

      public void clearSleepingPosition()
    • isSleeping

      public boolean isSleeping()
    • sleep

      public void sleep​(BlockPos pos)
    • setPositionInBed

      private void setPositionInBed​(BlockPos pos)
    • isSleepingInBed

      private boolean isSleepingInBed()
    • wakeUp

      public void wakeUp()
    • getSleepingDirection

      @Environment(CLIENT) @Nullable public Direction getSleepingDirection()
    • isInsideWall

      public boolean isInsideWall()
      Overrides:
      isInsideWall in class Entity
    • getEyeHeight

      protected final float getEyeHeight​(EntityPose pose, EntityDimensions dimensions)
      Overrides:
      getEyeHeight in class Entity
    • getActiveEyeHeight

      protected float getActiveEyeHeight​(EntityPose pose, EntityDimensions dimensions)
    • getArrowType

      public ItemStack getArrowType​(ItemStack stack)
    • eatFood

      public ItemStack eatFood​(World world, ItemStack stack)
    • applyFoodEffects

      private void applyFoodEffects​(ItemStack stack, World world, LivingEntity targetEntity)
    • getEquipmentBreakStatus

      private static byte getEquipmentBreakStatus​(EquipmentSlot slot)
    • sendEquipmentBreakStatus

      public void sendEquipmentBreakStatus​(EquipmentSlot slot)
    • sendToolBreakStatus

      public void sendToolBreakStatus​(Hand hand)
    • getVisibilityBoundingBox

      @Environment(CLIENT) public Box getVisibilityBoundingBox()
      Overrides:
      getVisibilityBoundingBox in class Entity