Package net.minecraft.world.entity
Class Entity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
- All Implemented Interfaces:
CommandSource,SyncedDataHolder,EntityAccess,Nameable,ScoreHolder,IAttachmentHolder,IEntityExtension,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
AreaEffectCloud,BlockAttachedEntity,Display,EndCrystal,EntityDataSerializerTest.TestEntity,EntityTests.AdaptedSpawnEntity,EntityTests.CustomComplexSpawnEntity,EntityTests.SimpleEntity,EvokerFangs,ExperienceOrb,EyeOfEnder,FallingBlockEntity,Interaction,ItemEntity,LightningBolt,LivingEntity,Marker,OminousItemSpawner,PartEntity,PrimedTnt,Projectile,VehicleEntity
public abstract class Entity
extends AttachmentHolder
implements SyncedDataHolder, Nameable, EntityAccess, CommandSource, ScoreHolder, IEntityExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic enumstatic enumNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intprivate AABBprivate BlockPosbooleanstatic final intprotected intprivate Collection<ItemEntity> private ChunkPosstatic final intprivate floatprivate 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 floatstatic final floatstatic final floatstatic final doublestatic final doubleprivate Vec3private EntityDimensionsprotected static final AtomicIntegerprotected final SynchedEntityDataprivate floatfloatprotected booleanprotected static final intprotected static final intprivate static final intprotected static final intprivate static final intprivate static final intprivate static final intDeprecated.Deprecated.floatprotected it.unimi.dsi.fastutil.objects.Object2DoubleMap<FluidType> private FluidTypestatic final intprivate booleanbooleanprivate booleanbooleanbooleanprivate intstatic final Stringprivate BlockStateprivate static final AABBprivate 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.booleanprivate intprivate static final doubleprivate static final doubleprivate Levelprivate EntityInLevelCallbackprivate static final org.slf4j.Loggerstatic final intbooleanfloatprivate floatbooleanbooleanprivate booleanprivate booleanprivate final VecDeltaCodecprivate com.google.common.collect.ImmutableList<Entity> static final Stringprivate CompoundTagprivate final double[]private longprivate intprivate Vec3protected final RandomSourceprivate intprivate Entity.RemovalReasonprotected Stringprotected Vec3intstatic final intprivate final EntityType<?> Deprecated.protected UUIDstatic final Stringprivate Entitybooleanbooleanprivate static doublefloatfloatprotected booleanbooleanbooleanprotected booleanprivate static final doubledoubledoubleprivate floatfloatdoubledoubleprivate floatfloatdoubledoubleFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.commands.CommandSource
NULLFields inherited from interface net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabsMoveTo(double p_20249_, double p_20250_, double p_20251_) voidabsMoveTo(double p_19891_, double p_19892_, double p_19893_, float p_19894_, float p_19895_) voidabsRotateTo(float p_348662_, float p_348500_) booleanbooleanprotected abstract voidaddAdditionalSaveData(CompoundTag p_20139_) voidaddDeltaMovement(Vec3 p_250128_) protected voidaddPassenger(Entity p_20349_) booleanadjustSpawnLocation(ServerLevel p_352356_, BlockPos p_352343_) voidanimateHurt(float p_265161_) protected voidprivate doubleapplyPistonMovementRestriction(Direction.Axis p_20043_, double p_20044_) voidawardKillScore(Entity p_19953_, int p_19954_, DamageSource p_19955_) voidbaseTick()booleanbroadcastToPlayer(ServerPlayer p_19937_) protected final Vec3calculateUpVector(float p_20215_, float p_20216_) final Vec3calculateViewVector(float p_20172_, float p_20173_) protected booleancanAddPassenger(Entity p_20354_) booleanbooleanbooleancanChangeDimensions(Level p_352904_, Level p_352909_) booleancanCollideWith(Entity p_20303_) booleanbooleanprotected booleanbooleanbooleanbooleancanTrample(BlockState state, BlockPos pos, float fallDistance) booleancanUsePortal(boolean p_352898_) captureDrops(Collection<ItemEntity> value) booleancauseFallDamage(float p_146828_, float p_146829_, DamageSource p_146830_) changeDimension(DimensionTransition p_350951_) voidvoidprotected voidcheckFallDamage(double p_19911_, boolean p_19912_, BlockState p_19913_, BlockPos p_19914_) protected voidvoidprotected voidcheckSupportingBlock(boolean p_289694_, Vec3 p_289680_) voidbooleancloserThan(Entity p_19951_, double p_19952_) booleancloserThan(Entity p_216993_, double p_216994_, double p_216995_) private static float[]collectCandidateStepUpHeights(AABB p_345729_, List<VoxelShape> p_345260_, float p_346165_, float p_345968_) private static List<VoxelShape> collectColliders(Entity p_344804_, Level p_345583_, List<VoxelShape> p_345198_, AABB p_345837_) private Vec3static Vec3collideBoundingBox(Entity p_198895_, Vec3 p_198896_, AABB p_198897_, Level p_198898_, List<VoxelShape> p_198899_) private static Vec3collideWithShapes(Vec3 p_198901_, AABB p_198902_, List<VoxelShape> p_198903_) voidcopyPosition(Entity p_20360_) protected booleanDeprecated.intprotected HoverEventbooleanprotected abstract voiddefineSynchedData(SynchedEntityData.Builder p_326003_) deflection(Projectile p_319824_) final voiddiscard()booleanvoiddismountTo(double p_146825_, double p_146826_, double p_146827_) booleanfloatdistanceTo(Entity p_20271_) doubledistanceToSqr(double p_20276_, double p_20277_, double p_20278_) doubledistanceToSqr(Entity p_20281_) doubledistanceToSqr(Vec3 p_20239_) protected voidvoidbooleanvoidvoidfillCrashReportCategory(CrashReportCategory p_20051_) booleanprotected voidDeprecated.booleanfudgePositionAfterSizeChange(EntityDimensions p_347526_) voidvoidgetAddEntityPacket(ServerEntity p_352110_) intfinal EntityAttachmentsfinal floatfinal floatfloatgetBlockExplosionResistance(Explosion p_19992_, BlockGetter p_19993_, BlockPos p_19994_, BlockState p_19995_, FluidState p_19996_, float p_19997_) protected floatprotected floatprotected BlockStateDeprecated.final intfinal intfinal intfinal AABBfinal <T,C> T getCapability(EntityCapability<T, C> capability, @UnknownNullability C context) final <T> TgetCapability(EntityCapability<T, Void> capability) protected static Vec3getCollisionHorizontalEscapeVector(double p_19904_, double p_19905_, float p_19906_) protected doubleprotected static Vec3getDefaultPassengerAttachmentPoint(Entity p_316557_, Entity p_316799_, EntityAttachments p_316167_) intgetDimensions(Pose p_19975_) getDismountLocationForPassenger(LivingEntity p_20123_) final Stringfinal floatfinal floatgetEyeHeight(Pose p_20237_) floatgetEyeHeightAccess(Pose pose) Accessor method forgetEyeHeight(Pose)final FluidTypeReturns the fluid that is on the entity's eyes.final Vec3final Vec3getEyePosition(float p_20300_) doublegetEyeY()protected intdoublegetFluidHeight(TagKey<Fluid> p_204037_) Deprecated.doublefinal doublegetFluidTypeHeight(FluidType type) Returns the height of the fluid type in relation to the bounding box of the entity.final doublegetHandHoldingItemAngle(Item p_204035_) intgetId()private static Vec3getInputVector(Vec3 p_20016_, float p_20017_, float p_20018_) protected Vec3getLeashOffset(float p_249286_) floatDeprecated.getLightProbePosition(float p_20309_) intintReturns the fluid type which is the highest on the bounding box of the entity.protected Entity.MovementEmissiongetName()getOnPos()protected BlockPosgetOnPos(float p_216987_) Deprecated.protected Vec3getPassengerAttachmentPoint(Entity p_294756_, EntityDimensions p_295396_, float p_296362_) getPassengerRidingPosition(Entity p_294938_) floatprotected intReturns a NBTTagCompound that can be used to store custom data for this entity.floatintgetPose()final Vec3getPosition(float p_20319_) floatgetPreciseBodyRotation(float p_352259_) protected BlockPosgetPrimaryStepSoundBlockPos(BlockPos p_278049_) doublegetRandomX(double p_20209_) doubledoublegetRandomZ(double p_20263_) getRelativePortalPosition(Direction.Axis p_20045_, BlockUtil.FoundRectangle p_20046_) intgetRopeHoldPosition(float p_20347_) protected booleangetSharedFlag(int p_20292_) getSlot(int p_146919_) protected SoundEventprotected SoundEventprotected SoundEventgetTags()getTeam()intintintEntityType<?> getType()protected Componentfinal Vec3getUpVector(float p_20290_) getUUID()getVehicleAttachmentPoint(Entity p_316322_) static doublefinal Vec3getViewVector(float p_20253_) floatgetViewXRot(float p_20268_) floatgetViewYRot(float p_20279_) floatfinal doublegetX()doublegetX(double p_20166_) floatgetXRot()final doublegetY()doublegetY(double p_20228_) floatfloatgetYRot()final doublegetZ()doublegetZ(double p_20247_) voidhandleDamageEvent(DamageSource p_270704_) voidhandleEntityEvent(byte p_19882_) protected voidfinal booleanbooleanbooleanfinal booleaninthashCode()booleanhasIndirectPassenger(Entity p_20368_) booleanhasPassenger(Predicate<Entity> p_146863_) booleanhasPassenger(Entity p_20364_) booleanhasPermissions(int p_20311_) booleanbooleanhurt(DamageSource p_19946_, float p_19947_) final voidigniteForSeconds(float p_345382_) voidigniteForTicks(int p_320711_) booleanignoreExplosion(Explosion p_312868_) interact(Player p_19978_, InteractionHand p_19979_) interactAt(Player p_19980_, Vec3 p_19981_, InteractionHand p_19982_) booleanfinal booleanGets whether this entity has been added to a world (for tracking).booleanisAlive()booleanisAlliedTo(Entity p_20355_) booleanisAlliedTo(Team p_20032_) booleanbooleanbooleanisColliding(BlockPos p_20040_, BlockState p_20041_) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisEyeInFluid(TagKey<Fluid> p_204030_) Deprecated.protected booleanbooleanisFree(double p_20230_, double p_20231_, double p_20232_) private booleanbooleanbooleanprotected booleanisHorizontalCollisionMinor(Vec3 p_196625_) booleanprivate booleanfinal booleanReturns whether the entity is in a fluid.final booleanisInFluidType(BiPredicate<FluidType, Double> predicate, boolean forAllTypes) Returns whether the fluid type the entity is currently in matches the specified condition.booleanisInLava()booleanprivate booleanisInRain()booleanbooleanisInvisibleTo(Player p_20178_) booleanbooleanisInvulnerableTo(DamageSource p_20122_) booleanisInWall()booleanbooleanbooleanbooleanbooleanbooleanisOnFire()booleanbooleanbooleanbooleanisPassengerOfSameVehicle(Entity p_20366_) booleanbooleanbooleanDeprecated.final booleanbooleanbooleanisSilent()booleanbooleanprivate booleanisStateClimbable(BlockState p_286733_) booleanbooleanisSupportedBy(BlockPos p_287613_) booleanbooleanbooleanbooleanbooleanbooleanvoidkill()booleankilledEntity(ServerLevel p_216988_, LivingEntity p_216989_) voidlavaHurt()voidlerpHeadTo(float p_19918_, int p_19919_) voidlerpMotion(double p_20306_, double p_20307_, double p_20308_) protected voidlerpPositionAndRotationStep(int p_294824_, double p_296038_, double p_294518_, double p_294658_, double p_294681_, double p_295540_) doublefloatdoublefloatdoublevoidlerpTo(double p_19896_, double p_19897_, double p_19898_, float p_19899_, float p_19900_, int p_19901_) level()protected Vec3limitPistonMovement(Vec3 p_20134_) voidload(CompoundTag p_20259_) voidlookAt(EntityAnchorArgument.Anchor p_20033_, Vec3 p_20034_) protected AABBvoidmakeStuckInBlock(BlockState p_20006_, Vec3 p_20007_) protected voidmarkHurt()floatprotected Vec3maybeBackOffFromEdge(Vec3 p_20019_, MoverType p_20020_) booleanmayInteract(Level p_146843_, BlockPos p_146844_) floatvoidvoidmoveRelative(float p_19921_, Vec3 p_19922_) voidmoveTo(double p_20105_, double p_20106_, double p_20107_) voidmoveTo(double p_20108_, double p_20109_, double p_20110_, float p_20111_, float p_20112_) voidvoidvoidprotected voidmoveTowardsClosestSpace(double p_20315_, double p_20316_, double p_20317_) protected ListTagnewDoubleList(double... p_20064_) protected ListTagnewFloatList(float... p_20066_) protected floatnextStep()voidonAboveBubbleCol(boolean p_20313_) voidCalled after the entity has been added to the world's ticking list.protected voidvoidvoidonExplosionHit(Entity p_326352_) protected voidonFlap()booleanonGround()protected voidonInsideBlock(BlockState p_20005_) voidonInsideBubbleColumn(boolean p_20322_) booleanvoidonPassengerTurned(Entity p_20320_) voidCalled after the entity has been removed to the world's ticking list.voidonSyncedDataUpdated(List<SynchedEntityData.DataValue<?>> p_270372_) voidonSyncedDataUpdated(EntityDataAccessor<?> p_20059_) pick(double p_19908_, float p_19909_, boolean p_19910_) voidplacePortalTicket(BlockPos p_352083_) private voidprotected voidplayCombinationStepSounds(BlockState p_277472_, BlockState p_277630_, BlockPos primaryPos, BlockPos secondaryPos) protected voidvoidplayerTouch(Player p_20081_) protected voidplayMuffledStepSound(BlockState p_283110_, BlockPos pos) voidplaySound(SoundEvent p_216991_) voidplaySound(SoundEvent p_19938_, float p_19939_, float p_19940_) protected voidplayStepSound(BlockPos p_20135_, BlockState p_20136_) protected voidplaySwimSound(float p_20213_) position()final voidpositionRider(Entity p_20312_) protected voidpositionRider(Entity p_19957_, Entity.MoveFunction p_19958_) protected voidprotected voidvoidpush(double p_20286_, double p_20287_, double p_20288_) voidvoidprotected abstract voidreadAdditionalSaveData(CompoundTag p_20052_) protected voidvoidrecreateFromPacket(ClientboundAddEntityPacket p_146866_) voidvoidremove(Entity.RemovalReason p_146834_) private static ComponentremoveAction(Component p_20141_) protected voidprotected voidremovePassenger(Entity p_20352_) booleanvoidprotected booleanvoidvoidrestoreFrom(Entity p_20362_) voidrevive()Revives an entity that has been removed from a world.voidrideTick()floatbooleansave(CompoundTag p_20224_) booleansaveAsPassenger(CompoundTag p_20087_) saveWithoutId(CompoundTag p_20241_) voidsendSystemMessage(Component p_216998_) voidsetAirSupply(int p_20302_) voidsetAsInsidePortal(Portal p_351060_, BlockPos p_350462_) final voidsetBoundingBox(AABB p_20012_) voidsetCustomName(Component p_20053_) voidsetCustomNameVisible(boolean p_20341_) final <T> TsetData(AttachmentType<T> type, T data) Sets the data attachment of the given type.voidsetDeltaMovement(double p_20335_, double p_20336_, double p_20337_) voidsetDeltaMovement(Vec3 p_20257_) protected final voidsetFluidTypeHeight(FluidType type, double height) final voidsetGlowingTag(boolean p_146916_) voidsetId(int p_20235_) voidsetInvisible(boolean p_20304_) voidsetInvulnerable(boolean p_20332_) voidsetIsInPowderSnow(boolean p_146925_) protected voidvoidsetLevelCallback(EntityInLevelCallback p_146849_) voidsetNoGravity(boolean p_20243_) final voidvoidsetOnGround(boolean p_20181_) voidsetOnGroundWithMovement(boolean p_289661_, Vec3 p_289653_) voidvoidsetPortalCooldown(int p_287760_) voidsetPos(double p_20210_, double p_20211_, double p_20212_) final voidvoidfinal voidsetPosRaw(double p_20344_, double p_20345_, double p_20346_) voidsetRemainingFireTicks(int p_20269_) final voidsetRemoved(Entity.RemovalReason p_146876_) protected voidsetRot(float p_19916_, float p_19917_) protected voidsetSharedFlag(int p_20116_, boolean p_20117_) voidsetSharedFlagOnFire(boolean p_146869_) voidsetShiftKeyDown(boolean p_20261_) voidsetSilent(boolean p_20226_) voidsetSprinting(boolean p_20274_) voidsetSwimming(boolean p_20283_) voidsetTicksFrozen(int p_146918_) voidstatic voidsetViewScale(double p_20104_) voidsetXRot(float p_146927_) voidsetYBodyRot(float p_20338_) voidsetYHeadRot(float p_20328_) voidsetYRot(float p_146923_) booleanbooleanshouldBlockExplode(Explosion p_19987_, BlockGetter p_19988_, BlockPos p_19989_, BlockState p_19990_, float p_19991_) booleanprivate booleanshouldPlayAmethystStepSound(BlockState p_278069_) booleanshouldRender(double p_20296_, double p_20297_, double p_20298_) booleanshouldRenderAtSqrDistance(double p_19883_) booleanbooleanbooleanskipAttackInteraction(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 voidbooleanstartRiding(Entity p_20330_) booleanstartRiding(Entity p_19966_, boolean p_19967_) voidstartSeenByPlayer(ServerPlayer p_20119_) voidvoidstopSeenByPlayer(ServerPlayer p_20174_) voidsyncPacketPositionCodec(double p_217007_, double p_217008_, double p_217009_) private voidvoidteleportRelative(double p_249341_, double p_252229_, double p_252038_) voidteleportTo(double p_19887_, double p_19888_, double p_19889_) booleanteleportTo(ServerLevel p_265257_, double p_265407_, double p_265727_, double p_265410_, Set<RelativeMovement> p_265083_, float p_265573_, float p_265094_) voidthunderHit(ServerLevel p_19927_, LightningBolt p_19928_) voidtick()toString()booleanprotected voidvoidturn(double p_19885_, double p_19886_) final voidunRide()protected voidvoidvoidbooleanupdateFluidHeightAndDoFluidPushing(TagKey<Fluid> p_204032_, double p_204033_) Deprecated.private voidprotected boolean(package private) voidvoidprivate booleanvibrationAndSoundEffectsFromBlock(BlockPos p_286221_, BlockState p_286549_, boolean p_286708_, boolean p_286543_, Vec3 p_286448_) private voidwalkingStepSound(BlockPos p_281828_, BlockState p_282118_) protected voidMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, removeData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.commands.CommandSource
alwaysAcceptsMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtension
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canSwimInFluidType, copyAttachmentsFrom, deserializeNBT, getClassification, getFluidFallDistanceModifier, getFluidMotionScale, getParts, getPickedResult, getSoundFromFluidType, hasCustomOutlineRendering, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, sendPairingData, serializeNBT, shouldRiderSitMethods inherited from interface net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ID_TAG
- See Also:
-
PASSENGERS_TAG
- See Also:
-
ENTITY_COUNTER
-
CONTENTS_SLOT_INDEX
public static final int CONTENTS_SLOT_INDEX- See Also:
-
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:
-
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:
-
BASE_SAFE_FALL_DISTANCE
public static final int BASE_SAFE_FALL_DISTANCE- 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 -
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 -
portalProcess
-
portalCooldown
private int portalCooldown -
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 -
inBlockState
-
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:
getIdin interfaceEntityAccess
-
setId
public void setId(int p_20235_) -
getTags
-
addTag
-
removeTag
-
kill
public void kill() -
discard
public final void discard() -
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() -
lavaHurt
public void lavaHurt() -
igniteForSeconds
public final void igniteForSeconds(float p_345382_) -
igniteForTicks
public void igniteForTicks(int p_320711_) -
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_) -
setOnGroundWithMovement
-
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
-
collectCandidateStepUpHeights
private static float[] collectCandidateStepUpHeights(AABB p_345729_, List<VoxelShape> p_345260_, float p_346165_, float p_345968_) -
collideBoundingBox
-
collectColliders
private static List<VoxelShape> collectColliders(@Nullable Entity p_344804_, Level p_345583_, List<VoxelShape> p_345198_, AABB p_345837_) -
collideWithShapes
-
nextStep
protected float nextStep() -
getSwimSound
-
getSwimSplashSound
-
getSwimHighSpeedSplashSound
-
checkInsideBlocks
protected void checkInsideBlocks() -
onInsideBlock
-
adjustSpawnLocation
-
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_) -
getDefaultGravity
protected double getDefaultGravity() -
getGravity
public final double getGravity() -
applyGravity
protected void applyGravity() -
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_) -
absRotateTo
public void absRotateTo(float p_348662_, float p_348500_) -
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
-
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
-
push
public void push(double p_20286_, double p_20287_, double p_20288_) -
markHurt
protected void markHurt() -
hurt
-
getViewVector
-
getNearestViewDirection
-
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
-
getVehicleAttachmentPoint
-
getPassengerRidingPosition
-
getPassengerAttachmentPoint
protected Vec3 getPassengerAttachmentPoint(Entity p_294756_, EntityDimensions p_295396_, float p_296362_) -
getDefaultPassengerAttachmentPoint
protected static Vec3 getDefaultPassengerAttachmentPoint(Entity p_316557_, Entity p_316799_, EntityAttachments p_316167_) -
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
-
setAsInsidePortal
-
handlePortal
protected void handlePortal() -
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_) -
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
-
placePortalTicket
-
removeAfterChangingDimensions
protected void removeAfterChangingDimensions() -
getRelativePortalPosition
-
canUsePortal
public boolean canUsePortal(boolean p_352898_) -
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:
getUUIDin interfaceEntityAccess
-
getStringUUID
-
getScoreboardName
- Specified by:
getScoreboardNamein interfaceScoreHolder
-
isPushedByFluid
Deprecated. -
getViewScale
public static double getViewScale() -
setViewScale
public static void setViewScale(double p_20104_) -
getDisplayName
- Specified by:
getDisplayNamein interfaceNameable- Specified by:
getDisplayNamein interfaceScoreHolder
-
setCustomName
-
getCustomName
- Specified by:
getCustomNamein interfaceNameable
-
hasCustomName
public boolean hasCustomName()- Specified by:
hasCustomNamein interfaceNameable
-
setCustomNameVisible
public void setCustomNameVisible(boolean p_20341_) -
isCustomNameVisible
public boolean isCustomNameVisible() -
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
- Specified by:
onSyncedDataUpdatedin interfaceSyncedDataHolder
-
onSyncedDataUpdated
- Specified by:
onSyncedDataUpdatedin interfaceSyncedDataHolder
-
fixupDimensions
Deprecated. -
refreshDimensions
public void refreshDimensions() -
fudgePositionAfterSizeChange
-
getDirection
-
getMotionDirection
-
createHoverEvent
-
broadcastToPlayer
-
getBoundingBox
- Specified by:
getBoundingBoxin interfaceEntityAccess
-
getBoundingBoxForCulling
-
setBoundingBox
-
getEyeHeight
-
getEyeHeight
public final float getEyeHeight() -
getLeashOffset
-
getLeashOffset
-
getSlot
-
sendSystemMessage
- Specified by:
sendSystemMessagein interfaceCommandSource
-
getCommandSenderWorld
-
getServer
-
interactAt
-
ignoreExplosion
-
startSeenByPlayer
-
stopSeenByPlayer
-
rotate
-
mirror
-
onlyOpCanSetNbt
public boolean onlyOpCanSetNbt() -
deflection
-
getControllingPassenger
-
hasControllingPassenger
public final boolean hasControllingPassenger() -
getPassengers
-
getFirstPassenger
-
hasPassenger
-
hasPassenger
-
getIndirectPassengersStream
-
getSelfAndPassengers
- Specified by:
getSelfAndPassengersin interfaceEntityAccess
-
getPassengersAndSelf
- Specified by:
getPassengersAndSelfin interfaceEntityAccess
-
getIndirectPassengers
-
countPlayerPassengers
public int countPlayerPassengers() -
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:
acceptsSuccessin interfaceCommandSource
-
acceptsFailure
public boolean acceptsFailure()- Specified by:
acceptsFailurein interfaceCommandSource
-
shouldInformAdmins
public boolean shouldInformAdmins()- Specified by:
shouldInformAdminsin interfaceCommandSource
-
lookAt
-
getPreciseBodyRotation
public float getPreciseBodyRotation(float p_352259_) -
updateFluidHeightAndDoFluidPushing
@Deprecated public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> p_204032_, double p_204033_) Deprecated. -
updateFluidHeightAndDoFluidPushing
public void updateFluidHeightAndDoFluidPushing() -
touchingUnloadedChunk
public boolean touchingUnloadedChunk() -
getFluidHeight
Deprecated. -
getFluidJumpThreshold
public double getFluidJumpThreshold() -
getBbWidth
public final float getBbWidth() -
getBbHeight
public final float getBbHeight() -
getAddEntityPacket
-
getDimensions
-
getAttachments
-
position
-
trackingPosition
-
blockPosition
- Specified by:
blockPositionin interfaceEntityAccess
-
getInBlockState
-
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
public float maxUpStep() -
onExplosionHit
-
isRemoved
public final boolean isRemoved() -
getRemovalReason
-
setRemoved
- Specified by:
setRemovedin interfaceEntityAccess
-
unsetRemoved
protected void unsetRemoved() -
setLevelCallback
- Specified by:
setLevelCallbackin interfaceEntityAccess
-
shouldBeSaved
public boolean shouldBeSaved()- Specified by:
shouldBeSavedin interfaceEntityAccess
-
isAlwaysTicking
public boolean isAlwaysTicking()- Specified by:
isAlwaysTickingin interfaceEntityAccess
-
mayInteract
-
captureDrops
- Specified by:
captureDropsin interfaceIEntityExtension
-
captureDrops
- Specified by:
captureDropsin interfaceIEntityExtension
-
getPersistentData
Description copied from interface:IEntityExtensionReturns 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 interfaceIEntityExtension- Returns:
- A NBTTagCompound
-
canTrample
Description copied from interface:IEntityExtension- Specified by:
canTramplein interfaceIEntityExtension- Parameters:
pos- The block posfallDistance- The fall distance- Returns:
trueif this entity can trample,falseotherwise
-
isAddedToWorld
public final boolean isAddedToWorld()Description copied from interface:IEntityExtensionGets 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:
isAddedToWorldin interfaceIEntityExtension- Returns:
- True if this entity is being tracked by a world
-
onAddedToWorld
public void onAddedToWorld()Description copied from interface:IEntityExtensionCalled 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 interfaceIEntityExtension
-
onRemovedFromWorld
public void onRemovedFromWorld()Description copied from interface:IEntityExtensionCalled 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 interfaceIEntityExtension
-
revive
public void revive()Description copied from interface:IEntityExtensionRevives 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 interfaceIEntityExtension
-
getEyeHeightAccess
Accessor method forgetEyeHeight(Pose) -
setFluidTypeHeight
-
getFluidTypeHeight
Description copied from interface:IEntityExtensionReturns the height of the fluid type in relation to the bounding box of the entity. If the entity is not in the fluid type, then0is returned.- Specified by:
getFluidTypeHeightin interfaceIEntityExtension- Parameters:
type- the type of the fluid- Returns:
- the height of the fluid compared to the entity
-
isInFluidType
Description copied from interface:IEntityExtensionReturns whether the fluid type the entity is currently in matches the specified condition.- Specified by:
isInFluidTypein interfaceIEntityExtension- Parameters:
predicate- a test taking in the fluid type and its heightforAllTypes-trueif all fluid types should match the condition instead of at least one- Returns:
trueif a fluid type meets the condition,falseotherwise
-
isInFluidType
public final boolean isInFluidType()Description copied from interface:IEntityExtensionReturns whether the entity is in a fluid.- Specified by:
isInFluidTypein interfaceIEntityExtension- Returns:
trueif the entity is in a fluid,falseotherwise
-
getEyeInFluidType
Description copied from interface:IEntityExtensionReturns the fluid that is on the entity's eyes.- Specified by:
getEyeInFluidTypein interfaceIEntityExtension- Returns:
- the fluid that is on the entity's eyes
-
getMaxHeightFluidType
Description copied from interface:IEntityExtensionReturns the fluid type which is the highest on the bounding box of the entity.- Specified by:
getMaxHeightFluidTypein interfaceIEntityExtension- Returns:
- the fluid type which is the highest on the bounding box of the entity
-
setData
Description copied from interface:IAttachmentHolderSets the data attachment of the given type.- Specified by:
setDatain interfaceIAttachmentHolder- Overrides:
setDatain classAttachmentHolder- Returns:
- the previous value for that attachment type, if any, or
nullif there was none
-
getCapability
@Nullable public final <T,C> T getCapability(EntityCapability<T, C> capability, @UnknownNullability C context) -
getCapability
-
level
-
setLevel
-
damageSources
-
registryAccess
-
lerpPositionAndRotationStep
protected void lerpPositionAndRotationStep(int p_294824_, double p_296038_, double p_294518_, double p_294658_, double p_294681_, double p_295540_) -
getRandom
-
getKnownMovement
-
getWeaponItem
-
rider sensitive version