Class Entity

java.lang.Object
net.minecraft.entity.Entity
All Implemented Interfaces:
CommandOutput, Nameable
Direct Known Subclasses:
AbstractDecorationEntity, AbstractMinecartEntity, AreaEffectCloudEntity, BoatEntity, EndCrystalEntity, EnderDragonPart, EvokerFangsEntity, ExperienceOrbEntity, EyeOfEnderEntity, FallingBlockEntity, ItemEntity, LightningEntity, LivingEntity, ProjectileEntity, TntEntity

public abstract class Entity
extends Object
implements Nameable, CommandOutput
  • Field Details

    • LOGGER

      protected static final Logger LOGGER
    • MAX_ENTITY_ID

      private static final AtomicInteger MAX_ENTITY_ID
    • EMPTY_STACK_LIST

      private static final List<ItemStack> EMPTY_STACK_LIST
    • NULL_BOX

      private static final Box NULL_BOX
    • renderDistanceMultiplier

      private static double renderDistanceMultiplier
    • FLAGS

      protected static final TrackedData<Byte> FLAGS
    • AIR

      private static final TrackedData<Integer> AIR
    • CUSTOM_NAME

      private static final TrackedData<Optional<Text>> CUSTOM_NAME
    • NAME_VISIBLE

      private static final TrackedData<Boolean> NAME_VISIBLE
    • SILENT

      private static final TrackedData<Boolean> SILENT
    • NO_GRAVITY

      private static final TrackedData<Boolean> NO_GRAVITY
    • POSE

      protected static final TrackedData<EntityPose> POSE
    • type

      private final EntityType<?> type
    • entityId

      private int entityId
    • inanimate

      public boolean inanimate
    • passengerList

      private final List<Entity> passengerList
    • ridingCooldown

      protected int ridingCooldown
    • vehicle

      @Nullable private Entity vehicle
    • teleporting

      public boolean teleporting
    • world

      public World world
    • prevX

      public double prevX
    • prevY

      public double prevY
    • prevZ

      public double prevZ
    • pos

      private Vec3d pos
    • blockPos

      private BlockPos blockPos
    • velocity

      private Vec3d velocity
    • yaw

      public float yaw
    • pitch

      public float pitch
    • prevYaw

      public float prevYaw
    • prevPitch

      public float prevPitch
    • entityBounds

      private Box entityBounds
    • onGround

      protected boolean onGround
    • horizontalCollision

      public boolean horizontalCollision
    • verticalCollision

      public boolean verticalCollision
    • velocityModified

      public boolean velocityModified
    • movementMultiplier

      protected Vec3d movementMultiplier
    • removed

      public boolean removed
    • prevHorizontalSpeed

      public float prevHorizontalSpeed
    • horizontalSpeed

      public float horizontalSpeed
    • distanceTraveled

      public float distanceTraveled
    • fallDistance

      public float fallDistance
    • nextStepSoundDistance

      private float nextStepSoundDistance
    • nextFlySoundDistance

      private float nextFlySoundDistance
    • lastRenderX

      public double lastRenderX
    • lastRenderY

      public double lastRenderY
    • lastRenderZ

      public double lastRenderZ
    • stepHeight

      public float stepHeight
    • noClip

      public boolean noClip
    • pushSpeedReduction

      public float pushSpeedReduction
    • random

      protected final Random random
    • age

      public int age
    • fireTicks

      private int fireTicks
    • touchingWater

      protected boolean touchingWater
    • fluidHeight

      protected Object2DoubleMap<Tag<Fluid>> fluidHeight
    • submergedInWater

      protected boolean submergedInWater
    • field_25599

      @Nullable protected Tag<Fluid> field_25599
    • timeUntilRegen

      public int timeUntilRegen
    • firstUpdate

      protected boolean firstUpdate
    • dataTracker

      protected final DataTracker dataTracker
    • updateNeeded

      public boolean updateNeeded
    • chunkX

      public int chunkX
    • chunkY

      public int chunkY
    • chunkZ

      public int chunkZ
    • chunkPosUpdateRequested

      private boolean chunkPosUpdateRequested
    • trackedPosition

      private Vec3d trackedPosition
    • ignoreCameraFrustum

      public boolean ignoreCameraFrustum
    • velocityDirty

      public boolean velocityDirty
    • netherPortalCooldown

      private int netherPortalCooldown
    • inNetherPortal

      protected boolean inNetherPortal
    • netherPortalTime

      protected int netherPortalTime
    • lastNetherPortalPosition

      protected BlockPos lastNetherPortalPosition
    • invulnerable

      private boolean invulnerable
    • uuid

      protected UUID uuid
    • uuidString

      protected String uuidString
    • glowing

      protected boolean glowing
    • scoreboardTags

      private final Set<String> scoreboardTags
    • teleportRequested

      private boolean teleportRequested
    • pistonMovementDelta

      private final double[] pistonMovementDelta
    • pistonMovementTick

      private long pistonMovementTick
    • dimensions

      private EntityDimensions dimensions
    • standingEyeHeight

      private float standingEyeHeight
  • Constructor Details

  • Method Details

    • method_30632

      @Environment(CLIENT) public boolean method_30632​(BlockPos blockPos, BlockState blockState)
    • getTeamColorValue

      @Environment(CLIENT) public int getTeamColorValue()
    • isSpectator

      public boolean isSpectator()
    • detach

      public final void detach()
      Removes all the passengers and removes this entity from any vehicles it is riding.
    • updateTrackedPosition

      public void updateTrackedPosition​(double x, double y, double z)
    • updateTrackedPosition

      public void updateTrackedPosition​(Vec3d pos)
    • getTrackedPosition

      @Environment(CLIENT) public Vec3d getTrackedPosition()
    • getType

      public EntityType<?> getType()
    • getEntityId

      public int getEntityId()
    • setEntityId

      public void setEntityId​(int id)
    • getScoreboardTags

      public Set<String> getScoreboardTags()
    • addScoreboardTag

      public boolean addScoreboardTag​(String tag)
    • removeScoreboardTag

      public boolean removeScoreboardTag​(String tag)
    • kill

      public void kill()
    • initDataTracker

      protected abstract void initDataTracker()
    • getDataTracker

      public DataTracker getDataTracker()
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • afterSpawn

      @Environment(CLIENT) protected void afterSpawn()
    • remove

      public void remove()
    • setPose

      public void setPose​(EntityPose pose)
    • getPose

      public EntityPose getPose()
    • isInRange

      public boolean isInRange​(Entity other, double radius)
    • setRotation

      protected void setRotation​(float yaw, float pitch)
    • updatePosition

      public void updatePosition​(double x, double y, double z)
    • refreshPosition

      protected void refreshPosition()
    • changeLookDirection

      @Environment(CLIENT) public void changeLookDirection​(double cursorDeltaX, double cursorDeltaY)
    • tick

      public void tick()
    • baseTick

      public void baseTick()
    • resetNetherPortalCooldown

      public void resetNetherPortalCooldown()
    • hasNetherPortalCooldown

      public boolean hasNetherPortalCooldown()
    • tickNetherPortalCooldown

      protected void tickNetherPortalCooldown()
    • getMaxNetherPortalTime

      public int getMaxNetherPortalTime()
    • setOnFireFromLava

      protected void setOnFireFromLava()
    • setOnFireFor

      public void setOnFireFor​(int seconds)
    • setFireTicks

      public void setFireTicks​(int ticks)
    • getFireTicks

      public int getFireTicks()
    • extinguish

      public void extinguish()
    • destroy

      protected void destroy()
    • doesNotCollide

      public boolean doesNotCollide​(double offsetX, double offsetY, double offsetZ)
    • doesNotCollide

      private boolean doesNotCollide​(Box box)
    • setOnGround

      public void setOnGround​(boolean onGround)
    • isOnGround

      public boolean isOnGround()
    • move

      public void move​(MovementType type, Vec3d movement)
    • getLandingPos

      protected BlockPos getLandingPos()
    • getJumpVelocityMultiplier

      protected float getJumpVelocityMultiplier()
    • getVelocityMultiplier

      protected float getVelocityMultiplier()
    • getVelocityAffectingPos

      protected BlockPos getVelocityAffectingPos()
    • adjustMovementForSneaking

      protected Vec3d adjustMovementForSneaking​(Vec3d movement, MovementType type)
    • adjustMovementForPiston

      protected Vec3d adjustMovementForPiston​(Vec3d movement)
    • calculatePistonMovementFactor

      private double calculatePistonMovementFactor​(Direction.Axis axis, double offsetFactor)
    • adjustMovementForCollisions

      private Vec3d adjustMovementForCollisions​(Vec3d movement)
    • squaredHorizontalLength

      public static double squaredHorizontalLength​(Vec3d vector)
    • adjustMovementForCollisions

      public static Vec3d adjustMovementForCollisions​(@Nullable Entity entity, Vec3d movement, Box entityBoundingBox, World world, ShapeContext context, ReusableStream<VoxelShape> collisions)
    • adjustMovementForCollisions

      public static Vec3d adjustMovementForCollisions​(Vec3d movement, Box entityBoundingBox, ReusableStream<VoxelShape> collisions)
    • adjustSingleAxisMovementForCollisions

      public static Vec3d adjustSingleAxisMovementForCollisions​(Vec3d movement, Box entityBoundingBox, WorldView world, ShapeContext context, ReusableStream<VoxelShape> collisions)
    • calculateNextStepSoundDistance

      protected float calculateNextStepSoundDistance()
    • moveToBoundingBoxCenter

      public void moveToBoundingBoxCenter()
    • getSwimSound

      protected SoundEvent getSwimSound()
    • getSplashSound

      protected SoundEvent getSplashSound()
    • getHighSpeedSplashSound

      protected SoundEvent getHighSpeedSplashSound()
    • checkBlockCollision

      protected void checkBlockCollision()
    • onBlockCollision

      protected void onBlockCollision​(BlockState state)
    • playStepSound

      protected void playStepSound​(BlockPos pos, BlockState state)
    • playSwimSound

      protected void playSwimSound​(float volume)
    • playFlySound

      protected float playFlySound​(float distance)
    • hasWings

      protected boolean hasWings()
    • playSound

      public void playSound​(SoundEvent sound, float volume, float pitch)
    • isSilent

      public boolean isSilent()
    • setSilent

      public void setSilent​(boolean silent)
    • hasNoGravity

      public boolean hasNoGravity()
    • setNoGravity

      public void setNoGravity​(boolean noGravity)
    • canClimb

      protected boolean canClimb()
    • fall

      protected void fall​(double heightDifference, boolean onGround, BlockState landedState, BlockPos landedPosition)
    • isFireImmune

      public boolean isFireImmune()
    • handleFallDamage

      public boolean handleFallDamage​(float fallDistance, float damageMultiplier)
    • isTouchingWater

      public boolean isTouchingWater()
      Returns whether this entity's hitbox is touching water fluid.
    • isBeingRainedOn

      private boolean isBeingRainedOn()
    • isInsideBubbleColumn

      private boolean isInsideBubbleColumn()
    • isTouchingWaterOrRain

      public boolean isTouchingWaterOrRain()
    • isWet

      public boolean isWet()
      Returns whether this entity is touching water, or is being rained on, or is inside a bubble column...
      See Also:
      isTouchingWater(), isBeingRainedOn(), isInsideBubbleColumn()
    • isInsideWaterOrBubbleColumn

      public boolean isInsideWaterOrBubbleColumn()
    • isSubmergedInWater

      public boolean isSubmergedInWater()
      Returns whether this entity's hitbox is fully submerged in water.
    • updateSwimming

      public void updateSwimming()
    • updateWaterState

      protected boolean updateWaterState()
    • checkWaterState

      void checkWaterState()
    • updateSubmergedInWaterState

      private void updateSubmergedInWaterState()
    • onSwimmingStart

      protected void onSwimmingStart()
    • getLandingBlockState

      protected BlockState getLandingBlockState()
    • shouldSpawnSprintingParticles

      public boolean shouldSpawnSprintingParticles()
    • spawnSprintingParticles

      protected void spawnSprintingParticles()
    • isSubmergedIn

      public boolean isSubmergedIn​(Tag<Fluid> tag)
    • isInLava

      public boolean isInLava()
    • updateVelocity

      public void updateVelocity​(float speed, Vec3d movementInput)
    • movementInputToVelocity

      private static Vec3d movementInputToVelocity​(Vec3d movementInput, float speed, float yaw)
    • getBrightnessAtEyes

      public float getBrightnessAtEyes()
    • setWorld

      public void setWorld​(World world)
    • updatePositionAndAngles

      public void updatePositionAndAngles​(double x, double y, double z, float yaw, float pitch)
    • method_30634

      public void method_30634​(double x, double y, double z)
    • refreshPositionAfterTeleport

      public void refreshPositionAfterTeleport​(Vec3d vec3d)
    • refreshPositionAfterTeleport

      public void refreshPositionAfterTeleport​(double x, double y, double z)
    • refreshPositionAndAngles

      public void refreshPositionAndAngles​(BlockPos pos, float yaw, float pitch)
    • refreshPositionAndAngles

      public void refreshPositionAndAngles​(double x, double y, double z, float yaw, float pitch)
    • resetPosition

      public void resetPosition​(double x, double y, double z)
    • distanceTo

      public float distanceTo​(Entity entity)
    • squaredDistanceTo

      public double squaredDistanceTo​(double x, double y, double z)
    • squaredDistanceTo

      public double squaredDistanceTo​(Entity entity)
    • squaredDistanceTo

      public double squaredDistanceTo​(Vec3d vector)
    • onPlayerCollision

      public void onPlayerCollision​(PlayerEntity player)
    • pushAwayFrom

      public void pushAwayFrom​(Entity entity)
    • addVelocity

      public void addVelocity​(double deltaX, double deltaY, double deltaZ)
    • scheduleVelocityUpdate

      protected void scheduleVelocityUpdate()
    • damage

      public boolean damage​(DamageSource source, float amount)
    • getRotationVec

      public final Vec3d getRotationVec​(float tickDelta)
    • getPitch

      public float getPitch​(float tickDelta)
    • getYaw

      public float getYaw​(float tickDelta)
    • getRotationVector

      protected final Vec3d getRotationVector​(float pitch, float yaw)
    • getOppositeRotationVector

      public final Vec3d getOppositeRotationVector​(float tickDelta)
    • getOppositeRotationVector

      protected final Vec3d getOppositeRotationVector​(float pitch, float yaw)
    • getCameraPosVec

      public final Vec3d getCameraPosVec​(float tickDelta)
    • method_31166

      @Environment(CLIENT) public Vec3d method_31166​(float tickDelta)
    • method_30950

      @Environment(CLIENT) public final Vec3d method_30950​(float float2)
    • raycast

      public HitResult raycast​(double maxDistance, float tickDelta, boolean includeFluids)
    • collides

      public boolean collides()
    • isPushable

      public boolean isPushable()
    • updateKilledAdvancementCriterion

      public void updateKilledAdvancementCriterion​(Entity killer, int score, DamageSource damageSource)
    • shouldRender

      @Environment(CLIENT) public boolean shouldRender​(double cameraX, double cameraY, double cameraZ)
    • shouldRender

      @Environment(CLIENT) public boolean shouldRender​(double distance)
    • saveSelfToTag

      public boolean saveSelfToTag​(CompoundTag tag)
    • saveToTag

      public boolean saveToTag​(CompoundTag tag)
    • toTag

      public CompoundTag toTag​(CompoundTag tag)
    • fromTag

      public void fromTag​(CompoundTag tag)
    • shouldSetPositionOnLoad

      protected boolean shouldSetPositionOnLoad()
    • getSavedEntityId

      @Nullable protected final String getSavedEntityId()
    • readCustomDataFromTag

      protected abstract void readCustomDataFromTag​(CompoundTag tag)
    • writeCustomDataToTag

      protected abstract void writeCustomDataToTag​(CompoundTag tag)
    • toListTag

      protected ListTag toListTag​(double[] values)
    • toListTag

      protected ListTag toListTag​(float[] values)
    • dropItem

      @Nullable public ItemEntity dropItem​(ItemConvertible item)
    • dropItem

      @Nullable public ItemEntity dropItem​(ItemConvertible item, int yOffset)
    • dropStack

      @Nullable public ItemEntity dropStack​(ItemStack stack)
    • dropStack

      @Nullable public ItemEntity dropStack​(ItemStack stack, float yOffset)
    • isAlive

      public boolean isAlive()
    • isInsideWall

      public boolean isInsideWall()
    • interact

      public ActionResult interact​(PlayerEntity player, Hand hand)
      Called when a player interacts with this entity.
      Parameters:
      player - the player
      hand - the hand the player used to interact with this entity
    • collidesWith

      public boolean collidesWith​(Entity other)
    • isCollidable

      public boolean isCollidable()
    • tickRiding

      public void tickRiding()
    • updatePassengerPosition

      public void updatePassengerPosition​(Entity passenger)
    • updatePassengerPosition

      private void updatePassengerPosition​(Entity passenger, Entity.PositionUpdater positionUpdater)
    • onPassengerLookAround

      @Environment(CLIENT) public void onPassengerLookAround​(Entity passenger)
    • getHeightOffset

      public double getHeightOffset()
    • getMountedHeightOffset

      public double getMountedHeightOffset()
    • startRiding

      public boolean startRiding​(Entity entity)
    • isLiving

      @Environment(CLIENT) public boolean isLiving()
    • startRiding

      public boolean startRiding​(Entity entity, boolean force)
    • canStartRiding

      protected boolean canStartRiding​(Entity entity)
    • wouldPoseNotCollide

      protected boolean wouldPoseNotCollide​(EntityPose pose)
    • removeAllPassengers

      public void removeAllPassengers()
    • method_29239

      public void method_29239()
    • stopRiding

      public void stopRiding()
    • addPassenger

      protected void addPassenger​(Entity passenger)
    • removePassenger

      protected void removePassenger​(Entity passenger)
    • canAddPassenger

      protected boolean canAddPassenger​(Entity passenger)
    • updateTrackedPositionAndAngles

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

      @Environment(CLIENT) public void updateTrackedHeadRotation​(float yaw, int interpolationSteps)
    • getTargetingMargin

      public float getTargetingMargin()
    • getRotationVector

      public Vec3d getRotationVector()
    • getRotationClient

      public Vec2f getRotationClient()
    • getRotationVecClient

      @Environment(CLIENT) public Vec3d getRotationVecClient()
    • setInNetherPortal

      public void setInNetherPortal​(BlockPos pos)
    • tickNetherPortal

      protected void tickNetherPortal()
    • getDefaultNetherPortalCooldown

      public int getDefaultNetherPortalCooldown()
    • setVelocityClient

      @Environment(CLIENT) public void setVelocityClient​(double x, double y, double z)
    • handleStatus

      @Environment(CLIENT) public void handleStatus​(byte status)
    • animateDamage

      @Environment(CLIENT) public void animateDamage()
    • getItemsHand

      public Iterable<ItemStack> getItemsHand()
    • getArmorItems

      public Iterable<ItemStack> getArmorItems()
    • getItemsEquipped

      public Iterable<ItemStack> getItemsEquipped()
    • equipStack

      public void equipStack​(EquipmentSlot slot, ItemStack stack)
    • isOnFire

      public boolean isOnFire()
    • hasVehicle

      public boolean hasVehicle()
    • hasPassengers

      public boolean hasPassengers()
    • canBeRiddenInWater

      public boolean canBeRiddenInWater()
    • setSneaking

      public void setSneaking​(boolean sneaking)
    • isSneaking

      public boolean isSneaking()
    • bypassesSteppingEffects

      public boolean bypassesSteppingEffects()
    • bypassesLandingEffects

      public boolean bypassesLandingEffects()
    • isSneaky

      public boolean isSneaky()
    • isDescending

      public boolean isDescending()
    • isInSneakingPose

      public boolean isInSneakingPose()
      Returns whether the entity is in a crouching pose.

      Compared to isSneaking(), it only makes the entity appear crouching and does not bring other effects of sneaking, such as no less obvious name label rendering, no dismounting while riding, etc.

      This is used by vanilla for non-player entities to crouch, such as for foxes and cats.

    • isSprinting

      public boolean isSprinting()
    • setSprinting

      public void setSprinting​(boolean sprinting)
    • isSwimming

      public boolean isSwimming()
    • isInSwimmingPose

      public boolean isInSwimmingPose()
    • shouldLeaveSwimmingPose

      @Environment(CLIENT) public boolean shouldLeaveSwimmingPose()
    • setSwimming

      public void setSwimming​(boolean swimming)
    • isGlowing

      public boolean isGlowing()
    • setGlowing

      public void setGlowing​(boolean glowing)
    • isInvisible

      public boolean isInvisible()
    • isInvisibleTo

      @Environment(CLIENT) public boolean isInvisibleTo​(PlayerEntity player)
    • getScoreboardTeam

      @Nullable public AbstractTeam getScoreboardTeam()
    • isTeammate

      public boolean isTeammate​(Entity other)
    • isTeamPlayer

      public boolean isTeamPlayer​(AbstractTeam team)
    • setInvisible

      public void setInvisible​(boolean invisible)
    • getFlag

      protected boolean getFlag​(int index)
    • setFlag

      protected void setFlag​(int index, boolean value)
    • getMaxAir

      public int getMaxAir()
    • getAir

      public int getAir()
    • setAir

      public void setAir​(int air)
    • onStruckByLightning

      public void onStruckByLightning​(ServerWorld world, LightningEntity lightning)
    • onBubbleColumnSurfaceCollision

      public void onBubbleColumnSurfaceCollision​(boolean drag)
    • onBubbleColumnCollision

      public void onBubbleColumnCollision​(boolean drag)
    • onKilledOther

      public void onKilledOther​(ServerWorld serverWorld, LivingEntity livingEntity)
    • pushOutOfBlocks

      protected void pushOutOfBlocks​(double x, double y, double z)
    • slowMovement

      public void slowMovement​(BlockState state, Vec3d multiplier)
    • removeClickEvents

      private static Text removeClickEvents​(Text textComponent)
    • getName

      public Text getName()
      Specified by:
      getName in interface Nameable
    • getDefaultName

      protected Text getDefaultName()
    • isPartOf

      public boolean isPartOf​(Entity entity)
    • getHeadYaw

      public float getHeadYaw()
    • setHeadYaw

      public void setHeadYaw​(float headYaw)
    • setYaw

      public void setYaw​(float yaw)
    • isAttackable

      public boolean isAttackable()
    • handleAttack

      public boolean handleAttack​(Entity attacker)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isInvulnerableTo

      public boolean isInvulnerableTo​(DamageSource damageSource)
    • isInvulnerable

      public boolean isInvulnerable()
    • setInvulnerable

      public void setInvulnerable​(boolean invulnerable)
    • copyPositionAndRotation

      public void copyPositionAndRotation​(Entity entity)
    • copyFrom

      public void copyFrom​(Entity original)
    • moveToWorld

      @Nullable public Entity moveToWorld​(ServerWorld destination)
      Moves this entity to another world.

      Note all entities except server player entities are completely recreated at the destination.

      Returns:
      the entity in the other world
    • method_30076

      protected void method_30076()
    • getTeleportTarget

      @Nullable protected TeleportTarget getTeleportTarget​(ServerWorld destination)
    • method_30633

      protected Vec3d method_30633​(Direction.Axis axis, class_5459.class_5460 class_5460)
    • method_30330

      protected Optional<class_5459.class_5460> method_30330​(ServerWorld serverWorld, BlockPos blockPos, boolean bool)
    • canUsePortals

      public boolean canUsePortals()
    • getEffectiveExplosionResistance

      public float getEffectiveExplosionResistance​(Explosion explosion, BlockView world, BlockPos pos, BlockState blockState, FluidState fluidState, float max)
    • canExplosionDestroyBlock

      public boolean canExplosionDestroyBlock​(Explosion explosion, BlockView world, BlockPos pos, BlockState state, float explosionPower)
    • getSafeFallDistance

      public int getSafeFallDistance()
    • canAvoidTraps

      public boolean canAvoidTraps()
    • populateCrashReport

      public void populateCrashReport​(CrashReportSection section)
    • doesRenderOnFire

      @Environment(CLIENT) public boolean doesRenderOnFire()
    • setUuid

      public void setUuid​(UUID uuid)
    • getUuid

      public UUID getUuid()
    • getUuidAsString

      public String getUuidAsString()
    • getEntityName

      public String getEntityName()
    • canFly

      public boolean canFly()
    • getRenderDistanceMultiplier

      @Environment(CLIENT) public static double getRenderDistanceMultiplier()
    • setRenderDistanceMultiplier

      @Environment(CLIENT) public static void setRenderDistanceMultiplier​(double value)
    • getDisplayName

      public Text getDisplayName()
      Specified by:
      getDisplayName in interface Nameable
    • setCustomName

      public void setCustomName​(@Nullable Text name)
    • getCustomName

      @Nullable public Text getCustomName()
      Specified by:
      getCustomName in interface Nameable
    • hasCustomName

      public boolean hasCustomName()
      Specified by:
      hasCustomName in interface Nameable
    • setCustomNameVisible

      public void setCustomNameVisible​(boolean visible)
    • isCustomNameVisible

      public boolean isCustomNameVisible()
    • teleport

      public final void teleport​(double destX, double destY, double destZ)
    • requestTeleport

      public void requestTeleport​(double destX, double destY, double destZ)
    • shouldRenderName

      @Environment(CLIENT) public boolean shouldRenderName()
    • onTrackedDataSet

      public void onTrackedDataSet​(TrackedData<?> data)
    • calculateDimensions

      public void calculateDimensions()
    • getHorizontalFacing

      public Direction getHorizontalFacing()
    • getMovementDirection

      public Direction getMovementDirection()
    • getHoverEvent

      protected HoverEvent getHoverEvent()
    • canBeSpectated

      public boolean canBeSpectated​(ServerPlayerEntity spectator)
    • getBoundingBox

      public Box getBoundingBox()
    • getVisibilityBoundingBox

      @Environment(CLIENT) public Box getVisibilityBoundingBox()
    • calculateBoundsForPose

      protected Box calculateBoundsForPose​(EntityPose pos)
    • setBoundingBox

      public void setBoundingBox​(Box boundingBox)
    • getEyeHeight

      protected float getEyeHeight​(EntityPose pose, EntityDimensions dimensions)
    • getEyeHeight

      @Environment(CLIENT) public float getEyeHeight​(EntityPose pose)
    • getStandingEyeHeight

      public final float getStandingEyeHeight()
    • method_29919

      @Environment(CLIENT) public Vec3d method_29919()
    • equip

      public boolean equip​(int slot, ItemStack item)
    • sendSystemMessage

      public void sendSystemMessage​(Text message, UUID senderUuid)
      Specified by:
      sendSystemMessage in interface CommandOutput
    • getEntityWorld

      public World getEntityWorld()
    • getServer

      @Nullable public MinecraftServer getServer()
    • interactAt

      public ActionResult interactAt​(PlayerEntity player, Vec3d hitPos, Hand hand)
    • isImmuneToExplosion

      public boolean isImmuneToExplosion()
    • dealDamage

      public void dealDamage​(LivingEntity attacker, Entity target)
    • onStartedTrackingBy

      public void onStartedTrackingBy​(ServerPlayerEntity player)
    • onStoppedTrackingBy

      public void onStoppedTrackingBy​(ServerPlayerEntity player)
    • applyRotation

      public float applyRotation​(BlockRotation rotation)
    • applyMirror

      public float applyMirror​(BlockMirror mirror)
    • entityDataRequiresOperator

      public boolean entityDataRequiresOperator()
    • teleportRequested

      public boolean teleportRequested()
    • isChunkPosUpdateRequested

      public boolean isChunkPosUpdateRequested()
    • getPrimaryPassenger

      @Nullable public Entity getPrimaryPassenger()
    • getPassengerList

      public List<Entity> getPassengerList()
    • hasPassenger

      public boolean hasPassenger​(Entity passenger)
    • hasPassengerType

      public boolean hasPassengerType​(Class<? extends Entity> clazz)
    • getPassengersDeep

      public Collection<Entity> getPassengersDeep()
    • streamPassengersRecursively

      public Stream<Entity> streamPassengersRecursively()
    • hasPlayerRider

      public boolean hasPlayerRider()
    • collectPassengers

      private void collectPassengers​(boolean playersOnly, Set<Entity> output)
    • getRootVehicle

      public Entity getRootVehicle()
      Gets the lowest entity this entity is riding.
    • isConnectedThroughVehicle

      public boolean isConnectedThroughVehicle​(Entity entity)
      Checks if this entity and another entity share the same root vehicle.
      Parameters:
      entity - the other entity
    • hasPassengerDeep

      @Environment(CLIENT) public boolean hasPassengerDeep​(Entity passenger)
    • isLogicalSideForUpdatingMovement

      public boolean isLogicalSideForUpdatingMovement()
    • getPassengerDismountOffset

      protected static Vec3d getPassengerDismountOffset​(double vehicleWidth, double passengerWidth, float passengerYaw)
    • updatePassengerForDismount

      public Vec3d updatePassengerForDismount​(LivingEntity passenger)
    • getVehicle

      @Nullable public Entity getVehicle()
    • getPistonBehavior

      public PistonBehavior getPistonBehavior()
    • getSoundCategory

      public SoundCategory getSoundCategory()
    • getBurningDuration

      protected int getBurningDuration()
    • getCommandSource

      public ServerCommandSource getCommandSource()
    • getPermissionLevel

      protected int getPermissionLevel()
    • hasPermissionLevel

      public boolean hasPermissionLevel​(int permissionLevel)
    • shouldReceiveFeedback

      public boolean shouldReceiveFeedback()
      Specified by:
      shouldReceiveFeedback in interface CommandOutput
    • shouldTrackOutput

      public boolean shouldTrackOutput()
      Specified by:
      shouldTrackOutput in interface CommandOutput
    • shouldBroadcastConsoleToOps

      public boolean shouldBroadcastConsoleToOps()
      Specified by:
      shouldBroadcastConsoleToOps in interface CommandOutput
    • lookAt

      public void lookAt​(EntityAnchorArgumentType.EntityAnchor anchorPoint, Vec3d target)
    • updateMovementInFluid

      public boolean updateMovementInFluid​(Tag<Fluid> tag, double double2)
    • getFluidHeight

      public double getFluidHeight​(Tag<Fluid> fluid)
    • method_29241

      public double method_29241()
    • getWidth

      public final float getWidth()
    • getHeight

      public final float getHeight()
    • createSpawnPacket

      public abstract Packet<?> createSpawnPacket()
    • getDimensions

      public EntityDimensions getDimensions​(EntityPose pose)
    • getPos

      public Vec3d getPos()
    • getBlockPos

      public BlockPos getBlockPos()
    • getVelocity

      public Vec3d getVelocity()
    • setVelocity

      public void setVelocity​(Vec3d velocity)
    • setVelocity

      public void setVelocity​(double x, double y, double z)
    • getX

      public final double getX()
    • offsetX

      public double offsetX​(double widthScale)
    • getParticleX

      public double getParticleX​(double widthScale)
    • getY

      public final double getY()
    • getBodyY

      public double getBodyY​(double heightScale)
    • getRandomBodyY

      public double getRandomBodyY()
    • getEyeY

      public double getEyeY()
    • getZ

      public final double getZ()
    • offsetZ

      public double offsetZ​(double widthScale)
    • getParticleZ

      public double getParticleZ​(double widthScale)
    • setPos

      public void setPos​(double x, double y, double z)
    • checkDespawn

      public void checkDespawn()
    • method_30951

      @Environment(CLIENT) public Vec3d method_30951​(float float2)