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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AxisAlignedBBprivate BlockPosbooleanprotected intprivate booleanprivate 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 Vector3dprivate EntitySizeprotected static final AtomicIntegerprotected final EntityDataManagerprivate floatfloatprotected booleanprivate booleanbooleanprotected booleanbooleanbooleanbooleanprivate intbooleanprivate static final AxisAlignedBBprivate booleanintprivate booleanInternal 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 booleanprotected static final org.apache.logging.log4j.Loggerfloatfloatprivate booleanprivate floatprivate floatbooleanbooleanprotected booleanprivate Vector3dprivate CompoundNBTprivate final double[]private longprivate intprotected BlockPosprotected intprivate Vector3dfloatprotected final Randomprivate intbooleanDeprecated.protected Stringprotected Vector3dintprivate final EntityType<?>Deprecated.protected UUIDprivate Entitybooleanprivate static doublefloatfloatprotected booleanprotected booleanintdoubledoublefloatfloatintdoubledoublefloatfloatintdoubledoubleFields inherited from interface net.minecraft.command.ICommandSource
NULL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabsMoveTo(double p_242281_1_, double p_242281_3_, double p_242281_5_) voidabsMoveTo(double p_70080_1_, double p_70080_3_, double p_70080_5_, float p_70080_7_, float p_70080_8_) booleanbooleanprotected abstract voidaddAdditionalSaveData(CompoundNBT p_213281_1_) protected voidaddPassenger(Entity p_184200_1_) booleanvoidprivate doubleapplyPistonMovementRestriction(Direction.Axis p_213304_1_, double p_213304_2_) voidawardKillScore(Entity p_191956_1_, int p_191956_2_, DamageSource p_191956_3_) voidbaseTick()booleanbroadcastToPlayer(ServerPlayerEntity p_174827_1_) protected final Vector3dcalculateUpVector(float p_213320_1_, float p_213320_2_) protected final Vector3dcalculateViewVector(float p_174806_1_, float p_174806_2_) protected booleancanAddPassenger(Entity p_184219_1_) booleanbooleanbooleancanCollideWith(Entity p_241849_1_) protected booleancanEnterPose(Pose p_213298_1_) protected booleanbooleanbooleancanTrample(BlockState state, BlockPos pos, float fallDistance) Checks if thisEntitycan trample aBlock.booleanvoidcanUpdate(boolean value) captureDrops(Collection<ItemEntity> value) booleancauseFallDamage(float p_225503_1_, float p_225503_2_) changeDimension(ServerWorld p_241206_1_) changeDimension(ServerWorld p_241206_1_, ITeleporter teleporter) booleanbooleanvoidprotected voidcheckFallDamage(double p_184231_1_, boolean p_184231_3_, BlockState p_184231_4_, BlockPos p_184231_5_) protected voidvoidbooleancloserThan(Entity p_233562_1_, double p_233562_2_) private Vector3dstatic Vector3dcollideBoundingBox(Vector3d p_213313_0_, AxisAlignedBB p_213313_1_, IWorldReader p_213313_2_, ISelectionContext p_213313_3_, ReuseableStream<VoxelShape> p_213313_4_) static Vector3dcollideBoundingBoxHeuristically(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 Vector3dcollideBoundingBoxLegacy(Vector3d p_223310_0_, AxisAlignedBB p_223310_1_, ReuseableStream<VoxelShape> p_223310_2_) voidcopyPosition(Entity p_82149_1_) protected HoverEventprotected abstract voidbooleanfloatdistanceTo(Entity p_70032_1_) doubledistanceToSqr(double p_70092_1_, double p_70092_3_, double p_70092_5_) doubledistanceToSqr(Entity p_70068_1_) doubledistanceToSqr(Vector3d p_195048_1_) voiddoEnchantDamageEffects(LivingEntity p_174815_1_, Entity p_174815_2_) protected voidvoidbooleanvoidfillCrashReportCategory(CrashReportCategory p_85029_1_) private voidfillIndirectPassengers(boolean p_200604_1_, Set<Entity> p_200604_2_) protected PortalInfofindDimensionEntryPoint(ServerWorld p_241829_1_) booleanabstract IPacket<?>intfinal floatfinal floatfloatgetBlockExplosionResistance(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 floatprotected BlockPosprotected floatprotected BlockStateprotected AxisAlignedBBgetBoundingBoxForPose(Pose p_213321_1_) floatprotected static Vector3dgetCollisionHorizontalEscapeVector(double p_233559_0_, double p_233559_2_, float p_233559_4_) intgetDimensions(Pose p_213305_1_) Deprecated.getDismountLocationForPassenger(LivingEntity p_230268_1_) final Stringprotected Optional<TeleportationRepositioner.Result>getExitPortal(ServerWorld p_241830_1_, BlockPos p_241830_2_, boolean p_241830_3_) final floatfloatgetEyeHeight(Pose p_213307_1_) protected floatgetEyeHeight(Pose p_213316_1_, EntitySize p_213316_2_) Deprecated.Can be overridden but callIForgeEntity.getEyeHeightForge(Pose, EntitySize)instead.floatgetEyeHeightAccess(Pose pose, EntitySize size) Accessor method forgetEyeHeight(Pose, EntitySize)final Vector3dgetEyePosition(float p_174824_1_) doublegetEyeY()protected intdoublegetFluidHeight(ITag<Fluid> p_233571_1_) doublestatic doublegetHorizontalDistanceSqr(Vector3d p_213296_0_) intgetId()private static Vector3dgetInputVector(Vector3d p_213299_0_, float p_213299_1_, float p_213299_2_) getLightProbePosition(float p_241842_1_) intintdoublegetName()protected BlockPosgetOnPos()doubleprotected intReturns a NBTTagCompound that can be used to store custom data for this entity.floatintgetPose()final Vector3dgetPosition(float p_242282_1_) doublegetRandomX(double p_226282_1_) doubledoublegetRandomZ(double p_226287_1_) protected Vector3dgetRelativePortalPosition(Direction.Axis p_241839_1_, TeleportationRepositioner.Result p_241839_2_) intgetRopeHoldPosition(float p_241843_1_) protected booleangetSharedFlag(int p_70083_1_) protected SoundEventprotected SoundEventprotected SoundEventgetTags()getTeam()intEntityType<?>getType()protected ITextComponentfinal Vector3dgetUpVector(float p_213286_1_) getUUID()static doublefinal Vector3dgetViewVector(float p_70676_1_) floatgetViewXRot(float p_195050_1_) floatgetViewYRot(float p_195046_1_) final doublegetX()doublegetX(double p_226275_1_) final doublegetY()doublegetY(double p_226283_1_) floatfinal doublegetZ()doublegetZ(double p_226285_1_) voidhandleEntityEvent(byte p_70103_1_) voidhandleInsidePortal(BlockPos p_181015_1_) protected voidbooleaninthashCode()booleanhasIndirectPassenger(Entity p_184215_1_) booleanbooleanhasPassenger(Class<? extends Entity> p_205708_1_) booleanhasPassenger(Entity p_184196_1_) booleanhasPermissions(int p_211513_1_) booleanhurt(DamageSource p_70097_1_, float p_70097_2_) booleaninteract(PlayerEntity p_184230_1_, Hand p_184230_2_) interactAt(PlayerEntity p_184199_1_, Vector3d p_184199_2_, Hand p_184199_3_) booleanfinal booleanGets whether this entity has been added to a world (for tracking).booleanisAlive()booleanisAlliedTo(Entity p_184191_1_) booleanisAlliedTo(Team p_184194_1_) booleanbooleanisColliding(BlockPos p_242278_1_, BlockState p_242278_2_) booleanbooleanbooleanbooleanbooleanbooleanisEyeInFluid(ITag<Fluid> p_208600_1_) booleanisFree(double p_70038_1_, double p_70038_3_, double p_70038_5_) private booleanisFree(AxisAlignedBB p_174809_1_) booleanbooleanprivate booleanbooleanisInLava()private booleanisInRain()booleanbooleanisInvisibleTo(PlayerEntity p_98034_1_) booleanbooleanisInvulnerableTo(DamageSource p_180431_1_) booleanisInWall()booleanbooleanbooleanbooleanprotected booleanbooleanbooleanisOnFire()booleanbooleanbooleanbooleanisPassengerOfSameVehicle(Entity p_184223_1_) booleanbooleanbooleanbooleanbooleanisSilent()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidkill()voidkilled(ServerWorld p_241847_1_, LivingEntity p_241847_2_) protected voidlavaHurt()voidlerpHeadTo(float p_208000_1_, int p_208000_2_) voidlerpMotion(double p_70016_1_, double p_70016_3_, double p_70016_5_) voidlerpTo(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 Vector3dlimitPistonMovement(Vector3d p_213308_1_) voidload(CompoundNBT p_70020_1_) voidlookAt(EntityAnchorArgument.Type p_200602_1_, Vector3d p_200602_2_) protected booleanvoidmakeStuckInBlock(BlockState p_213295_1_, Vector3d p_213295_2_) protected voidmarkHurt()protected Vector3dmaybeBackOffFromEdge(Vector3d p_225514_1_, MoverType p_225514_2_) floatvoidvoidmoveRelative(float p_213309_1_, Vector3d p_213309_2_) voidmoveTo(double p_225653_1_, double p_225653_3_, double p_225653_5_) voidmoveTo(double p_70012_1_, double p_70012_3_, double p_70012_5_, float p_70012_7_, float p_70012_8_) voidvoidprotected voidmoveTowardsClosestSpace(double p_213282_1_, double p_213282_3_, double p_213282_5_) protected ListNBTnewDoubleList(double... p_70087_1_) protected ListNBTnewFloatList(float... p_70049_1_) protected floatnextStep()voidonAboveBubbleCol(boolean p_203002_1_) voidCalled after the entity has been added to the world's ticking list.protected voidonInsideBlock(BlockState p_191955_1_) voidonInsideBubbleColumn(boolean p_203004_1_) booleanvoidonPassengerTurned(Entity p_184190_1_) voidCalled after the entity has been removed to the world's ticking list.voidonSyncedDataUpdated(DataParameter<?> p_184206_1_) protected voidpick(double p_213324_1_, float p_213324_3_, boolean p_213324_4_) voidplayerTouch(PlayerEntity p_70100_1_) protected floatplayFlySound(float p_191954_1_) voidplaySound(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_) protected voidplayStepSound(BlockPos p_180429_1_, BlockState p_180429_2_) protected voidplaySwimSound(float p_203006_1_) position()voidpositionRider(Entity p_184232_1_) private voidpositionRider(Entity p_226266_1_, Entity.IMoveCallback p_226266_2_) protected voidvoidpush(double p_70024_1_, double p_70024_3_, double p_70024_5_) voidprotected abstract voidreadAdditionalSaveData(CompoundNBT p_70037_1_) protected voidvoidvoidremove()voidremove(boolean keepData) private static ITextComponentremoveAction(ITextComponent p_233573_0_) protected voidprotected voidremovePassenger(Entity p_184225_1_) booleanvoidprotected booleanprotected voidresetPos()voidrestoreFrom(Entity p_180432_1_) voidrevive()Revives an entity that has been removed from a world.booleanDeprecated.voidrideTick()floatbooleansave(CompoundNBT p_70039_1_) booleansaveAsPassenger(CompoundNBT p_184198_1_) saveWithoutId(CompoundNBT p_189511_1_) voidsendMessage(ITextComponent p_145747_1_, UUID p_145747_2_) voidsetAirSupply(int p_70050_1_) voidsetBoundingBox(AxisAlignedBB p_174826_1_) voidsetCustomName(ITextComponent p_200203_1_) voidsetCustomNameVisible(boolean p_174805_1_) voidsetDeltaMovement(double p_213293_1_, double p_213293_3_, double p_213293_5_) voidsetDeltaMovement(Vector3d p_213317_1_) voidsetGlowing(boolean p_184195_1_) voidsetId(int p_145769_1_) voidsetInvisible(boolean p_82142_1_) voidsetInvulnerable(boolean p_184224_1_) voidsetItemSlot(EquipmentSlotType p_184201_1_, ItemStack p_184201_2_) voidvoidvoidsetNoGravity(boolean p_189654_1_) voidsetOnGround(boolean p_230245_1_) voidsetPacketCoordinates(double p_213312_1_, double p_213312_3_, double p_213312_5_) voidsetPacketCoordinates(Vector3d p_242277_1_) voidvoidsetPos(double p_70107_1_, double p_70107_3_, double p_70107_5_) voidsetPosAndOldPos(double p_226286_1_, double p_226286_3_, double p_226286_5_) voidvoidsetPosRaw(double p_226288_1_, double p_226288_3_, double p_226288_5_) voidsetRemainingFireTicks(int p_241209_1_) protected voidsetRot(float p_70101_1_, float p_70101_2_) voidsetSecondsOnFire(int p_70015_1_) protected voidsetSharedFlag(int p_70052_1_, boolean p_70052_2_) voidsetShiftKeyDown(boolean p_226284_1_) voidsetSilent(boolean p_174810_1_) booleanvoidsetSprinting(boolean p_70031_1_) voidsetSwimming(boolean p_204711_1_) voidstatic voidsetViewScale(double p_184227_0_) voidsetYBodyRot(float p_181013_1_) voidsetYHeadRot(float p_70034_1_) booleanshouldBlockExplode(Explosion p_174816_1_, IBlockReader p_174816_2_, BlockPos p_174816_3_, BlockState p_174816_4_, float p_174816_5_) booleanbooleanshouldRender(double p_145770_1_, double p_145770_3_, double p_145770_5_) booleanshouldRenderAtSqrDistance(double p_70112_1_) booleanbooleanbooleanskipAttackInteraction(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 voidbooleanstartRiding(Entity p_184220_1_) booleanstartRiding(Entity p_184205_1_, boolean p_184205_2_) voidstartSeenByPlayer(ServerPlayerEntity p_184178_1_) voidvoidstopSeenByPlayer(ServerPlayerEntity p_184203_1_) voidteleportTo(double p_70634_1_, double p_70634_3_, double p_70634_5_) final voidteleportToWithTicket(double p_223102_1_, double p_223102_3_, double p_223102_5_) voidthunderHit(ServerWorld p_241841_1_, LightningBoltEntity p_241841_2_) voidtick()toString()voidturn(double p_195049_1_, double p_195049_3_) final voidunRide()booleanupdateFluidHeightAndDoFluidPushing(ITag<Fluid> p_210500_1_, double p_210500_2_) private voidprotected boolean(package private) voidvoidMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods 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:
getDisplayNamein interfaceINameable
-
setCustomName
-
getCustomName
- Specified by:
getCustomNamein interfaceINameable
-
hasCustomName
public boolean hasCustomName()- Specified by:
hasCustomNamein 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:
sendMessagein 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:
acceptsSuccessin interfaceICommandSource
-
acceptsFailure
public boolean acceptsFailure()- Specified by:
acceptsFailurein interfaceICommandSource
-
shouldInformAdmins
public boolean shouldInformAdmins()- Specified by:
shouldInformAdminsin 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:
canUpdatein interfaceIForgeEntity
-
canUpdate
public boolean canUpdate()- Specified by:
canUpdatein interfaceIForgeEntity
-
captureDrops
- Specified by:
captureDropsin interfaceIForgeEntity
-
captureDrops
- Specified by:
captureDropsin interfaceIForgeEntity
-
getPersistentData
Description copied from interface:IForgeEntityReturns 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:
getPersistentDatain interfaceIForgeEntity- Returns:
- A NBTTagCompound
-
canTrample
Description copied from interface:IForgeEntityChecks if thisEntitycan trample aBlock.- Specified by:
canTramplein interfaceIForgeEntitypos- The block posfallDistance- The fall distance- Returns:
trueif this entity can trample,falseotherwise
-
isAddedToWorld
public final boolean isAddedToWorld()Description copied from interface:IForgeEntityGets 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:
isAddedToWorldin interfaceIForgeEntity- Returns:
- True if this entity is being tracked by a world
-
onAddedToWorld
public void onAddedToWorld()Description copied from interface:IForgeEntityCalled 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:
onAddedToWorldin interfaceIForgeEntity
-
onRemovedFromWorld
public void onRemovedFromWorld()Description copied from interface:IForgeEntityCalled 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:
onRemovedFromWorldin interfaceIForgeEntity
-
revive
public void revive()Description copied from interface:IForgeEntityRevives 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:
revivein interfaceIForgeEntity
-
getEyeHeightAccess
Accessor method forgetEyeHeight(Pose, EntitySize)
-
IForgeEntity.getDimensionsForge(Pose)instead.