Class Entity

All Implemented Interfaces:
ICommandSource, INameable, ICapabilityProvider, ICapabilitySerializable<CompoundNBT>, IForgeEntity, INBTSerializable<CompoundNBT>
Direct Known Subclasses:
AbstractMinecartEntity, AreaEffectCloudEntity, BoatEntity, EnderCrystalEntity, EvokerFangsEntity, ExperienceOrbEntity, EyeOfEnderEntity, FallingBlockEntity, HangingEntity, ItemEntity, LightningBoltEntity, LivingEntity, PartEntity, ProjectileEntity, TNTEntity

public abstract class Entity extends CapabilityProvider<Entity> implements INameable, ICommandSource, IForgeEntity
  • Field Details

    • LOGGER

      protected static final org.apache.logging.log4j.Logger LOGGER
    • ENTITY_COUNTER

      protected static final AtomicInteger ENTITY_COUNTER
    • EMPTY_LIST

      private static final List<ItemStack> EMPTY_LIST
    • INITIAL_AABB

      private static final AxisAlignedBB INITIAL_AABB
    • viewScale

      private static double viewScale
    • type

      @Deprecated private final EntityType<?> type
      Deprecated.
    • id

      private int id
    • blocksBuilding

      public boolean blocksBuilding
    • passengers

      private final List<Entity> passengers
    • boardingCooldown

      protected int boardingCooldown
    • vehicle

      @Nullable private Entity vehicle
    • forcedLoading

      public boolean forcedLoading
    • level

      public World level
    • xo

      public double xo
    • yo

      public double yo
    • zo

      public double zo
    • position

      private Vector3d position
    • blockPosition

      private BlockPos blockPosition
    • deltaMovement

      private Vector3d deltaMovement
    • yRot

      public float yRot
    • xRot

      public float xRot
    • yRotO

      public float yRotO
    • xRotO

      public float xRotO
    • bb

      private AxisAlignedBB bb
    • onGround

      protected boolean onGround
    • horizontalCollision

      public boolean horizontalCollision
    • verticalCollision

      public boolean verticalCollision
    • hurtMarked

      public boolean hurtMarked
    • stuckSpeedMultiplier

      protected Vector3d stuckSpeedMultiplier
    • removed

      @Deprecated public boolean removed
      Deprecated.
    • walkDistO

      public float walkDistO
    • walkDist

      public float walkDist
    • moveDist

      public float moveDist
    • fallDistance

      public float fallDistance
    • nextStep

      private float nextStep
    • nextFlap

      private float nextFlap
    • xOld

      public double xOld
    • yOld

      public double yOld
    • zOld

      public double zOld
    • maxUpStep

      public float maxUpStep
    • noPhysics

      public boolean noPhysics
    • pushthrough

      public float pushthrough
    • random

      protected final Random random
    • tickCount

      public int tickCount
    • remainingFireTicks

      private int remainingFireTicks
    • wasTouchingWater

      protected boolean wasTouchingWater
    • fluidHeight

      protected it.unimi.dsi.fastutil.objects.Object2DoubleMap<ITag<Fluid>> fluidHeight
    • wasEyeInWater

      protected boolean wasEyeInWater
    • fluidOnEyes

      @Nullable protected ITag<Fluid> fluidOnEyes
    • invulnerableTime

      public int invulnerableTime
    • firstTick

      protected boolean firstTick
    • entityData

      protected final EntityDataManager entityData
    • DATA_SHARED_FLAGS_ID

      protected static final DataParameter<Byte> DATA_SHARED_FLAGS_ID
    • DATA_AIR_SUPPLY_ID

      private static final DataParameter<Integer> DATA_AIR_SUPPLY_ID
    • DATA_CUSTOM_NAME

      private static final DataParameter<Optional<ITextComponent>> DATA_CUSTOM_NAME
    • DATA_CUSTOM_NAME_VISIBLE

      private static final DataParameter<Boolean> DATA_CUSTOM_NAME_VISIBLE
    • DATA_SILENT

      private static final DataParameter<Boolean> DATA_SILENT
    • DATA_NO_GRAVITY

      private static final DataParameter<Boolean> DATA_NO_GRAVITY
    • DATA_POSE

      protected static final DataParameter<Pose> DATA_POSE
    • inChunk

      public boolean inChunk
    • xChunk

      public int xChunk
    • yChunk

      public int yChunk
    • zChunk

      public int zChunk
    • movedSinceLastChunkCheck

      private boolean movedSinceLastChunkCheck
    • packetCoordinates

      private Vector3d packetCoordinates
    • noCulling

      public boolean noCulling
    • hasImpulse

      public boolean hasImpulse
    • portalCooldown

      private int portalCooldown
    • isInsidePortal

      protected boolean isInsidePortal
    • portalTime

      protected int portalTime
    • portalEntrancePos

      protected BlockPos portalEntrancePos
    • invulnerable

      private boolean invulnerable
    • uuid

      protected UUID uuid
    • stringUUID

      protected String stringUUID
    • glowing

      protected boolean glowing
    • tags

      private final Set<String> tags
    • forceChunkAddition

      private boolean forceChunkAddition
    • pistonDeltas

      private final double[] pistonDeltas
    • pistonDeltasGameTime

      private long pistonDeltasGameTime
    • dimensions

      private EntitySize dimensions
    • eyeHeight

      private float eyeHeight
    • canUpdate

      private boolean canUpdate
    • captureDrops

      private Collection<ItemEntity> captureDrops
    • persistentData

      private CompoundNBT persistentData
    • isAddedToWorld

      private boolean isAddedToWorld
      Internal use for keeping track of entities that are tracked by a world, to allow guarantees that entity position changes will force a chunk load, avoiding potential issues with entity desyncing and bad chunk data.
  • Constructor Details

  • Method Details

    • isColliding

      public boolean isColliding(BlockPos p_242278_1_, BlockState p_242278_2_)
    • getTeamColor

      public int getTeamColor()
    • isSpectator

      public boolean isSpectator()
    • unRide

      public final void unRide()
    • setPacketCoordinates

      public void setPacketCoordinates(double p_213312_1_, double p_213312_3_, double p_213312_5_)
    • setPacketCoordinates

      public void setPacketCoordinates(Vector3d p_242277_1_)
    • getPacketCoordinates

      public Vector3d getPacketCoordinates()
    • getType

      public EntityType<?> getType()
    • getId

      public int getId()
    • setId

      public void setId(int p_145769_1_)
    • getTags

      public Set<String> getTags()
    • addTag

      public boolean addTag(String p_184211_1_)
    • removeTag

      public boolean removeTag(String p_184197_1_)
    • kill

      public void kill()
    • defineSynchedData

      protected abstract void defineSynchedData()
    • getEntityData

      public EntityDataManager getEntityData()
    • equals

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

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

      protected void resetPos()
    • remove

      public void remove()
    • remove

      public void remove(boolean keepData)
    • setPose

      public void setPose(Pose p_213301_1_)
    • getPose

      public Pose getPose()
    • closerThan

      public boolean closerThan(Entity p_233562_1_, double p_233562_2_)
    • setRot

      protected void setRot(float p_70101_1_, float p_70101_2_)
    • setPos

      public void setPos(double p_70107_1_, double p_70107_3_, double p_70107_5_)
    • reapplyPosition

      protected void reapplyPosition()
    • turn

      public void turn(double p_195049_1_, double p_195049_3_)
    • tick

      public void tick()
    • baseTick

      public void baseTick()
    • setPortalCooldown

      public void setPortalCooldown()
    • isOnPortalCooldown

      public boolean isOnPortalCooldown()
    • processPortalCooldown

      protected void processPortalCooldown()
    • getPortalWaitTime

      public int getPortalWaitTime()
    • lavaHurt

      protected void lavaHurt()
    • setSecondsOnFire

      public void setSecondsOnFire(int p_70015_1_)
    • setRemainingFireTicks

      public void setRemainingFireTicks(int p_241209_1_)
    • getRemainingFireTicks

      public int getRemainingFireTicks()
    • clearFire

      public void clearFire()
    • outOfWorld

      protected void outOfWorld()
    • isFree

      public boolean isFree(double p_70038_1_, double p_70038_3_, double p_70038_5_)
    • isFree

      private boolean isFree(AxisAlignedBB p_174809_1_)
    • setOnGround

      public void setOnGround(boolean p_230245_1_)
    • isOnGround

      public boolean isOnGround()
    • move

      public void move(MoverType p_213315_1_, Vector3d p_213315_2_)
    • getOnPos

      protected BlockPos getOnPos()
    • getBlockJumpFactor

      protected float getBlockJumpFactor()
    • getBlockSpeedFactor

      protected float getBlockSpeedFactor()
    • getBlockPosBelowThatAffectsMyMovement

      protected BlockPos getBlockPosBelowThatAffectsMyMovement()
    • maybeBackOffFromEdge

      protected Vector3d maybeBackOffFromEdge(Vector3d p_225514_1_, MoverType p_225514_2_)
    • limitPistonMovement

      protected Vector3d limitPistonMovement(Vector3d p_213308_1_)
    • applyPistonMovementRestriction

      private double applyPistonMovementRestriction(Direction.Axis p_213304_1_, double p_213304_2_)
    • collide

      private Vector3d collide(Vector3d p_213306_1_)
    • getHorizontalDistanceSqr

      public static double getHorizontalDistanceSqr(Vector3d p_213296_0_)
    • collideBoundingBoxHeuristically

      public static Vector3d collideBoundingBoxHeuristically(@Nullable Entity p_223307_0_, Vector3d p_223307_1_, AxisAlignedBB p_223307_2_, World p_223307_3_, ISelectionContext p_223307_4_, ReuseableStream<VoxelShape> p_223307_5_)
    • collideBoundingBoxLegacy

      public static Vector3d collideBoundingBoxLegacy(Vector3d p_223310_0_, AxisAlignedBB p_223310_1_, ReuseableStream<VoxelShape> p_223310_2_)
    • collideBoundingBox

      public static Vector3d collideBoundingBox(Vector3d p_213313_0_, AxisAlignedBB p_213313_1_, IWorldReader p_213313_2_, ISelectionContext p_213313_3_, ReuseableStream<VoxelShape> p_213313_4_)
    • nextStep

      protected float nextStep()
    • setLocationFromBoundingbox

      public void setLocationFromBoundingbox()
    • getSwimSound

      protected SoundEvent getSwimSound()
    • getSwimSplashSound

      protected SoundEvent getSwimSplashSound()
    • getSwimHighSpeedSplashSound

      protected SoundEvent getSwimHighSpeedSplashSound()
    • checkInsideBlocks

      protected void checkInsideBlocks()
    • onInsideBlock

      protected void onInsideBlock(BlockState p_191955_1_)
    • playStepSound

      protected void playStepSound(BlockPos p_180429_1_, BlockState p_180429_2_)
    • playSwimSound

      protected void playSwimSound(float p_203006_1_)
    • playFlySound

      protected float playFlySound(float p_191954_1_)
    • makeFlySound

      protected boolean makeFlySound()
    • playSound

      public void playSound(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_)
    • isSilent

      public boolean isSilent()
    • setSilent

      public void setSilent(boolean p_174810_1_)
    • isNoGravity

      public boolean isNoGravity()
    • setNoGravity

      public void setNoGravity(boolean p_189654_1_)
    • isMovementNoisy

      protected boolean isMovementNoisy()
    • checkFallDamage

      protected void checkFallDamage(double p_184231_1_, boolean p_184231_3_, BlockState p_184231_4_, BlockPos p_184231_5_)
    • fireImmune

      public boolean fireImmune()
    • causeFallDamage

      public boolean causeFallDamage(float p_225503_1_, float p_225503_2_)
    • isInWater

      public boolean isInWater()
    • isInRain

      private boolean isInRain()
    • isInBubbleColumn

      private boolean isInBubbleColumn()
    • isInWaterOrRain

      public boolean isInWaterOrRain()
    • isInWaterRainOrBubble

      public boolean isInWaterRainOrBubble()
    • isInWaterOrBubble

      public boolean isInWaterOrBubble()
    • isUnderWater

      public boolean isUnderWater()
    • updateSwimming

      public void updateSwimming()
    • updateInWaterStateAndDoFluidPushing

      protected boolean updateInWaterStateAndDoFluidPushing()
    • updateInWaterStateAndDoWaterCurrentPushing

      void updateInWaterStateAndDoWaterCurrentPushing()
    • updateFluidOnEyes

      private void updateFluidOnEyes()
    • doWaterSplashEffect

      protected void doWaterSplashEffect()
    • getBlockStateOn

      protected BlockState getBlockStateOn()
    • canSpawnSprintParticle

      public boolean canSpawnSprintParticle()
    • spawnSprintParticle

      protected void spawnSprintParticle()
    • isEyeInFluid

      public boolean isEyeInFluid(ITag<Fluid> p_208600_1_)
    • isInLava

      public boolean isInLava()
    • moveRelative

      public void moveRelative(float p_213309_1_, Vector3d p_213309_2_)
    • getInputVector

      private static Vector3d getInputVector(Vector3d p_213299_0_, float p_213299_1_, float p_213299_2_)
    • getBrightness

      public float getBrightness()
    • setLevel

      public void setLevel(World p_70029_1_)
    • absMoveTo

      public void absMoveTo(double p_70080_1_, double p_70080_3_, double p_70080_5_, float p_70080_7_, float p_70080_8_)
    • absMoveTo

      public void absMoveTo(double p_242281_1_, double p_242281_3_, double p_242281_5_)
    • moveTo

      public void moveTo(Vector3d p_233576_1_)
    • moveTo

      public void moveTo(double p_225653_1_, double p_225653_3_, double p_225653_5_)
    • moveTo

      public void moveTo(BlockPos p_174828_1_, float p_174828_2_, float p_174828_3_)
    • moveTo

      public void moveTo(double p_70012_1_, double p_70012_3_, double p_70012_5_, float p_70012_7_, float p_70012_8_)
    • setPosAndOldPos

      public void setPosAndOldPos(double p_226286_1_, double p_226286_3_, double p_226286_5_)
    • distanceTo

      public float distanceTo(Entity p_70032_1_)
    • distanceToSqr

      public double distanceToSqr(double p_70092_1_, double p_70092_3_, double p_70092_5_)
    • distanceToSqr

      public double distanceToSqr(Entity p_70068_1_)
    • distanceToSqr

      public double distanceToSqr(Vector3d p_195048_1_)
    • playerTouch

      public void playerTouch(PlayerEntity p_70100_1_)
    • push

      public void push(Entity p_70108_1_)
    • push

      public void push(double p_70024_1_, double p_70024_3_, double p_70024_5_)
    • markHurt

      protected void markHurt()
    • hurt

      public boolean hurt(DamageSource p_70097_1_, float p_70097_2_)
    • getViewVector

      public final Vector3d getViewVector(float p_70676_1_)
    • getViewXRot

      public float getViewXRot(float p_195050_1_)
    • getViewYRot

      public float getViewYRot(float p_195046_1_)
    • calculateViewVector

      protected final Vector3d calculateViewVector(float p_174806_1_, float p_174806_2_)
    • getUpVector

      public final Vector3d getUpVector(float p_213286_1_)
    • calculateUpVector

      protected final Vector3d calculateUpVector(float p_213320_1_, float p_213320_2_)
    • getEyePosition

      public final Vector3d getEyePosition(float p_174824_1_)
    • getLightProbePosition

      public Vector3d getLightProbePosition(float p_241842_1_)
    • getPosition

      public final Vector3d getPosition(float p_242282_1_)
    • pick

      public RayTraceResult pick(double p_213324_1_, float p_213324_3_, boolean p_213324_4_)
    • isPickable

      public boolean isPickable()
    • isPushable

      public boolean isPushable()
    • awardKillScore

      public void awardKillScore(Entity p_191956_1_, int p_191956_2_, DamageSource p_191956_3_)
    • shouldRender

      public boolean shouldRender(double p_145770_1_, double p_145770_3_, double p_145770_5_)
    • shouldRenderAtSqrDistance

      public boolean shouldRenderAtSqrDistance(double p_70112_1_)
    • saveAsPassenger

      public boolean saveAsPassenger(CompoundNBT p_184198_1_)
    • save

      public boolean save(CompoundNBT p_70039_1_)
    • saveWithoutId

      public CompoundNBT saveWithoutId(CompoundNBT p_189511_1_)
    • load

      public void load(CompoundNBT p_70020_1_)
    • repositionEntityAfterLoad

      protected boolean repositionEntityAfterLoad()
    • getEncodeId

      @Nullable public final String getEncodeId()
    • readAdditionalSaveData

      protected abstract void readAdditionalSaveData(CompoundNBT p_70037_1_)
    • addAdditionalSaveData

      protected abstract void addAdditionalSaveData(CompoundNBT p_213281_1_)
    • newDoubleList

      protected ListNBT newDoubleList(double... p_70087_1_)
    • newFloatList

      protected ListNBT newFloatList(float... p_70049_1_)
    • spawnAtLocation

      @Nullable public ItemEntity spawnAtLocation(IItemProvider p_199703_1_)
    • spawnAtLocation

      @Nullable public ItemEntity spawnAtLocation(IItemProvider p_199702_1_, int p_199702_2_)
    • spawnAtLocation

      @Nullable public ItemEntity spawnAtLocation(ItemStack p_199701_1_)
    • spawnAtLocation

      @Nullable public ItemEntity spawnAtLocation(ItemStack p_70099_1_, float p_70099_2_)
    • isAlive

      public boolean isAlive()
    • isInWall

      public boolean isInWall()
    • interact

      public ActionResultType interact(PlayerEntity p_184230_1_, Hand p_184230_2_)
    • canCollideWith

      public boolean canCollideWith(Entity p_241849_1_)
    • canBeCollidedWith

      public boolean canBeCollidedWith()
    • rideTick

      public void rideTick()
    • positionRider

      public void positionRider(Entity p_184232_1_)
    • positionRider

      private void positionRider(Entity p_226266_1_, Entity.IMoveCallback p_226266_2_)
    • onPassengerTurned

      public void onPassengerTurned(Entity p_184190_1_)
    • getMyRidingOffset

      public double getMyRidingOffset()
    • getPassengersRidingOffset

      public double getPassengersRidingOffset()
    • startRiding

      public boolean startRiding(Entity p_184220_1_)
    • showVehicleHealth

      public boolean showVehicleHealth()
    • startRiding

      public boolean startRiding(Entity p_184205_1_, boolean p_184205_2_)
    • canRide

      protected boolean canRide(Entity p_184228_1_)
    • canEnterPose

      protected boolean canEnterPose(Pose p_213298_1_)
    • ejectPassengers

      public void ejectPassengers()
    • removeVehicle

      public void removeVehicle()
    • stopRiding

      public void stopRiding()
    • addPassenger

      protected void addPassenger(Entity p_184200_1_)
    • removePassenger

      protected void removePassenger(Entity p_184225_1_)
    • canAddPassenger

      protected boolean canAddPassenger(Entity p_184219_1_)
    • lerpTo

      public void lerpTo(double p_180426_1_, double p_180426_3_, double p_180426_5_, float p_180426_7_, float p_180426_8_, int p_180426_9_, boolean p_180426_10_)
    • lerpHeadTo

      public void lerpHeadTo(float p_208000_1_, int p_208000_2_)
    • getPickRadius

      public float getPickRadius()
    • getLookAngle

      public Vector3d getLookAngle()
    • getRotationVector

      public Vector2f getRotationVector()
    • getForward

      public Vector3d getForward()
    • handleInsidePortal

      public void handleInsidePortal(BlockPos p_181015_1_)
    • handleNetherPortal

      protected void handleNetherPortal()
    • getDimensionChangingDelay

      public int getDimensionChangingDelay()
    • lerpMotion

      public void lerpMotion(double p_70016_1_, double p_70016_3_, double p_70016_5_)
    • handleEntityEvent

      public void handleEntityEvent(byte p_70103_1_)
    • animateHurt

      public void animateHurt()
    • getHandSlots

      public Iterable<ItemStack> getHandSlots()
    • getArmorSlots

      public Iterable<ItemStack> getArmorSlots()
    • getAllSlots

      public Iterable<ItemStack> getAllSlots()
    • setItemSlot

      public void setItemSlot(EquipmentSlotType p_184201_1_, ItemStack p_184201_2_)
    • isOnFire

      public boolean isOnFire()
    • isPassenger

      public boolean isPassenger()
    • isVehicle

      public boolean isVehicle()
    • rideableUnderWater

      @Deprecated public boolean rideableUnderWater()
      Deprecated.
    • setShiftKeyDown

      public void setShiftKeyDown(boolean p_226284_1_)
    • isShiftKeyDown

      public boolean isShiftKeyDown()
    • isSteppingCarefully

      public boolean isSteppingCarefully()
    • isSuppressingBounce

      public boolean isSuppressingBounce()
    • isDiscrete

      public boolean isDiscrete()
    • isDescending

      public boolean isDescending()
    • isCrouching

      public boolean isCrouching()
    • isSprinting

      public boolean isSprinting()
    • setSprinting

      public void setSprinting(boolean p_70031_1_)
    • isSwimming

      public boolean isSwimming()
    • isVisuallySwimming

      public boolean isVisuallySwimming()
    • isVisuallyCrawling

      public boolean isVisuallyCrawling()
    • setSwimming

      public void setSwimming(boolean p_204711_1_)
    • isGlowing

      public boolean isGlowing()
    • setGlowing

      public void setGlowing(boolean p_184195_1_)
    • isInvisible

      public boolean isInvisible()
    • isInvisibleTo

      public boolean isInvisibleTo(PlayerEntity p_98034_1_)
    • getTeam

      @Nullable public Team getTeam()
    • isAlliedTo

      public boolean isAlliedTo(Entity p_184191_1_)
    • isAlliedTo

      public boolean isAlliedTo(Team p_184194_1_)
    • setInvisible

      public void setInvisible(boolean p_82142_1_)
    • getSharedFlag

      protected boolean getSharedFlag(int p_70083_1_)
    • setSharedFlag

      protected void setSharedFlag(int p_70052_1_, boolean p_70052_2_)
    • getMaxAirSupply

      public int getMaxAirSupply()
    • getAirSupply

      public int getAirSupply()
    • setAirSupply

      public void setAirSupply(int p_70050_1_)
    • thunderHit

      public void thunderHit(ServerWorld p_241841_1_, LightningBoltEntity p_241841_2_)
    • onAboveBubbleCol

      public void onAboveBubbleCol(boolean p_203002_1_)
    • onInsideBubbleColumn

      public void onInsideBubbleColumn(boolean p_203004_1_)
    • killed

      public void killed(ServerWorld p_241847_1_, LivingEntity p_241847_2_)
    • moveTowardsClosestSpace

      protected void moveTowardsClosestSpace(double p_213282_1_, double p_213282_3_, double p_213282_5_)
    • makeStuckInBlock

      public void makeStuckInBlock(BlockState p_213295_1_, Vector3d p_213295_2_)
    • removeAction

      private static ITextComponent removeAction(ITextComponent p_233573_0_)
    • getName

      public ITextComponent getName()
      Specified by:
      getName in interface INameable
    • getTypeName

      protected ITextComponent getTypeName()
    • is

      public boolean is(Entity p_70028_1_)
    • getYHeadRot

      public float getYHeadRot()
    • setYHeadRot

      public void setYHeadRot(float p_70034_1_)
    • setYBodyRot

      public void setYBodyRot(float p_181013_1_)
    • isAttackable

      public boolean isAttackable()
    • skipAttackInteraction

      public boolean skipAttackInteraction(Entity p_85031_1_)
    • toString

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

      public boolean isInvulnerableTo(DamageSource p_180431_1_)
    • isInvulnerable

      public boolean isInvulnerable()
    • setInvulnerable

      public void setInvulnerable(boolean p_184224_1_)
    • copyPosition

      public void copyPosition(Entity p_82149_1_)
    • restoreFrom

      public void restoreFrom(Entity p_180432_1_)
    • changeDimension

      @Nullable public Entity changeDimension(ServerWorld p_241206_1_)
    • changeDimension

      @Nullable public Entity changeDimension(ServerWorld p_241206_1_, ITeleporter teleporter)
    • removeAfterChangingDimensions

      protected void removeAfterChangingDimensions()
    • findDimensionEntryPoint

      @Nullable protected PortalInfo findDimensionEntryPoint(ServerWorld p_241829_1_)
    • getRelativePortalPosition

      protected Vector3d getRelativePortalPosition(Direction.Axis p_241839_1_, TeleportationRepositioner.Result p_241839_2_)
    • getExitPortal

      protected Optional<TeleportationRepositioner.Result> getExitPortal(ServerWorld p_241830_1_, BlockPos p_241830_2_, boolean p_241830_3_)
    • canChangeDimensions

      public boolean canChangeDimensions()
    • getBlockExplosionResistance

      public float getBlockExplosionResistance(Explosion p_180428_1_, IBlockReader p_180428_2_, BlockPos p_180428_3_, BlockState p_180428_4_, FluidState p_180428_5_, float p_180428_6_)
    • shouldBlockExplode

      public boolean shouldBlockExplode(Explosion p_174816_1_, IBlockReader p_174816_2_, BlockPos p_174816_3_, BlockState p_174816_4_, float p_174816_5_)
    • getMaxFallDistance

      public int getMaxFallDistance()
    • isIgnoringBlockTriggers

      public boolean isIgnoringBlockTriggers()
    • fillCrashReportCategory

      public void fillCrashReportCategory(CrashReportCategory p_85029_1_)
    • displayFireAnimation

      public boolean displayFireAnimation()
    • setUUID

      public void setUUID(UUID p_184221_1_)
    • getUUID

      public UUID getUUID()
    • getStringUUID

      public String getStringUUID()
    • getScoreboardName

      public String getScoreboardName()
    • isPushedByFluid

      public boolean isPushedByFluid()
    • getViewScale

      public static double getViewScale()
    • setViewScale

      public static void setViewScale(double p_184227_0_)
    • getDisplayName

      public ITextComponent getDisplayName()
      Specified by:
      getDisplayName in interface INameable
    • setCustomName

      public void setCustomName(@Nullable ITextComponent p_200203_1_)
    • getCustomName

      @Nullable public ITextComponent getCustomName()
      Specified by:
      getCustomName in interface INameable
    • hasCustomName

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

      public void setCustomNameVisible(boolean p_174805_1_)
    • isCustomNameVisible

      public boolean isCustomNameVisible()
    • teleportToWithTicket

      public final void teleportToWithTicket(double p_223102_1_, double p_223102_3_, double p_223102_5_)
    • teleportTo

      public void teleportTo(double p_70634_1_, double p_70634_3_, double p_70634_5_)
    • shouldShowName

      public boolean shouldShowName()
    • onSyncedDataUpdated

      public void onSyncedDataUpdated(DataParameter<?> p_184206_1_)
    • refreshDimensions

      public void refreshDimensions()
    • getDirection

      public Direction getDirection()
    • getMotionDirection

      public Direction getMotionDirection()
    • createHoverEvent

      protected HoverEvent createHoverEvent()
    • broadcastToPlayer

      public boolean broadcastToPlayer(ServerPlayerEntity p_174827_1_)
    • getBoundingBox

      public AxisAlignedBB getBoundingBox()
    • getBoundingBoxForCulling

      public AxisAlignedBB getBoundingBoxForCulling()
    • getBoundingBoxForPose

      protected AxisAlignedBB getBoundingBoxForPose(Pose p_213321_1_)
    • setBoundingBox

      public void setBoundingBox(AxisAlignedBB p_174826_1_)
    • getEyeHeight

      @Deprecated protected float getEyeHeight(Pose p_213316_1_, EntitySize p_213316_2_)
      Deprecated.
      Can be overridden but call IForgeEntity.getEyeHeightForge(Pose, EntitySize) instead.
    • getEyeHeight

      public float getEyeHeight(Pose p_213307_1_)
    • getEyeHeight

      public final float getEyeHeight()
    • getLeashOffset

      public Vector3d getLeashOffset()
    • setSlot

      public boolean setSlot(int p_174820_1_, ItemStack p_174820_2_)
    • sendMessage

      public void sendMessage(ITextComponent p_145747_1_, UUID p_145747_2_)
      Specified by:
      sendMessage in interface ICommandSource
    • getCommandSenderWorld

      public World getCommandSenderWorld()
    • getServer

      @Nullable public MinecraftServer getServer()
    • interactAt

      public ActionResultType interactAt(PlayerEntity p_184199_1_, Vector3d p_184199_2_, Hand p_184199_3_)
    • ignoreExplosion

      public boolean ignoreExplosion()
    • doEnchantDamageEffects

      public void doEnchantDamageEffects(LivingEntity p_174815_1_, Entity p_174815_2_)
    • startSeenByPlayer

      public void startSeenByPlayer(ServerPlayerEntity p_184178_1_)
    • stopSeenByPlayer

      public void stopSeenByPlayer(ServerPlayerEntity p_184203_1_)
    • rotate

      public float rotate(Rotation p_184229_1_)
    • mirror

      public float mirror(Mirror p_184217_1_)
    • onlyOpCanSetNbt

      public boolean onlyOpCanSetNbt()
    • checkAndResetForcedChunkAdditionFlag

      public boolean checkAndResetForcedChunkAdditionFlag()
    • checkAndResetUpdateChunkPos

      public boolean checkAndResetUpdateChunkPos()
    • getControllingPassenger

      @Nullable public Entity getControllingPassenger()
    • getPassengers

      public List<Entity> getPassengers()
    • hasPassenger

      public boolean hasPassenger(Entity p_184196_1_)
    • hasPassenger

      public boolean hasPassenger(Class<? extends Entity> p_205708_1_)
    • getIndirectPassengers

      public Collection<Entity> getIndirectPassengers()
    • getSelfAndPassengers

      public Stream<Entity> getSelfAndPassengers()
    • hasOnePlayerPassenger

      public boolean hasOnePlayerPassenger()
    • fillIndirectPassengers

      private void fillIndirectPassengers(boolean p_200604_1_, Set<Entity> p_200604_2_)
    • getRootVehicle

      public Entity getRootVehicle()
    • isPassengerOfSameVehicle

      public boolean isPassengerOfSameVehicle(Entity p_184223_1_)
    • hasIndirectPassenger

      public boolean hasIndirectPassenger(Entity p_184215_1_)
    • isControlledByLocalInstance

      public boolean isControlledByLocalInstance()
    • getCollisionHorizontalEscapeVector

      protected static Vector3d getCollisionHorizontalEscapeVector(double p_233559_0_, double p_233559_2_, float p_233559_4_)
    • getDismountLocationForPassenger

      public Vector3d getDismountLocationForPassenger(LivingEntity p_230268_1_)
    • getVehicle

      @Nullable public Entity getVehicle()
    • getPistonPushReaction

      public PushReaction getPistonPushReaction()
    • getSoundSource

      public SoundCategory getSoundSource()
    • getFireImmuneTicks

      protected int getFireImmuneTicks()
    • createCommandSourceStack

      public CommandSource createCommandSourceStack()
    • getPermissionLevel

      protected int getPermissionLevel()
    • hasPermissions

      public boolean hasPermissions(int p_211513_1_)
    • acceptsSuccess

      public boolean acceptsSuccess()
      Specified by:
      acceptsSuccess in interface ICommandSource
    • acceptsFailure

      public boolean acceptsFailure()
      Specified by:
      acceptsFailure in interface ICommandSource
    • shouldInformAdmins

      public boolean shouldInformAdmins()
      Specified by:
      shouldInformAdmins in interface ICommandSource
    • lookAt

      public void lookAt(EntityAnchorArgument.Type p_200602_1_, Vector3d p_200602_2_)
    • updateFluidHeightAndDoFluidPushing

      public boolean updateFluidHeightAndDoFluidPushing(ITag<Fluid> p_210500_1_, double p_210500_2_)
    • getFluidHeight

      public double getFluidHeight(ITag<Fluid> p_233571_1_)
    • getFluidJumpThreshold

      public double getFluidJumpThreshold()
    • getBbWidth

      public final float getBbWidth()
    • getBbHeight

      public final float getBbHeight()
    • getAddEntityPacket

      public abstract IPacket<?> getAddEntityPacket()
    • getDimensions

      @Deprecated public EntitySize getDimensions(Pose p_213305_1_)
      Deprecated.
      Can be overridden but call IForgeEntity.getDimensionsForge(Pose) instead.
    • position

      public Vector3d position()
    • blockPosition

      public BlockPos blockPosition()
    • getDeltaMovement

      public Vector3d getDeltaMovement()
    • setDeltaMovement

      public void setDeltaMovement(Vector3d p_213317_1_)
    • setDeltaMovement

      public void setDeltaMovement(double p_213293_1_, double p_213293_3_, double p_213293_5_)
    • getX

      public final double getX()
    • getX

      public double getX(double p_226275_1_)
    • getRandomX

      public double getRandomX(double p_226282_1_)
    • getY

      public final double getY()
    • getY

      public double getY(double p_226283_1_)
    • getRandomY

      public double getRandomY()
    • getEyeY

      public double getEyeY()
    • getZ

      public final double getZ()
    • getZ

      public double getZ(double p_226285_1_)
    • getRandomZ

      public double getRandomZ(double p_226287_1_)
    • setPosRaw

      public void setPosRaw(double p_226288_1_, double p_226288_3_, double p_226288_5_)
    • checkDespawn

      public void checkDespawn()
    • getRopeHoldPosition

      public Vector3d getRopeHoldPosition(float p_241843_1_)
    • canUpdate

      public void canUpdate(boolean value)
      Specified by:
      canUpdate in interface IForgeEntity
    • canUpdate

      public boolean canUpdate()
      Specified by:
      canUpdate in interface IForgeEntity
    • captureDrops

      public Collection<ItemEntity> captureDrops()
      Specified by:
      captureDrops in interface IForgeEntity
    • captureDrops

      public Collection<ItemEntity> captureDrops(Collection<ItemEntity> value)
      Specified by:
      captureDrops in interface IForgeEntity
    • getPersistentData

      public CompoundNBT getPersistentData()
      Description copied from interface: IForgeEntity
      Returns a NBTTagCompound that can be used to store custom data for this entity. It will be written, and read from disc, so it persists over world saves.
      Specified by:
      getPersistentData in interface IForgeEntity
      Returns:
      A NBTTagCompound
    • canTrample

      public boolean canTrample(BlockState state, BlockPos pos, float fallDistance)
      Description copied from interface: IForgeEntity
      Checks if this Entity can trample a Block.
      Specified by:
      canTrample in interface IForgeEntity
      pos - The block pos
      fallDistance - The fall distance
      Returns:
      true if this entity can trample, false otherwise
    • isAddedToWorld

      public final boolean isAddedToWorld()
      Description copied from interface: IForgeEntity
      Gets whether this entity has been added to a world (for tracking). Specifically between the times when an entity is added to a world and the entity being removed from the world's tracked lists. See World#onEntityAdded(Entity) and World#onEntityRemoved(Entity).
      Specified by:
      isAddedToWorld in interface IForgeEntity
      Returns:
      True if this entity is being tracked by a world
    • onAddedToWorld

      public void onAddedToWorld()
      Description copied from interface: IForgeEntity
      Called after the entity has been added to the world's ticking list. Can be overriden, but needs to call super to prevent MC-136995.
      Specified by:
      onAddedToWorld in interface IForgeEntity
    • onRemovedFromWorld

      public void onRemovedFromWorld()
      Description copied from interface: IForgeEntity
      Called after the entity has been removed to the world's ticking list. Can be overriden, but needs to call super to prevent MC-136995.
      Specified by:
      onRemovedFromWorld in interface IForgeEntity
    • revive

      public void revive()
      Description copied from interface: IForgeEntity
      Revives an entity that has been removed from a world. Used as replacement for entity.removed = true. Having it as a function allows the entity to react to being revived.
      Specified by:
      revive in interface IForgeEntity
    • getEyeHeightAccess

      public float getEyeHeightAccess(Pose pose, EntitySize size)
      Accessor method for getEyeHeight(Pose, EntitySize)