Package net.minecraft.world.entity
Class Entity
- All Implemented Interfaces:
CommandSource
,EntityAccess
,Nameable
,ICapabilityProvider
,ICapabilityProviderImpl<Entity>
,ICapabilitySerializable<CompoundTag>
,IForgeEntity
,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
AbstractMinecart
,AreaEffectCloud
,Boat
,Display
,EndCrystal
,EvokerFangs
,ExperienceOrb
,EyeOfEnder
,FallingBlockEntity
,HangingEntity
,Interaction
,ItemEntity
,LightningBolt
,LivingEntity
,Marker
,PartEntity
,PrimedTnt
,Projectile
public abstract class Entity
extends CapabilityProvider<Entity>
implements Nameable, EntityAccess, CommandSource, IForgeEntity
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static enum
static enum
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
private AABB
private BlockPos
boolean
static final int
protected int
static final float
private boolean
private Collection<ItemEntity>
private ChunkPos
private float
private static final EntityDataAccessor<Integer>
private static final EntityDataAccessor<Optional<Component>>
private static final EntityDataAccessor<Boolean>
private static final EntityDataAccessor<Boolean>
protected static final EntityDataAccessor<Pose>
protected static final EntityDataAccessor<Byte>
private static final EntityDataAccessor<Boolean>
private static final EntityDataAccessor<Integer>
static final float
static final float
static final float
static final double
static final double
private Vec3
private EntityDimensions
protected static final AtomicInteger
protected final SynchedEntityData
private float
float
private BlockState
protected boolean
protected static final int
protected static final int
private static final int
protected static final int
private static final int
private static final int
private static final int
Deprecated.Deprecated.float
protected it.unimi.dsi.fastutil.objects.Object2DoubleMap<FluidType>
private FluidType
static final int
private boolean
private boolean
boolean
private boolean
boolean
boolean
private int
static final String
private static final AABB
private boolean
int
private boolean
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.boolean
protected boolean
private int
private static final double
private static final double
private Level
private EntityInLevelCallback
private static final org.slf4j.Logger
static final int
private float
boolean
float
private float
boolean
boolean
private boolean
private boolean
private final VecDeltaCodec
private com.google.common.collect.ImmutableList<Entity>
static final String
private CompoundTag
private final double[]
private long
private int
protected BlockPos
protected int
private Vec3
protected final RandomSource
private int
private Entity.RemovalReason
protected String
protected Vec3
int
static final int
private final EntityType<?>
Deprecated.protected UUID
static final String
private Entity
boolean
boolean
private static double
float
float
protected boolean
boolean
boolean
protected boolean
private static final double
double
double
private float
float
double
double
private float
float
double
double
Fields inherited from interface net.minecraft.commands.CommandSource
NULL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
absMoveTo
(double p_20249_, double p_20250_, double p_20251_) void
absMoveTo
(double p_19891_, double p_19892_, double p_19893_, float p_19894_, float p_19895_) boolean
boolean
protected abstract void
addAdditionalSaveData
(CompoundTag p_20139_) void
addDeltaMovement
(Vec3 p_250128_) protected void
addPassenger
(Entity p_20349_) boolean
void
animateHurt
(float p_265161_) private double
applyPistonMovementRestriction
(Direction.Axis p_20043_, double p_20044_) void
awardKillScore
(Entity p_19953_, int p_19954_, DamageSource p_19955_) void
baseTick()
boolean
broadcastToPlayer
(ServerPlayer p_19937_) protected final Vec3
calculateUpVector
(float p_20215_, float p_20216_) protected final Vec3
calculateViewVector
(float p_20172_, float p_20173_) protected boolean
canAddPassenger
(Entity p_20354_) boolean
boolean
boolean
boolean
canCollideWith
(Entity p_20303_) boolean
boolean
protected boolean
boolean
boolean
boolean
canTrample
(BlockState state, BlockPos pos, float fallDistance) boolean
void
canUpdate
(boolean value) captureDrops
(Collection<ItemEntity> value) boolean
causeFallDamage
(float p_146828_, float p_146829_, DamageSource p_146830_) changeDimension
(ServerLevel p_20118_) changeDimension
(ServerLevel p_20118_, ITeleporter teleporter) void
void
protected void
checkFallDamage
(double p_19911_, boolean p_19912_, BlockState p_19913_, BlockPos p_19914_) protected void
void
protected void
checkSupportingBlock
(boolean p_289694_, Vec3 p_289680_) void
boolean
closerThan
(Entity p_19951_, double p_19952_) boolean
closerThan
(Entity p_216993_, double p_216994_, double p_216995_) private Vec3
static Vec3
collideBoundingBox
(Entity p_198895_, Vec3 p_198896_, AABB p_198897_, Level p_198898_, List<VoxelShape> p_198899_) private static Vec3
collideWithShapes
(Vec3 p_198901_, AABB p_198902_, List<VoxelShape> p_198903_) void
copyPosition
(Entity p_20360_) protected boolean
Deprecated.protected HoverEvent
boolean
protected abstract void
final void
discard()
boolean
void
dismountTo
(double p_146825_, double p_146826_, double p_146827_) boolean
float
distanceTo
(Entity p_20271_) double
distanceToSqr
(double p_20276_, double p_20277_, double p_20278_) double
distanceToSqr
(Entity p_20281_) double
distanceToSqr
(Vec3 p_20239_) void
doEnchantDamageEffects
(LivingEntity p_19971_, Entity p_19972_) protected void
void
boolean
void
void
fillCrashReportCategory
(CrashReportCategory p_20051_) protected PortalInfo
findDimensionEntryPoint
(ServerLevel p_19923_) boolean
protected void
Deprecated.void
void
int
final float
final float
float
getBlockExplosionResistance
(Explosion p_19992_, BlockGetter p_19993_, BlockPos p_19994_, BlockState p_19995_, FluidState p_19996_, float p_19997_) protected float
protected BlockPos
protected float
protected BlockState
Deprecated.final int
final int
final int
final AABB
protected static Vec3
getCollisionHorizontalEscapeVector
(double p_19904_, double p_19905_, float p_19906_) int
getDimensions
(Pose p_19975_) getDimensionsForge
(Pose pose) Deprecated, for removal: This API element is subject to removal in a future version.getDismountLocationForPassenger
(LivingEntity p_20123_) final String
protected Optional<BlockUtil.FoundRectangle>
getExitPortal
(ServerLevel p_185935_, BlockPos p_185936_, boolean p_185937_, WorldBorder p_185938_) final float
float
getEyeHeight
(Pose p_20237_) protected float
getEyeHeight
(Pose p_19976_, EntityDimensions p_19977_) float
getEyeHeightAccess
(Pose pose, EntityDimensions size) Deprecated, for removal: This API element is subject to removal in a future version.final FluidType
Returns the fluid that is on the entity's eyes.final Vec3
final Vec3
getEyePosition
(float p_20300_) double
getEyeY()
protected int
double
getFluidHeight
(TagKey<Fluid> p_204037_) Deprecated.double
final double
getFluidTypeHeight
(FluidType type) Returns the height of the fluid type in relation to the bounding box of the entity.getHandHoldingItemAngle
(Item p_204035_) int
getId()
private static Vec3
getInputVector
(Vec3 p_20016_, float p_20017_, float p_20018_) protected Vec3
getLeashOffset
(float p_249286_) float
Deprecated.getLightProbePosition
(float p_20309_) int
int
Returns the fluid type which is the highest on the bounding box of the entity.protected Entity.MovementEmission
float
getMyRidingOffset
(Entity p_299721_) getName()
float
getOnPos()
protected BlockPos
getOnPos
(float p_216987_) Deprecated.protected org.joml.Vector3f
getPassengerAttachmentPoint
(Entity p_297569_, EntityDimensions p_297882_, float p_300288_) getPassengerRidingPosition
(Entity p_297660_) float
protected int
Returns a NBTTagCompound that can be used to store custom data for this entity.float
int
int
getPose()
final Vec3
getPosition
(float p_20319_) protected BlockPos
getPrimaryStepSoundBlockPos
(BlockPos p_278049_) double
getRandomX
(double p_20209_) double
double
getRandomZ
(double p_20263_) protected Vec3
getRelativePortalPosition
(Direction.Axis p_20045_, BlockUtil.FoundRectangle p_20046_) int
getRopeHoldPosition
(float p_20347_) protected boolean
getSharedFlag
(int p_20292_) getSlot
(int p_146919_) protected SoundEvent
protected SoundEvent
protected SoundEvent
getTags()
getTeam()
int
int
int
EntityType<?>
getType()
protected Component
final Vec3
getUpVector
(float p_20290_) getUUID()
static double
final Vec3
getViewVector
(float p_20253_) float
getViewXRot
(float p_20268_) float
getViewYRot
(float p_20279_) float
final double
getX()
double
getX
(double p_20166_) float
getXRot()
final double
getY()
double
getY
(double p_20228_) float
float
getYRot()
final double
getZ()
double
getZ
(double p_20247_) void
handleDamageEvent
(DamageSource p_270704_) void
handleEntityEvent
(byte p_19882_) void
handleInsidePortal
(BlockPos p_20222_) protected void
final boolean
boolean
boolean
final boolean
int
hashCode()
boolean
hasIndirectPassenger
(Entity p_20368_) boolean
hasPassenger
(Predicate<Entity> p_146863_) boolean
hasPassenger
(Entity p_20364_) boolean
hasPermissions
(int p_20311_) boolean
boolean
hurt
(DamageSource p_19946_, float p_19947_) boolean
interact
(Player p_19978_, InteractionHand p_19979_) interactAt
(Player p_19980_, Vec3 p_19981_, InteractionHand p_19982_) boolean
final boolean
Gets whether this entity has been added to a world (for tracking).boolean
isAlive()
boolean
isAlliedTo
(Entity p_20355_) boolean
isAlliedTo
(Team p_20032_) boolean
boolean
boolean
isColliding
(BlockPos p_20040_, BlockState p_20041_) boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isEyeInFluid
(TagKey<Fluid> p_204030_) Deprecated.protected boolean
boolean
isFree
(double p_20230_, double p_20231_, double p_20232_) private boolean
boolean
boolean
protected boolean
isHorizontalCollisionMinor
(Vec3 p_196625_) boolean
private boolean
final boolean
Returns whether the entity is in a fluid.final boolean
isInFluidType
(BiPredicate<FluidType, Double> predicate, boolean forAllTypes) Returns whether the fluid type the entity is currently in matches the specified condition.boolean
isInLava()
boolean
private boolean
isInRain()
boolean
boolean
isInvisibleTo
(Player p_20178_) boolean
boolean
isInvulnerableTo
(DamageSource p_20122_) boolean
isInWall()
boolean
boolean
boolean
boolean
boolean
boolean
isOnFire()
boolean
boolean
boolean
boolean
isPassengerOfSameVehicle
(Entity p_20366_) boolean
boolean
boolean
Deprecated.final boolean
boolean
boolean
isSilent()
boolean
boolean
private boolean
isStateClimbable
(BlockState p_286733_) boolean
boolean
isSupportedBy
(BlockPos p_287613_) boolean
boolean
boolean
boolean
boolean
boolean
void
kill()
boolean
killedEntity
(ServerLevel p_216988_, LivingEntity p_216989_) void
lavaHurt()
void
lerpHeadTo
(float p_19918_, int p_19919_) void
lerpMotion
(double p_20306_, double p_20307_, double p_20308_) protected void
lerpPositionAndRotationStep
(int p_298722_, double p_297490_, double p_300716_, double p_298684_, double p_300659_, double p_298926_) double
float
double
float
double
void
lerpTo
(double p_19896_, double p_19897_, double p_19898_, float p_19899_, float p_19900_, int p_19901_) level()
protected Vec3
limitPistonMovement
(Vec3 p_20134_) void
load
(CompoundTag p_20259_) void
lookAt
(EntityAnchorArgument.Anchor p_20033_, Vec3 p_20034_) protected AABB
void
makeStuckInBlock
(BlockState p_20006_, Vec3 p_20007_) protected void
markHurt()
float
Deprecated.protected Vec3
maybeBackOffFromEdge
(Vec3 p_20019_, MoverType p_20020_) boolean
mayInteract
(Level p_146843_, BlockPos p_146844_) float
void
void
moveRelative
(float p_19921_, Vec3 p_19922_) void
moveTo
(double p_20105_, double p_20106_, double p_20107_) void
moveTo
(double p_20108_, double p_20109_, double p_20110_, float p_20111_, float p_20112_) void
void
protected void
moveTowardsClosestSpace
(double p_20315_, double p_20316_, double p_20317_) protected ListTag
newDoubleList
(double... p_20064_) protected ListTag
newFloatList
(float... p_20066_) protected float
nextStep()
void
onAboveBubbleCol
(boolean p_20313_) void
Called after the entity has been added to the world's ticking list.protected void
void
protected void
onFlap()
boolean
onGround()
protected void
onInsideBlock
(BlockState p_20005_) void
onInsideBubbleColumn
(boolean p_20322_) boolean
void
onPassengerTurned
(Entity p_20320_) void
Called after the entity has been removed to the world's ticking list.void
onSyncedDataUpdated
(List<SynchedEntityData.DataValue<?>> p_270372_) void
onSyncedDataUpdated
(EntityDataAccessor<?> p_20059_) pick
(double p_19908_, float p_19909_, boolean p_19910_) private void
protected void
playCombinationStepSounds
(BlockState p_277472_, BlockState p_277630_, BlockPos primaryPos, BlockPos secondaryPos) protected void
void
playerTouch
(Player p_20081_) protected void
playMuffledStepSound
(BlockState p_283110_, BlockPos pos) void
playSound
(SoundEvent p_216991_) void
playSound
(SoundEvent p_19938_, float p_19939_, float p_19940_) protected void
playStepSound
(BlockPos p_20135_, BlockState p_20136_) protected void
playSwimSound
(float p_20213_) position()
final void
positionRider
(Entity p_20312_) protected void
positionRider
(Entity p_19957_, Entity.MoveFunction p_19958_) protected void
protected void
void
push
(double p_20286_, double p_20287_, double p_20288_) void
protected abstract void
readAdditionalSaveData
(CompoundTag p_20052_) protected void
void
recreateFromPacket
(ClientboundAddEntityPacket p_146866_) void
void
remove
(Entity.RemovalReason p_146834_) private static Component
removeAction
(Component p_20141_) protected void
protected void
removePassenger
(Entity p_20352_) boolean
void
protected boolean
void
void
restoreFrom
(Entity p_20362_) void
revive()
Revives an entity that has been removed from a world.void
rideTick()
protected float
ridingOffset
(Entity p_301274_) float
boolean
save
(CompoundTag p_20224_) boolean
saveAsPassenger
(CompoundTag p_20087_) saveWithoutId
(CompoundTag p_20241_) void
sendSystemMessage
(Component p_216998_) void
setAirSupply
(int p_20302_) final void
setBoundingBox
(AABB p_20012_) void
setCustomName
(Component p_20053_) void
setCustomNameVisible
(boolean p_20341_) void
setDeltaMovement
(double p_20335_, double p_20336_, double p_20337_) void
setDeltaMovement
(Vec3 p_20257_) protected final void
setFluidTypeHeight
(FluidType type, double height) final void
setGlowingTag
(boolean p_146916_) void
setId
(int p_20235_) void
setInvisible
(boolean p_20304_) void
setInvulnerable
(boolean p_20332_) void
setIsInPowderSnow
(boolean p_146925_) void
setItemSlot
(EquipmentSlot p_19968_, ItemStack p_19969_) protected void
void
setLevelCallback
(EntityInLevelCallback p_146849_) void
setMaxUpStep
(float p_275672_) void
setNoGravity
(boolean p_20243_) final void
void
setOnGround
(boolean p_20181_) void
setOnGroundWithKnownMovement
(boolean p_289661_, Vec3 p_289653_) void
void
setPortalCooldown
(int p_287760_) void
setPos
(double p_20210_, double p_20211_, double p_20212_) final void
void
final void
setPosRaw
(double p_20344_, double p_20345_, double p_20346_) void
setRemainingFireTicks
(int p_20269_) final void
setRemoved
(Entity.RemovalReason p_146876_) protected void
setRot
(float p_19916_, float p_19917_) void
setSecondsOnFire
(int p_20255_) protected void
setSharedFlag
(int p_20116_, boolean p_20117_) void
setSharedFlagOnFire
(boolean p_146869_) void
setShiftKeyDown
(boolean p_20261_) void
setSilent
(boolean p_20226_) void
setSprinting
(boolean p_20274_) void
setSwimming
(boolean p_20283_) void
setTicksFrozen
(int p_146918_) void
static void
setViewScale
(double p_20104_) void
setXRot
(float p_146927_) void
setYBodyRot
(float p_20338_) void
setYHeadRot
(float p_20328_) void
setYRot
(float p_146923_) boolean
boolean
shouldBlockExplode
(Explosion p_19987_, BlockGetter p_19988_, BlockPos p_19989_, BlockState p_19990_, float p_19991_) boolean
private boolean
shouldPlayAmethystStepSound
(BlockState p_278069_) boolean
shouldRender
(double p_20296_, double p_20297_, double p_20298_) boolean
shouldRenderAtSqrDistance
(double p_19883_) boolean
boolean
boolean
skipAttackInteraction
(Entity p_20357_) spawnAtLocation
(ItemStack p_19984_) spawnAtLocation
(ItemStack p_19985_, float p_19986_) spawnAtLocation
(ItemLike p_19999_) spawnAtLocation
(ItemLike p_20001_, int p_20002_) protected void
boolean
startRiding
(Entity p_20330_) boolean
startRiding
(Entity p_19966_, boolean p_19967_) void
startSeenByPlayer
(ServerPlayer p_20119_) void
void
stopSeenByPlayer
(ServerPlayer p_20174_) void
syncPacketPositionCodec
(double p_217007_, double p_217008_, double p_217009_) private void
void
teleportRelative
(double p_249341_, double p_252229_, double p_252038_) void
teleportTo
(double p_19887_, double p_19888_, double p_19889_) boolean
teleportTo
(ServerLevel p_265257_, double p_265407_, double p_265727_, double p_265410_, Set<RelativeMovement> p_265083_, float p_265573_, float p_265094_) final void
teleportToWithTicket
(double p_20325_, double p_20326_, double p_20327_) void
thunderHit
(ServerLevel p_19927_, LightningBolt p_19928_) void
tick()
toString()
boolean
protected void
void
turn
(double p_19885_, double p_19886_) final void
unRide()
protected void
void
void
Deprecated, for removal: This API element is subject to removal in a future version.void
updateFluidHeightAndDoFluidPushing
(Predicate<FluidState> shouldUpdate) boolean
updateFluidHeightAndDoFluidPushing
(TagKey<Fluid> p_204032_, double p_204033_) Deprecated.private void
protected boolean
(package private) void
void
private boolean
vibrationAndSoundEffectsFromBlock
(BlockPos p_286221_, BlockState p_286549_, boolean p_286708_, boolean p_286543_, Vec3 p_286448_) private void
walkingStepSound
(BlockPos p_281828_, BlockState p_282118_) protected void
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.commands.CommandSource
alwaysAccepts
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canSwimInFluidType, deserializeNBT, getClassification, getEyeHeightForge, getFluidFallDistanceModifier, getFluidMotionScale, getParts, getPickedResult, getSoundFromFluidType, getStepHeight, hasCustomOutlineRendering, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, serializeNBT, shouldRiderSit, shouldUpdateFluidWhileBoating
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ID_TAG
- See Also:
-
PASSENGERS_TAG
- See Also:
-
ENTITY_COUNTER
-
EMPTY_LIST
-
BOARDING_COOLDOWN
public static final int BOARDING_COOLDOWN- See Also:
-
TOTAL_AIR_SUPPLY
public static final int TOTAL_AIR_SUPPLY- See Also:
-
MAX_ENTITY_TAG_COUNT
public static final int MAX_ENTITY_TAG_COUNT- See Also:
-
DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2
public static final float DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2- See Also:
-
DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5
public static final double DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5- See Also:
-
DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0
public static final double DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0- See Also:
-
BREATHING_DISTANCE_BELOW_EYES
public static final float BREATHING_DISTANCE_BELOW_EYES- See Also:
-
BASE_TICKS_REQUIRED_TO_FREEZE
public static final int BASE_TICKS_REQUIRED_TO_FREEZE- See Also:
-
FREEZE_HURT_FREQUENCY
public static final int FREEZE_HURT_FREQUENCY- See Also:
-
INITIAL_AABB
-
WATER_FLOW_SCALE
private static final double WATER_FLOW_SCALE- See Also:
-
LAVA_FAST_FLOW_SCALE
private static final double LAVA_FAST_FLOW_SCALE- See Also:
-
LAVA_SLOW_FLOW_SCALE
private static final double LAVA_SLOW_FLOW_SCALE- See Also:
-
UUID_TAG
- See Also:
-
viewScale
private static double viewScale -
type
Deprecated. -
id
private int id -
blocksBuilding
public boolean blocksBuilding -
passengers
-
boardingCooldown
protected int boardingCooldown -
vehicle
-
level
-
xo
public double xo -
yo
public double yo -
zo
public double zo -
position
-
blockPosition
-
chunkPosition
-
deltaMovement
-
yRot
private float yRot -
xRot
private float xRot -
yRotO
public float yRotO -
xRotO
public float xRotO -
bb
-
onGround
private boolean onGround -
horizontalCollision
public boolean horizontalCollision -
verticalCollision
public boolean verticalCollision -
verticalCollisionBelow
public boolean verticalCollisionBelow -
minorHorizontalCollision
public boolean minorHorizontalCollision -
hurtMarked
public boolean hurtMarked -
stuckSpeedMultiplier
-
removalReason
-
DEFAULT_BB_WIDTH
public static final float DEFAULT_BB_WIDTH- See Also:
-
DEFAULT_BB_HEIGHT
public static final float DEFAULT_BB_HEIGHT- See Also:
-
walkDistO
public float walkDistO -
walkDist
public float walkDist -
moveDist
public float moveDist -
flyDist
public float flyDist -
fallDistance
public float fallDistance -
nextStep
private float nextStep -
xOld
public double xOld -
yOld
public double yOld -
zOld
public double zOld -
maxUpStep
private float maxUpStep -
noPhysics
public boolean noPhysics -
random
-
tickCount
public int tickCount -
remainingFireTicks
private int remainingFireTicks -
wasTouchingWater
protected boolean wasTouchingWater -
fluidHeight
Deprecated. -
wasEyeInWater
protected boolean wasEyeInWater -
fluidOnEyes
Deprecated. -
invulnerableTime
public int invulnerableTime -
firstTick
protected boolean firstTick -
entityData
-
DATA_SHARED_FLAGS_ID
-
FLAG_ONFIRE
protected static final int FLAG_ONFIRE- See Also:
-
FLAG_SHIFT_KEY_DOWN
private static final int FLAG_SHIFT_KEY_DOWN- See Also:
-
FLAG_SPRINTING
private static final int FLAG_SPRINTING- See Also:
-
FLAG_SWIMMING
private static final int FLAG_SWIMMING- See Also:
-
FLAG_INVISIBLE
private static final int FLAG_INVISIBLE- See Also:
-
FLAG_GLOWING
protected static final int FLAG_GLOWING- See Also:
-
FLAG_FALL_FLYING
protected static final int FLAG_FALL_FLYING- See Also:
-
DATA_AIR_SUPPLY_ID
-
DATA_CUSTOM_NAME
-
DATA_CUSTOM_NAME_VISIBLE
-
DATA_SILENT
-
DATA_NO_GRAVITY
-
DATA_POSE
-
DATA_TICKS_FROZEN
-
levelCallback
-
packetPositionCodec
-
noCulling
public boolean noCulling -
hasImpulse
public boolean hasImpulse -
portalCooldown
private int portalCooldown -
isInsidePortal
protected boolean isInsidePortal -
portalTime
protected int portalTime -
portalEntrancePos
-
invulnerable
private boolean invulnerable -
uuid
-
stringUUID
-
hasGlowingTag
private boolean hasGlowingTag -
tags
-
pistonDeltas
private final double[] pistonDeltas -
pistonDeltasGameTime
private long pistonDeltasGameTime -
dimensions
-
eyeHeight
private float eyeHeight -
isInPowderSnow
public boolean isInPowderSnow -
wasInPowderSnow
public boolean wasInPowderSnow -
wasOnFire
public boolean wasOnFire -
mainSupportingBlockPos
-
onGroundNoBlocks
private boolean onGroundNoBlocks -
crystalSoundIntensity
private float crystalSoundIntensity -
lastCrystalSoundPlayTick
private int lastCrystalSoundPlayTick -
hasVisualFire
private boolean hasVisualFire -
feetBlockState
-
hasExtraSpawnData
private boolean hasExtraSpawnData -
canUpdate
private boolean canUpdate -
captureDrops
-
persistentData
-
isAddedToWorld
private boolean isAddedToWorldInternal 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. -
forgeFluidTypeHeight
-
forgeFluidTypeOnEyes
-
-
Constructor Details
-
Entity
-
-
Method Details
-
isColliding
-
getTeamColor
public int getTeamColor() -
isSpectator
public boolean isSpectator() -
unRide
public final void unRide() -
syncPacketPositionCodec
public void syncPacketPositionCodec(double p_217007_, double p_217008_, double p_217009_) -
getPositionCodec
-
getType
-
getId
public int getId()- Specified by:
getId
in interfaceEntityAccess
-
setId
public void setId(int p_20235_) -
getTags
-
addTag
-
removeTag
-
kill
public void kill() -
discard
public final void discard() -
defineSynchedData
protected abstract void defineSynchedData() -
getEntityData
-
equals
-
hashCode
public int hashCode() -
remove
-
onClientRemoval
public void onClientRemoval() -
setPose
-
getPose
-
hasPose
-
closerThan
-
closerThan
-
setRot
protected void setRot(float p_19916_, float p_19917_) -
setPos
-
setPos
public void setPos(double p_20210_, double p_20211_, double p_20212_) -
makeBoundingBox
-
reapplyPosition
protected void reapplyPosition() -
turn
public void turn(double p_19885_, double p_19886_) -
tick
public void tick() -
baseTick
public void baseTick() -
checkBelowWorld
public void checkBelowWorld() -
setPortalCooldown
public void setPortalCooldown() -
setPortalCooldown
public void setPortalCooldown(int p_287760_) -
getPortalCooldown
public int getPortalCooldown() -
isOnPortalCooldown
public boolean isOnPortalCooldown() -
processPortalCooldown
protected void processPortalCooldown() -
getPortalWaitTime
public int getPortalWaitTime() -
lavaHurt
public void lavaHurt() -
setSecondsOnFire
public void setSecondsOnFire(int p_20255_) -
setRemainingFireTicks
public void setRemainingFireTicks(int p_20269_) -
getRemainingFireTicks
public int getRemainingFireTicks() -
clearFire
public void clearFire() -
onBelowWorld
protected void onBelowWorld() -
isFree
public boolean isFree(double p_20230_, double p_20231_, double p_20232_) -
isFree
-
setOnGround
public void setOnGround(boolean p_20181_) -
setOnGroundWithKnownMovement
-
isSupportedBy
-
checkSupportingBlock
-
onGround
public boolean onGround() -
move
-
isStateClimbable
-
vibrationAndSoundEffectsFromBlock
private boolean vibrationAndSoundEffectsFromBlock(BlockPos p_286221_, BlockState p_286549_, boolean p_286708_, boolean p_286543_, Vec3 p_286448_) -
isHorizontalCollisionMinor
-
tryCheckInsideBlocks
protected void tryCheckInsideBlocks() -
playEntityOnFireExtinguishedSound
protected void playEntityOnFireExtinguishedSound() -
extinguishFire
public void extinguishFire() -
processFlappingMovement
protected void processFlappingMovement() -
getOnPosLegacy
Deprecated. -
getBlockPosBelowThatAffectsMyMovement
-
getOnPos
-
getOnPos
-
getBlockJumpFactor
protected float getBlockJumpFactor() -
getBlockSpeedFactor
protected float getBlockSpeedFactor() -
maybeBackOffFromEdge
-
limitPistonMovement
-
applyPistonMovementRestriction
-
collide
-
collideBoundingBox
-
collideWithShapes
-
nextStep
protected float nextStep() -
getSwimSound
-
getSwimSplashSound
-
getSwimHighSpeedSplashSound
-
checkInsideBlocks
protected void checkInsideBlocks() -
onInsideBlock
-
gameEvent
-
gameEvent
-
walkingStepSound
-
waterSwimSound
protected void waterSwimSound() -
getPrimaryStepSoundBlockPos
-
playCombinationStepSounds
protected void playCombinationStepSounds(BlockState p_277472_, BlockState p_277630_, BlockPos primaryPos, BlockPos secondaryPos) -
playMuffledStepSound
-
playStepSound
-
shouldPlayAmethystStepSound
-
playAmethystStepSound
private void playAmethystStepSound() -
playSwimSound
protected void playSwimSound(float p_20213_) -
onFlap
protected void onFlap() -
isFlapping
protected boolean isFlapping() -
playSound
-
playSound
-
isSilent
public boolean isSilent() -
setSilent
public void setSilent(boolean p_20226_) -
isNoGravity
public boolean isNoGravity() -
setNoGravity
public void setNoGravity(boolean p_20243_) -
getMovementEmission
-
dampensVibrations
public boolean dampensVibrations() -
checkFallDamage
protected void checkFallDamage(double p_19911_, boolean p_19912_, BlockState p_19913_, BlockPos p_19914_) -
fireImmune
public boolean fireImmune() -
causeFallDamage
-
isInWater
public boolean isInWater() -
isInRain
private boolean isInRain() -
isInBubbleColumn
private boolean isInBubbleColumn() -
isInWaterOrRain
public boolean isInWaterOrRain() -
isInWaterRainOrBubble
public boolean isInWaterRainOrBubble() -
isInWaterOrBubble
public boolean isInWaterOrBubble() -
isInLiquid
public boolean isInLiquid() -
isUnderWater
public boolean isUnderWater() -
updateSwimming
public void updateSwimming() -
updateInWaterStateAndDoFluidPushing
protected boolean updateInWaterStateAndDoFluidPushing() -
updateInWaterStateAndDoWaterCurrentPushing
void updateInWaterStateAndDoWaterCurrentPushing() -
updateFluidOnEyes
private void updateFluidOnEyes() -
doWaterSplashEffect
protected void doWaterSplashEffect() -
getBlockStateOnLegacy
Deprecated. -
getBlockStateOn
-
canSpawnSprintParticle
public boolean canSpawnSprintParticle() -
spawnSprintParticle
protected void spawnSprintParticle() -
isEyeInFluid
Deprecated. -
isInLava
public boolean isInLava() -
moveRelative
-
getInputVector
-
getLightLevelDependentMagicValue
Deprecated. -
absMoveTo
public void absMoveTo(double p_19891_, double p_19892_, double p_19893_, float p_19894_, float p_19895_) -
absMoveTo
public void absMoveTo(double p_20249_, double p_20250_, double p_20251_) -
moveTo
-
moveTo
public void moveTo(double p_20105_, double p_20106_, double p_20107_) -
moveTo
-
moveTo
public void moveTo(double p_20108_, double p_20109_, double p_20110_, float p_20111_, float p_20112_) -
setOldPosAndRot
public final void setOldPosAndRot() -
distanceTo
-
distanceToSqr
public double distanceToSqr(double p_20276_, double p_20277_, double p_20278_) -
distanceToSqr
-
distanceToSqr
-
playerTouch
-
push
-
push
public void push(double p_20286_, double p_20287_, double p_20288_) -
markHurt
protected void markHurt() -
hurt
-
getViewVector
-
getViewXRot
public float getViewXRot(float p_20268_) -
getViewYRot
public float getViewYRot(float p_20279_) -
calculateViewVector
-
getUpVector
-
calculateUpVector
-
getEyePosition
-
getEyePosition
-
getLightProbePosition
-
getPosition
-
pick
-
canBeHitByProjectile
public boolean canBeHitByProjectile() -
isPickable
public boolean isPickable() -
isPushable
public boolean isPushable() -
awardKillScore
-
shouldRender
public boolean shouldRender(double p_20296_, double p_20297_, double p_20298_) -
shouldRenderAtSqrDistance
public boolean shouldRenderAtSqrDistance(double p_19883_) -
saveAsPassenger
-
save
-
saveWithoutId
-
load
-
repositionEntityAfterLoad
protected boolean repositionEntityAfterLoad() -
getEncodeId
-
readAdditionalSaveData
-
addAdditionalSaveData
-
newDoubleList
-
newFloatList
-
spawnAtLocation
-
spawnAtLocation
-
spawnAtLocation
-
spawnAtLocation
-
isAlive
public boolean isAlive() -
isInWall
public boolean isInWall() -
interact
-
canCollideWith
-
canBeCollidedWith
public boolean canBeCollidedWith() -
rideTick
public void rideTick() -
positionRider
-
positionRider
-
onPassengerTurned
-
getMyRidingOffset
-
ridingOffset
-
getPassengerRidingPosition
-
getPassengerAttachmentPoint
protected org.joml.Vector3f getPassengerAttachmentPoint(Entity p_297569_, EntityDimensions p_297882_, float p_300288_) -
startRiding
-
showVehicleHealth
public boolean showVehicleHealth() -
startRiding
-
canRide
-
ejectPassengers
public void ejectPassengers() -
removeVehicle
public void removeVehicle() -
stopRiding
public void stopRiding() -
addPassenger
-
removePassenger
-
canAddPassenger
-
couldAcceptPassenger
Deprecated.Forge: Userider sensitive version
-
lerpTo
public void lerpTo(double p_19896_, double p_19897_, double p_19898_, float p_19899_, float p_19900_, int p_19901_) -
lerpTargetX
public double lerpTargetX() -
lerpTargetY
public double lerpTargetY() -
lerpTargetZ
public double lerpTargetZ() -
lerpTargetXRot
public float lerpTargetXRot() -
lerpTargetYRot
public float lerpTargetYRot() -
lerpHeadTo
public void lerpHeadTo(float p_19918_, int p_19919_) -
getPickRadius
public float getPickRadius() -
getLookAngle
-
getHandHoldingItemAngle
-
getRotationVector
-
getForward
-
handleInsidePortal
-
handleNetherPortal
protected void handleNetherPortal() -
getDimensionChangingDelay
public int getDimensionChangingDelay() -
lerpMotion
public void lerpMotion(double p_20306_, double p_20307_, double p_20308_) -
handleDamageEvent
-
handleEntityEvent
public void handleEntityEvent(byte p_19882_) -
animateHurt
public void animateHurt(float p_265161_) -
getHandSlots
-
getArmorSlots
-
getAllSlots
-
setItemSlot
-
isOnFire
public boolean isOnFire() -
isPassenger
public boolean isPassenger() -
isVehicle
public boolean isVehicle() -
dismountsUnderwater
public boolean dismountsUnderwater() -
canControlVehicle
public boolean canControlVehicle() -
setShiftKeyDown
public void setShiftKeyDown(boolean p_20261_) -
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_20274_) -
isSwimming
public boolean isSwimming() -
isVisuallySwimming
public boolean isVisuallySwimming() -
isVisuallyCrawling
public boolean isVisuallyCrawling() -
setSwimming
public void setSwimming(boolean p_20283_) -
hasGlowingTag
public final boolean hasGlowingTag() -
setGlowingTag
public final void setGlowingTag(boolean p_146916_) -
isCurrentlyGlowing
public boolean isCurrentlyGlowing() -
isInvisible
public boolean isInvisible() -
isInvisibleTo
-
isOnRails
public boolean isOnRails() -
updateDynamicGameEventListener
public void updateDynamicGameEventListener(BiConsumer<DynamicGameEventListener<?>, ServerLevel> p_216996_) -
getTeam
-
isAlliedTo
-
isAlliedTo
-
setInvisible
public void setInvisible(boolean p_20304_) -
getMaxAirSupply
public int getMaxAirSupply() -
getAirSupply
public int getAirSupply() -
setAirSupply
public void setAirSupply(int p_20302_) -
getTicksFrozen
public int getTicksFrozen() -
setTicksFrozen
public void setTicksFrozen(int p_146918_) -
getPercentFrozen
public float getPercentFrozen() -
isFullyFrozen
public boolean isFullyFrozen() -
getTicksRequiredToFreeze
public int getTicksRequiredToFreeze() -
thunderHit
-
onAboveBubbleCol
public void onAboveBubbleCol(boolean p_20313_) -
onInsideBubbleColumn
public void onInsideBubbleColumn(boolean p_20322_) -
killedEntity
-
checkSlowFallDistance
public void checkSlowFallDistance() -
resetFallDistance
public void resetFallDistance() -
moveTowardsClosestSpace
protected void moveTowardsClosestSpace(double p_20315_, double p_20316_, double p_20317_) -
makeStuckInBlock
-
removeAction
-
getName
-
getTypeName
-
is
-
getYHeadRot
public float getYHeadRot() -
setYHeadRot
public void setYHeadRot(float p_20328_) -
setYBodyRot
public void setYBodyRot(float p_20338_) -
isAttackable
public boolean isAttackable() -
skipAttackInteraction
-
toString
-
isInvulnerableTo
-
isInvulnerable
public boolean isInvulnerable() -
setInvulnerable
public void setInvulnerable(boolean p_20332_) -
copyPosition
-
restoreFrom
-
changeDimension
-
changeDimension
-
removeAfterChangingDimensions
protected void removeAfterChangingDimensions() -
findDimensionEntryPoint
-
getRelativePortalPosition
protected Vec3 getRelativePortalPosition(Direction.Axis p_20045_, BlockUtil.FoundRectangle p_20046_) -
getExitPortal
protected Optional<BlockUtil.FoundRectangle> getExitPortal(ServerLevel p_185935_, BlockPos p_185936_, boolean p_185937_, WorldBorder p_185938_) -
canChangeDimensions
public boolean canChangeDimensions() -
getBlockExplosionResistance
public float getBlockExplosionResistance(Explosion p_19992_, BlockGetter p_19993_, BlockPos p_19994_, BlockState p_19995_, FluidState p_19996_, float p_19997_) -
shouldBlockExplode
public boolean shouldBlockExplode(Explosion p_19987_, BlockGetter p_19988_, BlockPos p_19989_, BlockState p_19990_, float p_19991_) -
getMaxFallDistance
public int getMaxFallDistance() -
isIgnoringBlockTriggers
public boolean isIgnoringBlockTriggers() -
fillCrashReportCategory
-
displayFireAnimation
public boolean displayFireAnimation() -
setUUID
-
getUUID
- Specified by:
getUUID
in interfaceEntityAccess
-
getStringUUID
-
getScoreboardName
-
isPushedByFluid
Deprecated. -
getViewScale
public static double getViewScale() -
setViewScale
public static void setViewScale(double p_20104_) -
getDisplayName
- Specified by:
getDisplayName
in interfaceNameable
-
setCustomName
-
getCustomName
- Specified by:
getCustomName
in interfaceNameable
-
hasCustomName
public boolean hasCustomName()- Specified by:
hasCustomName
in interfaceNameable
-
setCustomNameVisible
public void setCustomNameVisible(boolean p_20341_) -
isCustomNameVisible
public boolean isCustomNameVisible() -
teleportToWithTicket
public final void teleportToWithTicket(double p_20325_, double p_20326_, double p_20327_) -
teleportTo
public boolean teleportTo(ServerLevel p_265257_, double p_265407_, double p_265727_, double p_265410_, Set<RelativeMovement> p_265083_, float p_265573_, float p_265094_) -
dismountTo
public void dismountTo(double p_146825_, double p_146826_, double p_146827_) -
teleportTo
public void teleportTo(double p_19887_, double p_19888_, double p_19889_) -
teleportPassengers
private void teleportPassengers() -
teleportRelative
public void teleportRelative(double p_249341_, double p_252229_, double p_252038_) -
shouldShowName
public boolean shouldShowName() -
onSyncedDataUpdated
-
onSyncedDataUpdated
-
fixupDimensions
Deprecated. -
refreshDimensions
public void refreshDimensions() -
getDirection
-
getMotionDirection
-
createHoverEvent
-
broadcastToPlayer
-
getBoundingBox
- Specified by:
getBoundingBox
in interfaceEntityAccess
-
getBoundingBoxForCulling
-
setBoundingBox
-
getEyeHeight
-
getEyeHeight
-
getEyeHeight
public final float getEyeHeight() -
getLeashOffset
-
getLeashOffset
-
getSlot
-
sendSystemMessage
- Specified by:
sendSystemMessage
in interfaceCommandSource
-
getCommandSenderWorld
-
getServer
-
interactAt
-
ignoreExplosion
public boolean ignoreExplosion() -
doEnchantDamageEffects
-
startSeenByPlayer
-
stopSeenByPlayer
-
rotate
-
mirror
-
onlyOpCanSetNbt
public boolean onlyOpCanSetNbt() -
getControllingPassenger
-
hasControllingPassenger
public final boolean hasControllingPassenger() -
getPassengers
-
getFirstPassenger
-
hasPassenger
-
hasPassenger
-
getIndirectPassengersStream
-
getSelfAndPassengers
- Specified by:
getSelfAndPassengers
in interfaceEntityAccess
-
getPassengersAndSelf
- Specified by:
getPassengersAndSelf
in interfaceEntityAccess
-
getIndirectPassengers
-
hasExactlyOnePlayerPassenger
public boolean hasExactlyOnePlayerPassenger() -
getRootVehicle
-
isPassengerOfSameVehicle
-
hasIndirectPassenger
-
isControlledByLocalInstance
public boolean isControlledByLocalInstance() -
isEffectiveAi
public boolean isEffectiveAi() -
getCollisionHorizontalEscapeVector
protected static Vec3 getCollisionHorizontalEscapeVector(double p_19904_, double p_19905_, float p_19906_) -
getDismountLocationForPassenger
-
getVehicle
-
getControlledVehicle
-
getPistonPushReaction
-
getSoundSource
-
getFireImmuneTicks
protected int getFireImmuneTicks() -
createCommandSourceStack
-
getPermissionLevel
protected int getPermissionLevel() -
hasPermissions
public boolean hasPermissions(int p_20311_) -
acceptsSuccess
public boolean acceptsSuccess()- Specified by:
acceptsSuccess
in interfaceCommandSource
-
acceptsFailure
public boolean acceptsFailure()- Specified by:
acceptsFailure
in interfaceCommandSource
-
shouldInformAdmins
public boolean shouldInformAdmins()- Specified by:
shouldInformAdmins
in interfaceCommandSource
-
lookAt
-
updateFluidHeightAndDoFluidPushing
@Deprecated public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> p_204032_, double p_204033_) Deprecated. -
updateFluidHeightAndDoFluidPushing
Deprecated, for removal: This API element is subject to removal in a future version. -
updateFluidHeightAndDoFluidPushing
-
touchingUnloadedChunk
public boolean touchingUnloadedChunk() -
getFluidHeight
Deprecated. -
getFluidJumpThreshold
public double getFluidJumpThreshold() -
getBbWidth
public final float getBbWidth() -
getBbHeight
public final float getBbHeight() -
getNameTagOffsetY
public float getNameTagOffsetY() -
getAddEntityPacket
-
getDimensions
-
position
-
trackingPosition
-
blockPosition
- Specified by:
blockPosition
in interfaceEntityAccess
-
getFeetBlockState
-
chunkPosition
-
getDeltaMovement
-
setDeltaMovement
-
addDeltaMovement
-
setDeltaMovement
public void setDeltaMovement(double p_20335_, double p_20336_, double p_20337_) -
getBlockX
public final int getBlockX() -
getX
public final double getX() -
getX
public double getX(double p_20166_) -
getRandomX
public double getRandomX(double p_20209_) -
getBlockY
public final int getBlockY() -
getY
public final double getY() -
getY
public double getY(double p_20228_) -
getRandomY
public double getRandomY() -
getEyeY
public double getEyeY() -
getBlockZ
public final int getBlockZ() -
getZ
public final double getZ() -
getZ
public double getZ(double p_20247_) -
getRandomZ
public double getRandomZ(double p_20263_) -
setPosRaw
public final void setPosRaw(double p_20344_, double p_20345_, double p_20346_) -
checkDespawn
public void checkDespawn() -
getRopeHoldPosition
-
recreateFromPacket
-
getPickResult
-
setIsInPowderSnow
public void setIsInPowderSnow(boolean p_146925_) -
canFreeze
public boolean canFreeze() -
isFreezing
public boolean isFreezing() -
getYRot
public float getYRot() -
getVisualRotationYInDegrees
public float getVisualRotationYInDegrees() -
setYRot
public void setYRot(float p_146923_) -
getXRot
public float getXRot() -
setXRot
public void setXRot(float p_146927_) -
canSprint
public boolean canSprint() -
maxUpStep
Deprecated. -
setMaxUpStep
public void setMaxUpStep(float p_275672_) -
isRemoved
public final boolean isRemoved() -
getRemovalReason
-
setRemoved
- Specified by:
setRemoved
in interfaceEntityAccess
-
unsetRemoved
protected void unsetRemoved() -
setLevelCallback
- Specified by:
setLevelCallback
in interfaceEntityAccess
-
shouldBeSaved
public boolean shouldBeSaved()- Specified by:
shouldBeSaved
in interfaceEntityAccess
-
isAlwaysTicking
public boolean isAlwaysTicking()- Specified by:
isAlwaysTicking
in interfaceEntityAccess
-
mayInteract
-
canUpdate
public void canUpdate(boolean value) - Specified by:
canUpdate
in interfaceIForgeEntity
-
canUpdate
public boolean canUpdate()- Specified by:
canUpdate
in interfaceIForgeEntity
-
captureDrops
- Specified by:
captureDrops
in interfaceIForgeEntity
-
captureDrops
- Specified by:
captureDrops
in interfaceIForgeEntity
-
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 interfaceIForgeEntity
- Returns:
- A NBTTagCompound
-
canTrample
Description copied from interface:IForgeEntity
- Specified by:
canTrample
in interfaceIForgeEntity
pos
- The block posfallDistance
- 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.- Specified by:
isAddedToWorld
in interfaceIForgeEntity
- 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 interfaceIForgeEntity
-
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 interfaceIForgeEntity
-
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 interfaceIForgeEntity
-
getEyeHeightAccess
@Deprecated(forRemoval=true, since="1.20.1") public float getEyeHeightAccess(Pose pose, EntityDimensions size) Deprecated, for removal: This API element is subject to removal in a future version.Accessor method forgetEyeHeight(Pose, EntityDimensions)
-
setFluidTypeHeight
-
getFluidTypeHeight
Description copied from interface:IForgeEntity
Returns the height of the fluid type in relation to the bounding box of the entity. If the entity is not in the fluid type, then0
is returned.- Specified by:
getFluidTypeHeight
in interfaceIForgeEntity
- Parameters:
type
- the type of the fluid- Returns:
- the height of the fluid compared to the entity
-
isInFluidType
Description copied from interface:IForgeEntity
Returns whether the fluid type the entity is currently in matches the specified condition.- Specified by:
isInFluidType
in interfaceIForgeEntity
- Parameters:
predicate
- a test taking in the fluid type and its heightforAllTypes
-true
if all fluid types should match the condition instead of at least one- Returns:
true
if a fluid type meets the condition,false
otherwise
-
isInFluidType
public final boolean isInFluidType()Description copied from interface:IForgeEntity
Returns whether the entity is in a fluid.- Specified by:
isInFluidType
in interfaceIForgeEntity
- Returns:
true
if the entity is in a fluid,false
otherwise
-
getEyeInFluidType
Description copied from interface:IForgeEntity
Returns the fluid that is on the entity's eyes.- Specified by:
getEyeInFluidType
in interfaceIForgeEntity
- Returns:
- the fluid that is on the entity's eyes
-
getMaxHeightFluidType
Description copied from interface:IForgeEntity
Returns the fluid type which is the highest on the bounding box of the entity.- Specified by:
getMaxHeightFluidType
in interfaceIForgeEntity
- Returns:
- the fluid type which is the highest on the bounding box of the entity
-
getDimensionsForge
Deprecated, for removal: This API element is subject to removal in a future version. -
level
-
setLevel
-
damageSources
-
lerpPositionAndRotationStep
protected void lerpPositionAndRotationStep(int p_298722_, double p_297490_, double p_300716_, double p_298684_, double p_300659_, double p_298926_)
-
rider sensitive version