Package net.minecraft.entity
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
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate AxisAlignedBB
private BlockPos
boolean
protected int
private boolean
private Collection<ItemEntity>
private static final DataParameter<Integer>
private static final DataParameter<Optional<ITextComponent>>
private static final DataParameter<Boolean>
private static final DataParameter<Boolean>
protected static final DataParameter<Pose>
protected static final DataParameter<Byte>
private static final DataParameter<Boolean>
private Vector3d
private EntitySize
protected static final AtomicInteger
protected final EntityDataManager
private float
float
protected boolean
private boolean
boolean
protected boolean
boolean
boolean
boolean
private int
boolean
private static final AxisAlignedBB
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.protected boolean
protected static final org.apache.logging.log4j.Logger
float
float
private boolean
private float
private float
boolean
boolean
protected boolean
private Vector3d
private CompoundNBT
private final double[]
private long
private int
protected BlockPos
protected int
private Vector3d
float
protected final Random
private int
boolean
Deprecated.protected String
protected Vector3d
int
private final EntityType<?>
Deprecated.protected UUID
private Entity
boolean
private static double
float
float
protected boolean
protected boolean
int
double
double
float
float
int
double
double
float
float
int
double
double
Fields inherited from interface net.minecraft.command.ICommandSource
NULL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
absMoveTo
(double p_242281_1_, double p_242281_3_, double p_242281_5_) void
absMoveTo
(double p_70080_1_, double p_70080_3_, double p_70080_5_, float p_70080_7_, float p_70080_8_) boolean
boolean
protected abstract void
addAdditionalSaveData
(CompoundNBT p_213281_1_) protected void
addPassenger
(Entity p_184200_1_) boolean
void
private double
applyPistonMovementRestriction
(Direction.Axis p_213304_1_, double p_213304_2_) void
awardKillScore
(Entity p_191956_1_, int p_191956_2_, DamageSource p_191956_3_) void
baseTick()
boolean
broadcastToPlayer
(ServerPlayerEntity p_174827_1_) protected final Vector3d
calculateUpVector
(float p_213320_1_, float p_213320_2_) protected final Vector3d
calculateViewVector
(float p_174806_1_, float p_174806_2_) protected boolean
canAddPassenger
(Entity p_184219_1_) boolean
boolean
boolean
canCollideWith
(Entity p_241849_1_) protected boolean
canEnterPose
(Pose p_213298_1_) protected boolean
boolean
boolean
canTrample
(BlockState state, BlockPos pos, float fallDistance) Checks if thisEntity
can trample aBlock
.boolean
void
canUpdate
(boolean value) captureDrops
(Collection<ItemEntity> value) boolean
causeFallDamage
(float p_225503_1_, float p_225503_2_) changeDimension
(ServerWorld p_241206_1_) changeDimension
(ServerWorld p_241206_1_, ITeleporter teleporter) boolean
boolean
void
protected void
checkFallDamage
(double p_184231_1_, boolean p_184231_3_, BlockState p_184231_4_, BlockPos p_184231_5_) protected void
void
boolean
closerThan
(Entity p_233562_1_, double p_233562_2_) private Vector3d
static Vector3d
collideBoundingBox
(Vector3d p_213313_0_, AxisAlignedBB p_213313_1_, IWorldReader p_213313_2_, ISelectionContext p_213313_3_, ReuseableStream<VoxelShape> p_213313_4_) static Vector3d
collideBoundingBoxHeuristically
(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_) static Vector3d
collideBoundingBoxLegacy
(Vector3d p_223310_0_, AxisAlignedBB p_223310_1_, ReuseableStream<VoxelShape> p_223310_2_) void
copyPosition
(Entity p_82149_1_) protected HoverEvent
protected abstract void
boolean
float
distanceTo
(Entity p_70032_1_) double
distanceToSqr
(double p_70092_1_, double p_70092_3_, double p_70092_5_) double
distanceToSqr
(Entity p_70068_1_) double
distanceToSqr
(Vector3d p_195048_1_) void
doEnchantDamageEffects
(LivingEntity p_174815_1_, Entity p_174815_2_) protected void
void
boolean
void
fillCrashReportCategory
(CrashReportCategory p_85029_1_) private void
fillIndirectPassengers
(boolean p_200604_1_, Set<Entity> p_200604_2_) protected PortalInfo
findDimensionEntryPoint
(ServerWorld p_241829_1_) boolean
abstract IPacket<?>
int
final float
final float
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_) protected float
protected BlockPos
protected float
protected BlockState
protected AxisAlignedBB
getBoundingBoxForPose
(Pose p_213321_1_) float
protected static Vector3d
getCollisionHorizontalEscapeVector
(double p_233559_0_, double p_233559_2_, float p_233559_4_) int
getDimensions
(Pose p_213305_1_) Deprecated.getDismountLocationForPassenger
(LivingEntity p_230268_1_) final String
protected Optional<TeleportationRepositioner.Result>
getExitPortal
(ServerWorld p_241830_1_, BlockPos p_241830_2_, boolean p_241830_3_) final float
float
getEyeHeight
(Pose p_213307_1_) protected float
getEyeHeight
(Pose p_213316_1_, EntitySize p_213316_2_) Deprecated.Can be overridden but callIForgeEntity.getEyeHeightForge(Pose, EntitySize)
instead.float
getEyeHeightAccess
(Pose pose, EntitySize size) Accessor method forgetEyeHeight(Pose, EntitySize)
final Vector3d
getEyePosition
(float p_174824_1_) double
getEyeY()
protected int
double
getFluidHeight
(ITag<Fluid> p_233571_1_) double
static double
getHorizontalDistanceSqr
(Vector3d p_213296_0_) int
getId()
private static Vector3d
getInputVector
(Vector3d p_213299_0_, float p_213299_1_, float p_213299_2_) getLightProbePosition
(float p_241842_1_) int
int
double
getName()
protected BlockPos
getOnPos()
double
protected int
Returns a NBTTagCompound that can be used to store custom data for this entity.float
int
getPose()
final Vector3d
getPosition
(float p_242282_1_) double
getRandomX
(double p_226282_1_) double
double
getRandomZ
(double p_226287_1_) protected Vector3d
getRelativePortalPosition
(Direction.Axis p_241839_1_, TeleportationRepositioner.Result p_241839_2_) int
getRopeHoldPosition
(float p_241843_1_) protected boolean
getSharedFlag
(int p_70083_1_) protected SoundEvent
protected SoundEvent
protected SoundEvent
getTags()
getTeam()
int
EntityType<?>
getType()
protected ITextComponent
final Vector3d
getUpVector
(float p_213286_1_) getUUID()
static double
final Vector3d
getViewVector
(float p_70676_1_) float
getViewXRot
(float p_195050_1_) float
getViewYRot
(float p_195046_1_) final double
getX()
double
getX
(double p_226275_1_) final double
getY()
double
getY
(double p_226283_1_) float
final double
getZ()
double
getZ
(double p_226285_1_) void
handleEntityEvent
(byte p_70103_1_) void
handleInsidePortal
(BlockPos p_181015_1_) protected void
boolean
int
hashCode()
boolean
hasIndirectPassenger
(Entity p_184215_1_) boolean
boolean
hasPassenger
(Class<? extends Entity> p_205708_1_) boolean
hasPassenger
(Entity p_184196_1_) boolean
hasPermissions
(int p_211513_1_) boolean
hurt
(DamageSource p_70097_1_, float p_70097_2_) boolean
interact
(PlayerEntity p_184230_1_, Hand p_184230_2_) interactAt
(PlayerEntity p_184199_1_, Vector3d p_184199_2_, Hand p_184199_3_) boolean
final boolean
Gets whether this entity has been added to a world (for tracking).boolean
isAlive()
boolean
isAlliedTo
(Entity p_184191_1_) boolean
isAlliedTo
(Team p_184194_1_) boolean
boolean
isColliding
(BlockPos p_242278_1_, BlockState p_242278_2_) boolean
boolean
boolean
boolean
boolean
boolean
isEyeInFluid
(ITag<Fluid> p_208600_1_) boolean
isFree
(double p_70038_1_, double p_70038_3_, double p_70038_5_) private boolean
isFree
(AxisAlignedBB p_174809_1_) boolean
boolean
private boolean
boolean
isInLava()
private boolean
isInRain()
boolean
boolean
isInvisibleTo
(PlayerEntity p_98034_1_) boolean
boolean
isInvulnerableTo
(DamageSource p_180431_1_) boolean
isInWall()
boolean
boolean
boolean
boolean
protected boolean
boolean
boolean
isOnFire()
boolean
boolean
boolean
boolean
isPassengerOfSameVehicle
(Entity p_184223_1_) boolean
boolean
boolean
boolean
boolean
isSilent()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
kill()
void
killed
(ServerWorld p_241847_1_, LivingEntity p_241847_2_) protected void
lavaHurt()
void
lerpHeadTo
(float p_208000_1_, int p_208000_2_) void
lerpMotion
(double p_70016_1_, double p_70016_3_, double p_70016_5_) 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_) protected Vector3d
limitPistonMovement
(Vector3d p_213308_1_) void
load
(CompoundNBT p_70020_1_) void
lookAt
(EntityAnchorArgument.Type p_200602_1_, Vector3d p_200602_2_) protected boolean
void
makeStuckInBlock
(BlockState p_213295_1_, Vector3d p_213295_2_) protected void
markHurt()
protected Vector3d
maybeBackOffFromEdge
(Vector3d p_225514_1_, MoverType p_225514_2_) float
void
void
moveRelative
(float p_213309_1_, Vector3d p_213309_2_) void
moveTo
(double p_225653_1_, double p_225653_3_, double p_225653_5_) void
moveTo
(double p_70012_1_, double p_70012_3_, double p_70012_5_, float p_70012_7_, float p_70012_8_) void
void
protected void
moveTowardsClosestSpace
(double p_213282_1_, double p_213282_3_, double p_213282_5_) protected ListNBT
newDoubleList
(double... p_70087_1_) protected ListNBT
newFloatList
(float... p_70049_1_) protected float
nextStep()
void
onAboveBubbleCol
(boolean p_203002_1_) void
Called after the entity has been added to the world's ticking list.protected void
onInsideBlock
(BlockState p_191955_1_) void
onInsideBubbleColumn
(boolean p_203004_1_) boolean
void
onPassengerTurned
(Entity p_184190_1_) void
Called after the entity has been removed to the world's ticking list.void
onSyncedDataUpdated
(DataParameter<?> p_184206_1_) protected void
pick
(double p_213324_1_, float p_213324_3_, boolean p_213324_4_) void
playerTouch
(PlayerEntity p_70100_1_) protected float
playFlySound
(float p_191954_1_) void
playSound
(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_) protected void
playStepSound
(BlockPos p_180429_1_, BlockState p_180429_2_) protected void
playSwimSound
(float p_203006_1_) position()
void
positionRider
(Entity p_184232_1_) private void
positionRider
(Entity p_226266_1_, Entity.IMoveCallback p_226266_2_) protected void
void
push
(double p_70024_1_, double p_70024_3_, double p_70024_5_) void
protected abstract void
readAdditionalSaveData
(CompoundNBT p_70037_1_) protected void
void
void
remove()
void
remove
(boolean keepData) private static ITextComponent
removeAction
(ITextComponent p_233573_0_) protected void
protected void
removePassenger
(Entity p_184225_1_) boolean
void
protected boolean
protected void
resetPos()
void
restoreFrom
(Entity p_180432_1_) void
revive()
Revives an entity that has been removed from a world.boolean
Deprecated.void
rideTick()
float
boolean
save
(CompoundNBT p_70039_1_) boolean
saveAsPassenger
(CompoundNBT p_184198_1_) saveWithoutId
(CompoundNBT p_189511_1_) void
sendMessage
(ITextComponent p_145747_1_, UUID p_145747_2_) void
setAirSupply
(int p_70050_1_) void
setBoundingBox
(AxisAlignedBB p_174826_1_) void
setCustomName
(ITextComponent p_200203_1_) void
setCustomNameVisible
(boolean p_174805_1_) void
setDeltaMovement
(double p_213293_1_, double p_213293_3_, double p_213293_5_) void
setDeltaMovement
(Vector3d p_213317_1_) void
setGlowing
(boolean p_184195_1_) void
setId
(int p_145769_1_) void
setInvisible
(boolean p_82142_1_) void
setInvulnerable
(boolean p_184224_1_) void
setItemSlot
(EquipmentSlotType p_184201_1_, ItemStack p_184201_2_) void
void
void
setNoGravity
(boolean p_189654_1_) void
setOnGround
(boolean p_230245_1_) void
setPacketCoordinates
(double p_213312_1_, double p_213312_3_, double p_213312_5_) void
setPacketCoordinates
(Vector3d p_242277_1_) void
void
setPos
(double p_70107_1_, double p_70107_3_, double p_70107_5_) void
setPosAndOldPos
(double p_226286_1_, double p_226286_3_, double p_226286_5_) void
void
setPosRaw
(double p_226288_1_, double p_226288_3_, double p_226288_5_) void
setRemainingFireTicks
(int p_241209_1_) protected void
setRot
(float p_70101_1_, float p_70101_2_) void
setSecondsOnFire
(int p_70015_1_) protected void
setSharedFlag
(int p_70052_1_, boolean p_70052_2_) void
setShiftKeyDown
(boolean p_226284_1_) void
setSilent
(boolean p_174810_1_) boolean
void
setSprinting
(boolean p_70031_1_) void
setSwimming
(boolean p_204711_1_) void
static void
setViewScale
(double p_184227_0_) void
setYBodyRot
(float p_181013_1_) void
setYHeadRot
(float p_70034_1_) boolean
shouldBlockExplode
(Explosion p_174816_1_, IBlockReader p_174816_2_, BlockPos p_174816_3_, BlockState p_174816_4_, float p_174816_5_) boolean
boolean
shouldRender
(double p_145770_1_, double p_145770_3_, double p_145770_5_) boolean
shouldRenderAtSqrDistance
(double p_70112_1_) boolean
boolean
boolean
skipAttackInteraction
(Entity p_85031_1_) spawnAtLocation
(ItemStack p_199701_1_) spawnAtLocation
(ItemStack p_70099_1_, float p_70099_2_) spawnAtLocation
(IItemProvider p_199703_1_) spawnAtLocation
(IItemProvider p_199702_1_, int p_199702_2_) protected void
boolean
startRiding
(Entity p_184220_1_) boolean
startRiding
(Entity p_184205_1_, boolean p_184205_2_) void
startSeenByPlayer
(ServerPlayerEntity p_184178_1_) void
void
stopSeenByPlayer
(ServerPlayerEntity p_184203_1_) void
teleportTo
(double p_70634_1_, double p_70634_3_, double p_70634_5_) final void
teleportToWithTicket
(double p_223102_1_, double p_223102_3_, double p_223102_5_) void
thunderHit
(ServerWorld p_241841_1_, LightningBoltEntity p_241841_2_) void
tick()
toString()
void
turn
(double p_195049_1_, double p_195049_3_) final void
unRide()
boolean
updateFluidHeightAndDoFluidPushing
(ITag<Fluid> p_210500_1_, double p_210500_2_) private void
protected boolean
(package private) void
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.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getDimensionsForge, getEntity, getEyeHeightForge, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
-
Field Details
-
LOGGER
protected static final org.apache.logging.log4j.Logger LOGGER -
ENTITY_COUNTER
-
EMPTY_LIST
-
INITIAL_AABB
-
viewScale
private static double viewScale -
type
Deprecated. -
id
private int id -
blocksBuilding
public boolean blocksBuilding -
passengers
-
boardingCooldown
protected int boardingCooldown -
vehicle
-
forcedLoading
public boolean forcedLoading -
level
-
xo
public double xo -
yo
public double yo -
zo
public double zo -
position
-
blockPosition
-
deltaMovement
-
yRot
public float yRot -
xRot
public float xRot -
yRotO
public float yRotO -
xRotO
public float xRotO -
bb
-
onGround
protected boolean onGround -
horizontalCollision
public boolean horizontalCollision -
verticalCollision
public boolean verticalCollision -
hurtMarked
public boolean hurtMarked -
stuckSpeedMultiplier
-
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
-
tickCount
public int tickCount -
remainingFireTicks
private int remainingFireTicks -
wasTouchingWater
protected boolean wasTouchingWater -
fluidHeight
-
wasEyeInWater
protected boolean wasEyeInWater -
fluidOnEyes
-
invulnerableTime
public int invulnerableTime -
firstTick
protected boolean firstTick -
entityData
-
DATA_SHARED_FLAGS_ID
-
DATA_AIR_SUPPLY_ID
-
DATA_CUSTOM_NAME
-
DATA_CUSTOM_NAME_VISIBLE
-
DATA_SILENT
-
DATA_NO_GRAVITY
-
DATA_POSE
-
inChunk
public boolean inChunk -
xChunk
public int xChunk -
yChunk
public int yChunk -
zChunk
public int zChunk -
movedSinceLastChunkCheck
private boolean movedSinceLastChunkCheck -
packetCoordinates
-
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
-
glowing
protected boolean glowing -
tags
-
forceChunkAddition
private boolean forceChunkAddition -
pistonDeltas
private final double[] pistonDeltas -
pistonDeltasGameTime
private long pistonDeltasGameTime -
dimensions
-
eyeHeight
private float eyeHeight -
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.
-
-
Constructor Details
-
Entity
-
-
Method Details
-
isColliding
-
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
-
getPacketCoordinates
-
getType
-
getId
public int getId() -
setId
public void setId(int p_145769_1_) -
getTags
-
addTag
-
removeTag
-
kill
public void kill() -
defineSynchedData
protected abstract void defineSynchedData() -
getEntityData
-
equals
-
hashCode
public int hashCode() -
resetPos
protected void resetPos() -
remove
public void remove() -
remove
public void remove(boolean keepData) -
setPose
-
getPose
-
closerThan
-
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
-
setOnGround
public void setOnGround(boolean p_230245_1_) -
isOnGround
public boolean isOnGround() -
move
-
getOnPos
-
getBlockJumpFactor
protected float getBlockJumpFactor() -
getBlockSpeedFactor
protected float getBlockSpeedFactor() -
getBlockPosBelowThatAffectsMyMovement
-
maybeBackOffFromEdge
-
limitPistonMovement
-
applyPistonMovementRestriction
-
collide
-
getHorizontalDistanceSqr
-
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
-
getSwimSplashSound
-
getSwimHighSpeedSplashSound
-
checkInsideBlocks
protected void checkInsideBlocks() -
onInsideBlock
-
playStepSound
-
playSwimSound
protected void playSwimSound(float p_203006_1_) -
playFlySound
protected float playFlySound(float p_191954_1_) -
makeFlySound
protected boolean makeFlySound() -
playSound
-
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
-
canSpawnSprintParticle
public boolean canSpawnSprintParticle() -
spawnSprintParticle
protected void spawnSprintParticle() -
isEyeInFluid
-
isInLava
public boolean isInLava() -
moveRelative
-
getInputVector
-
getBrightness
public float getBrightness() -
setLevel
-
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
-
moveTo
public void moveTo(double p_225653_1_, double p_225653_3_, double p_225653_5_) -
moveTo
-
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
-
distanceToSqr
public double distanceToSqr(double p_70092_1_, double p_70092_3_, double p_70092_5_) -
distanceToSqr
-
distanceToSqr
-
playerTouch
-
push
-
push
public void push(double p_70024_1_, double p_70024_3_, double p_70024_5_) -
markHurt
protected void markHurt() -
hurt
-
getViewVector
-
getViewXRot
public float getViewXRot(float p_195050_1_) -
getViewYRot
public float getViewYRot(float p_195046_1_) -
calculateViewVector
-
getUpVector
-
calculateUpVector
-
getEyePosition
-
getLightProbePosition
-
getPosition
-
pick
-
isPickable
public boolean isPickable() -
isPushable
public boolean isPushable() -
awardKillScore
-
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
-
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
public double getMyRidingOffset() -
getPassengersRidingOffset
public double getPassengersRidingOffset() -
startRiding
-
showVehicleHealth
public boolean showVehicleHealth() -
startRiding
-
canRide
-
canEnterPose
-
ejectPassengers
public void ejectPassengers() -
removeVehicle
public void removeVehicle() -
stopRiding
public void stopRiding() -
addPassenger
-
removePassenger
-
canAddPassenger
-
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
-
getRotationVector
-
getForward
-
handleInsidePortal
-
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
-
getArmorSlots
-
getAllSlots
-
setItemSlot
-
isOnFire
public boolean isOnFire() -
isPassenger
public boolean isPassenger() -
isVehicle
public boolean isVehicle() -
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
-
getTeam
-
isAlliedTo
-
isAlliedTo
-
setInvisible
public void setInvisible(boolean p_82142_1_) -
getMaxAirSupply
public int getMaxAirSupply() -
getAirSupply
public int getAirSupply() -
setAirSupply
public void setAirSupply(int p_70050_1_) -
thunderHit
-
onAboveBubbleCol
public void onAboveBubbleCol(boolean p_203002_1_) -
onInsideBubbleColumn
public void onInsideBubbleColumn(boolean p_203004_1_) -
killed
-
moveTowardsClosestSpace
protected void moveTowardsClosestSpace(double p_213282_1_, double p_213282_3_, double p_213282_5_) -
makeStuckInBlock
-
removeAction
-
getName
-
getTypeName
-
is
-
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
-
toString
-
isInvulnerableTo
-
isInvulnerable
public boolean isInvulnerable() -
setInvulnerable
public void setInvulnerable(boolean p_184224_1_) -
copyPosition
-
restoreFrom
-
changeDimension
-
changeDimension
-
removeAfterChangingDimensions
protected void removeAfterChangingDimensions() -
findDimensionEntryPoint
-
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
-
displayFireAnimation
public boolean displayFireAnimation() -
setUUID
-
getUUID
-
getStringUUID
-
getScoreboardName
-
isPushedByFluid
public boolean isPushedByFluid() -
getViewScale
public static double getViewScale() -
setViewScale
public static void setViewScale(double p_184227_0_) -
getDisplayName
- Specified by:
getDisplayName
in interfaceINameable
-
setCustomName
-
getCustomName
- Specified by:
getCustomName
in interfaceINameable
-
hasCustomName
public boolean hasCustomName()- Specified by:
hasCustomName
in interfaceINameable
-
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
-
refreshDimensions
public void refreshDimensions() -
getDirection
-
getMotionDirection
-
createHoverEvent
-
broadcastToPlayer
-
getBoundingBox
-
getBoundingBoxForCulling
-
getBoundingBoxForPose
-
setBoundingBox
-
getEyeHeight
Deprecated.Can be overridden but callIForgeEntity.getEyeHeightForge(Pose, EntitySize)
instead. -
getEyeHeight
-
getEyeHeight
public final float getEyeHeight() -
getLeashOffset
-
setSlot
-
sendMessage
- Specified by:
sendMessage
in interfaceICommandSource
-
getCommandSenderWorld
-
getServer
-
interactAt
public ActionResultType interactAt(PlayerEntity p_184199_1_, Vector3d p_184199_2_, Hand p_184199_3_) -
ignoreExplosion
public boolean ignoreExplosion() -
doEnchantDamageEffects
-
startSeenByPlayer
-
stopSeenByPlayer
-
rotate
-
mirror
-
onlyOpCanSetNbt
public boolean onlyOpCanSetNbt() -
checkAndResetForcedChunkAdditionFlag
public boolean checkAndResetForcedChunkAdditionFlag() -
checkAndResetUpdateChunkPos
public boolean checkAndResetUpdateChunkPos() -
getControllingPassenger
-
getPassengers
-
hasPassenger
-
hasPassenger
-
getIndirectPassengers
-
getSelfAndPassengers
-
hasOnePlayerPassenger
public boolean hasOnePlayerPassenger() -
fillIndirectPassengers
-
getRootVehicle
-
isPassengerOfSameVehicle
-
hasIndirectPassenger
-
isControlledByLocalInstance
public boolean isControlledByLocalInstance() -
getCollisionHorizontalEscapeVector
protected static Vector3d getCollisionHorizontalEscapeVector(double p_233559_0_, double p_233559_2_, float p_233559_4_) -
getDismountLocationForPassenger
-
getVehicle
-
getPistonPushReaction
-
getSoundSource
-
getFireImmuneTicks
protected int getFireImmuneTicks() -
createCommandSourceStack
-
getPermissionLevel
protected int getPermissionLevel() -
hasPermissions
public boolean hasPermissions(int p_211513_1_) -
acceptsSuccess
public boolean acceptsSuccess()- Specified by:
acceptsSuccess
in interfaceICommandSource
-
acceptsFailure
public boolean acceptsFailure()- Specified by:
acceptsFailure
in interfaceICommandSource
-
shouldInformAdmins
public boolean shouldInformAdmins()- Specified by:
shouldInformAdmins
in interfaceICommandSource
-
lookAt
-
updateFluidHeightAndDoFluidPushing
-
getFluidHeight
-
getFluidJumpThreshold
public double getFluidJumpThreshold() -
getBbWidth
public final float getBbWidth() -
getBbHeight
public final float getBbHeight() -
getAddEntityPacket
-
getDimensions
Deprecated.Can be overridden but callIForgeEntity.getDimensionsForge(Pose)
instead. -
position
-
blockPosition
-
getDeltaMovement
-
setDeltaMovement
-
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
-
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
Checks if thisEntity
can trample aBlock
.- 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. SeeWorld#onEntityAdded(Entity)
andWorld#onEntityRemoved(Entity)
.- 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
Accessor method forgetEyeHeight(Pose, EntitySize)
-
IForgeEntity.getDimensionsForge(Pose)
instead.