类 Entity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
- 所有已实现的接口:
DataComponentGetter
,SyncedDataHolder
,EntityAccess
,UniquelyIdentifyable
,Nameable
,ScoreHolder
,IAttachmentHolder
,IEntityExtension
- 直接已知子类:
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, ScoreHolder, DataComponentGetter, IEntityExtension
-
嵌套类概要
嵌套类修饰符和类型类说明(专用程序包) static final record
static interface
(专用程序包) static final record
static enum
static enum
从类继承的嵌套类/接口 net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
字段概要
字段修饰符和类型字段说明static final int
static final int
private AABB
private BlockPos
boolean
static final int
protected int
private Collection
<ItemEntity> Neo: Short-lived holder of dropped item entities.private ChunkPos
static final int
private float
private CustomData
private static final EntityDataAccessor
<Integer> private static final EntityDataAccessor
<Optional<Component>> private static final EntityDataAccessor
<Boolean> private static final EntityDataAccessor
<Boolean> protected static final EntityDataAccessor
<Pose> protected static final EntityDataAccessor
<Byte> private static final EntityDataAccessor
<Boolean> private static final EntityDataAccessor
<Integer> static final float
static final float
static final float
static final double
static final double
private Vec3
private EntityDimensions
protected static final AtomicInteger
protected final SynchedEntityData
private float
double
private final List
<Entity.Movement> protected boolean
protected static final int
protected static final int
private static final int
protected static final int
private static final int
private static final int
private static final int
已过时。已过时。float
protected it.unimi.dsi.fastutil.objects.Object2DoubleMap
<FluidType> private FluidType
static final int
private boolean
boolean
private boolean
boolean
boolean
private int
private BlockState
private static final AABB
private final InsideBlockEffectApplier.StepBasedCollector
private boolean
int
private boolean
Neo: Internal use for keeping track of entities that are tracked by a world, to allow guarantees that entity position changes will force a chunk load, avoiding potential issues with entity desyncing and bad chunk data.boolean
private int
private static final double
private static final double
private Level
private EntityInLevelCallback
private static final org.slf4j.Logger
static final int
static final int
boolean
float
private final ArrayDeque
<Entity.Movement> private float
boolean
private boolean
private boolean
private final VecDeltaCodec
private com.google.common.collect.ImmutableList
<Entity> private CompoundTag
private final double[]
private long
private int
private Vec3
protected final RandomSource
private int
private Entity.RemovalReason
private boolean
protected String
protected Vec3
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
int
static final int
private final EntityType
<?> 已过时。protected UUID
private Entity
boolean
boolean
private static double
private final it.unimi.dsi.fastutil.longs.LongSet
protected boolean
boolean
protected boolean
private static final double
double
double
private float
float
double
double
private float
float
private static final com.google.common.collect.ImmutableList
<Direction.Axis> private static final com.google.common.collect.ImmutableList
<Direction.Axis> double
double
从类继承的字段 net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
从接口继承的字段 net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAME
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
absSnapRotationTo
(float p_348662_, float p_348500_) void
absSnapTo
(double p_20249_, double p_20250_, double p_20251_) void
absSnapTo
(double p_397411_, double p_397695_, double p_397235_, float p_397420_, float p_397906_) protected abstract void
addAdditionalSaveData
(ValueOutput p_421996_) void
addDeltaMovement
(Vec3 p_250128_) private void
addMovementThisTick
(Entity.Movement p_428474_) protected void
addPassenger
(Entity p_20349_) boolean
adjustSpawnLocation
(ServerLevel p_352356_, BlockPos p_352343_) void
animateHurt
(float p_265161_) final void
applyComponentsFromItemStack
(ItemStack p_397915_) protected void
private void
applyEffectsFromBlocks
(List<Entity.Movement> p_410126_) void
applyEffectsFromBlocks
(Vec3 p_372978_, Vec3 p_372858_) protected void
protected <T> boolean
applyImplicitComponent
(DataComponentType<T> p_397325_, T p_397189_) protected <T> boolean
applyImplicitComponentIfPresent
(DataComponentGetter p_397023_, DataComponentType<T> p_397949_) protected void
applyImplicitComponents
(DataComponentGetter p_397589_) private void
applyMovementEmissionAndPlaySound
(Entity.MovementEmission p_365086_, Vec3 p_365141_, BlockPos p_365493_, BlockState p_365295_) private double
applyPistonMovementRestriction
(Direction.Axis p_20043_, double p_20044_) private boolean
attemptToShearEquipment
(Player p_426225_, InteractionHand p_425581_, ItemStack p_426326_, Mob p_426179_) void
awardKillScore
(Entity p_19953_, DamageSource p_19955_) private static Iterable
<Direction.Axis> axisStepOrder
(Vec3 p_410296_) void
baseTick()
boolean
broadcastToPlayer
(ServerPlayer p_19937_) private TeleportTransition
calculatePassengerTransition
(TeleportTransition p_380120_, Entity p_379847_) protected final Vec3
calculateUpVector
(float p_20215_, float p_20216_) final Vec3
calculateViewVector
(float p_20172_, float p_20173_) protected boolean
canAddPassenger
(Entity p_20354_) boolean
canBeCollidedWith
(Entity p_423659_) boolean
boolean
canCollideWith
(Entity p_20303_) boolean
boolean
protected boolean
boolean
boolean
boolean
boolean
canTeleport
(Level p_352904_, Level p_352909_) boolean
canTrample
(ServerLevel level, BlockState state, BlockPos pos, double fallDistance) boolean
canUsePortal
(boolean p_352898_) captureDrops
(Collection<ItemEntity> value) protected static <T> T
castComponentValue
(DataComponentType<T> p_397295_, Object p_397934_) boolean
causeFallDamage
(double p_397956_, float p_146828_, DamageSource p_146830_) void
void
protected void
checkFallDamage
(double p_19911_, boolean p_19912_, BlockState p_19913_, BlockPos p_19914_) void
private void
checkInsideBlocks
(List<Entity.Movement> p_381632_, InsideBlockEffectApplier.StepBasedCollector p_405233_) private void
checkInsideBlocks
(Vec3 p_428555_, Vec3 p_428532_, InsideBlockEffectApplier.StepBasedCollector p_428368_, it.unimi.dsi.fastutil.longs.LongSet p_428369_) protected void
checkSupportingBlock
(boolean p_289694_, Vec3 p_289680_) void
void
protected void
boolean
closerThan
(Entity p_19951_, double p_19952_) boolean
closerThan
(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 Vec3
static Vec3
collideBoundingBox
(Entity p_198895_, Vec3 p_198896_, AABB p_198897_, Level p_198898_, List<VoxelShape> p_198899_) boolean
collidedWithFluid
(FluidState p_398005_, BlockPos p_397890_, Vec3 p_397088_, Vec3 p_397336_) boolean
collidedWithShapeMovingFrom
(Vec3 p_371201_, Vec3 p_372821_, List<AABB> p_397872_) private static Vec3
collideWithShapes
(Vec3 p_198901_, AABB p_198902_, List<VoxelShape> p_198903_) protected boolean
considersEntityAsAlly
(Entity p_364894_) void
copyPosition
(Entity p_20360_) protected boolean
已过时。int
protected HoverEvent
boolean
private void
debugBlockIntersection
(BlockPos p_428346_, boolean p_428514_, boolean p_428272_) protected abstract void
defineSynchedData
(SynchedEntityData.Builder p_326003_) deflection
(Projectile p_319824_) final void
discard()
boolean
void
dismountTo
(double p_146825_, double p_146826_, double p_146827_) boolean
float
distanceTo
(Entity p_20271_) double
distanceToSqr
(double p_20276_, double p_20277_, double p_20278_) double
distanceToSqr
(Entity p_20281_) double
distanceToSqr
(Vec3 p_20239_) final void
doCheckFallDamage
(double p_390594_, double p_390598_, double p_390591_, boolean p_390600_) protected void
boolean
dropAllLeashConnections
(Player p_418288_) void
boolean
void
void
fillCrashReportCategory
(CrashReportCategory p_20051_) boolean
protected void
已过时。void
forceSetRotation
(float p_379323_, float p_380342_) boolean
fudgePositionAfterSizeChange
(EntityDimensions p_347526_) void
void
<T> T
get
(DataComponentType<? extends T> p_397010_) getAddEntityPacket
(ServerEntity p_352110_) int
final EntityAttachments
final float
final float
float
getBlockExplosionResistance
(Explosion p_19992_, BlockGetter p_19993_, BlockPos p_19994_, BlockState p_19995_, FluidState p_19996_, float p_19997_) protected float
protected float
protected BlockState
已过时。final int
final int
final int
final AABB
final <T,
C extends @Nullable Object>
TgetCapability
(EntityCapability<T, C> capability, C context) final <T> T
getCapability
(EntityCapability<T, @Nullable Void> capability) protected static Vec3
getCollisionHorizontalEscapeVector
(double p_19904_, double p_19905_, float p_19906_) protected double
protected static Vec3
getDefaultPassengerAttachmentPoint
(Entity p_316557_, Entity p_316799_, EntityAttachments p_316167_) int
getDimensions
(Pose p_19975_) getDismountLocationForPassenger
(LivingEntity p_20123_) final String
final float
final float
getEyeHeight
(Pose p_20237_) final FluidType
Returns the fluid that is on the entity's eyes.final Vec3
final Vec3
getEyePosition
(float p_20300_) double
getEyeY()
protected int
double
getFluidHeight
(TagKey<Fluid> p_204037_) 已过时。double
final double
getFluidTypeHeight
(FluidType type) Returns the height of the fluid type in relation to the bounding box of the entity.final double
getHandHoldingItemAngle
(Item p_204035_) int
getId()
protected static Vec3
getInputVector
(Vec3 p_20016_, float p_20017_, float p_20018_) float
已过时。getLightProbePosition
(float p_20309_) int
int
Returns the fluid type which is the highest on the bounding box of the entity.protected Entity.MovementEmission
getName()
getOnPos()
protected BlockPos
getOnPos
(float p_216987_) 已过时。protected Vec3
getPassengerAttachmentPoint
(Entity p_294756_, EntityDimensions p_295396_, float p_296362_) getPassengerRidingPosition
(Entity p_294938_) float
Returns a NBTTagCompound that can be used to store custom data for this entity.float
int
getPose()
final Vec3
getPosition
(float p_20319_) float
getPreciseBodyRotation
(float p_352259_) protected BlockPos
getPrimaryStepSoundBlockPos
(BlockPos p_278049_) Vec3[]
double
getRandomX
(double p_20209_) double
double
getRandomZ
(double p_20263_) getRelativePortalPosition
(Direction.Axis p_20045_, BlockUtil.FoundRectangle p_20046_) int
boolean
getRopeHoldPosition
(float p_20347_) protected boolean
getSharedFlag
(int p_20292_) getSlot
(int p_146919_) protected SoundEvent
protected SoundEvent
protected SoundEvent
getTags()
getTeam()
int
int
int
EntityType
<?> getType()
protected Component
final Vec3
getUpVector
(float p_20290_) getUUID()
getVehicleAttachmentPoint
(Entity p_316322_) static double
final Vec3
getViewVector
(float p_20253_) float
getViewXRot
(float p_20268_) float
getViewYRot
(float p_20279_) float
final double
getX()
double
getX
(double p_20166_) float
getXRot()
float
getXRot
(float p_363660_) final double
getY()
double
getY
(double p_20228_) float
float
getYRot()
float
getYRot
(float p_363186_) final double
getZ()
double
getZ
(double p_20247_) void
handleDamageEvent
(DamageSource p_270704_) void
handleEntityEvent
(byte p_19882_) protected static void
handleOnAboveBubbleColumn
(Entity p_400150_, boolean p_400155_, BlockPos p_399923_) protected static void
handleOnInsideBubbleColumn
(Entity p_399975_, boolean p_399770_) protected void
final boolean
boolean
boolean
final boolean
int
hashCode()
boolean
hasIndirectPassenger
(Entity p_20368_) boolean
hasPassenger
(Predicate<Entity> p_146863_) boolean
hasPassenger
(Entity p_20364_) boolean
final void
hurt
(DamageSource p_19946_, float p_19947_) 已过时。boolean
hurtClient
(DamageSource p_376938_) final boolean
hurtOrSimulate
(DamageSource p_376534_, float p_376514_) 已过时。abstract boolean
hurtServer
(ServerLevel p_376804_, DamageSource p_376155_, float p_376892_) final void
igniteForSeconds
(float p_345382_) void
igniteForTicks
(int p_320711_) boolean
ignoreExplosion
(Explosion p_312868_) interact
(Player p_19978_, InteractionHand p_19979_) interactAt
(Player p_19980_, Vec3 p_19981_, InteractionHand p_19982_) boolean
final boolean
Gets whether this entity has been added to a world (for tracking).protected boolean
boolean
isAlive()
final boolean
isAlliedTo
(Entity p_20355_) boolean
isAlliedTo
(Team p_20032_) boolean
boolean
boolean
boolean
isColliding
(BlockPos p_20040_, BlockState p_20041_) boolean
boolean
boolean
boolean
boolean
boolean
boolean
isEyeInFluid
(TagKey<Fluid> p_204030_) 已过时。protected boolean
boolean
boolean
isFree
(double p_20230_, double p_20231_, double p_20232_) private boolean
boolean
boolean
protected boolean
isHorizontalCollisionMinor
(Vec3 p_196625_) boolean
boolean
final boolean
Returns whether the entity is in a fluid.final boolean
isInFluidType
(BiPredicate<FluidType, Double> predicate, boolean forAllTypes) Returns whether the fluid type the entity is currently in matches the specified condition.boolean
isInLava()
boolean
(专用程序包) boolean
isInRain()
final boolean
boolean
boolean
isInvisibleTo
(Player p_20178_) boolean
protected final boolean
isInvulnerableToBase
(DamageSource p_20122_) boolean
isInWall()
boolean
boolean
protected boolean
final boolean
boolean
boolean
isOnFire()
boolean
boolean
boolean
boolean
isPassengerOfSameVehicle
(Entity p_20366_) boolean
boolean
boolean
已过时。final boolean
boolean
boolean
isSilent()
boolean
boolean
private boolean
isStateClimbable
(BlockState p_286733_) boolean
boolean
isSupportedBy
(BlockPos p_287613_) boolean
boolean
boolean
boolean
boolean
boolean
void
kill
(ServerLevel p_376411_) boolean
killedEntity
(ServerLevel p_216988_, LivingEntity p_216989_) void
lavaHurt()
void
void
lerpHeadTo
(float p_19918_, int p_19919_) void
lerpMotion
(double p_20306_, double p_20307_, double p_20308_) protected void
lerpPositionAndRotationStep
(int p_294824_, double p_296038_, double p_294518_, double p_294658_, double p_294681_, double p_295540_) level()
protected Vec3
limitPistonMovement
(Vec3 p_20134_) void
load
(ValueInput p_422206_) void
lookAt
(EntityAnchorArgument.Anchor p_20033_, Vec3 p_20034_) protected final AABB
protected AABB
makeBoundingBox
(Vec3 p_388602_) void
makeStuckInBlock
(BlockState p_20006_, Vec3 p_20007_) protected void
markHurt()
float
protected Vec3
maybeBackOffFromEdge
(Vec3 p_20019_, MoverType p_20020_) boolean
mayInteract
(ServerLevel p_376870_, BlockPos p_146844_) float
void
final void
moveOrInterpolateTo
(Vec3 p_394393_, float p_394448_, float p_393511_) void
moveRelative
(float p_19921_, Vec3 p_19922_) protected void
moveTowardsClosestSpace
(double p_20315_, double p_20316_, double p_20317_) protected float
nextStep()
void
notifyLeasheeRemoved
(Leashable p_418306_) void
notifyLeashHolder
(Leashable p_418071_) final Vec3
void
onAboveBubbleColumn
(boolean p_399860_, BlockPos p_399894_) void
Called after the entity has been added to the world's ticking list.protected void
void
void
onExplosionHit
(Entity p_326352_) protected void
onFlap()
boolean
onGround()
protected void
onInsideBlock
(BlockState p_20005_) void
onInsideBubbleColumn
(boolean p_20322_) void
onPassengerTurned
(Entity p_20320_) void
onRemoval
(Entity.RemovalReason p_379764_) void
Called after the entity has been removed to the world's ticking list.void
onSyncedDataUpdated
(List<SynchedEntityData.DataValue<?>> p_270372_) void
onSyncedDataUpdated
(EntityDataAccessor<?> p_20059_) pick
(double p_19908_, float p_19909_, boolean p_19910_) void
placePortalTicket
(BlockPos p_352083_) private void
protected void
playCombinationStepSounds
(BlockState p_277472_, BlockState p_277630_, BlockPos primaryPos, BlockPos secondaryPos) protected void
void
playerTouch
(Player p_20081_) protected void
playMuffledStepSound
(BlockState p_283110_, BlockPos pos) void
playSound
(SoundEvent p_216991_) void
playSound
(SoundEvent p_19938_, float p_19939_, float p_19940_) protected void
playStepSound
(BlockPos p_20135_, BlockState p_20136_) protected void
playSwimSound
(float p_20213_) position()
final void
positionRider
(Entity p_20312_) protected void
positionRider
(Entity p_19957_, Entity.MoveFunction p_19958_) protected void
protected void
protected void
propagateFallToPassengers
(double p_401264_, float p_401278_, DamageSource p_401066_) void
push
(double p_20286_, double p_20287_, double p_20288_) void
void
protected abstract void
readAdditionalSaveData
(ValueInput p_422333_) protected void
void
recreateFromPacket
(ClientboundAddEntityPacket p_146866_) void
void
remove
(Entity.RemovalReason p_146834_) private static Component
removeAction
(Component p_20141_) protected void
void
protected void
removePassenger
(Entity p_20352_) boolean
void
protected boolean
void
void
restoreFrom
(Entity p_20362_) void
revive()
Revives an entity that has been removed from a world.void
rideTick()
float
boolean
save
(ValueOutput p_422525_) boolean
saveAsPassenger
(ValueOutput p_421773_) void
saveWithoutId
(ValueOutput p_422475_) protected static void
sendBubbleColumnParticles
(Level p_399612_, BlockPos p_393959_) private void
void
setAirSupply
(int p_20302_) void
setAsInsidePortal
(Portal p_351060_, BlockPos p_350462_) final void
setBoundingBox
(AABB p_20012_) <T> void
setComponent
(DataComponentType<T> p_397096_, T p_397233_) void
setCustomName
(Component p_20053_) void
setCustomNameVisible
(boolean p_20341_) final <T> T
setData
(AttachmentType<T> type, T data) Sets the data attachment of the given type.void
setDeltaMovement
(double p_20335_, double p_20336_, double p_20337_) void
setDeltaMovement
(Vec3 p_20257_) protected final void
setFluidTypeHeight
(FluidType type, double height) final void
setGlowingTag
(boolean p_146916_) void
setId
(int p_20235_) void
setInvisible
(boolean p_20304_) void
setInvulnerable
(boolean p_20332_) void
setIsInPowderSnow
(boolean p_146925_) protected void
void
setLevelCallback
(EntityInLevelCallback p_146849_) void
setNoGravity
(boolean p_20243_) protected void
private void
final void
final void
setOldPosAndRot
(Vec3 p_371927_, float p_371686_, float p_371638_) void
private void
setOldRot
(float p_371749_, float p_371505_) void
setOnGround
(boolean p_20181_) void
setOnGroundWithMovement
(boolean p_289661_, boolean p_364321_, Vec3 p_289653_) void
setOnGroundWithMovement
(boolean p_386472_, Vec3 p_388270_) void
void
setPortalCooldown
(int p_287760_) void
setPos
(double p_20210_, double p_20211_, double p_20212_) final void
void
final void
setPosRaw
(double p_20344_, double p_20345_, double p_20346_) void
setRemainingFireTicks
(int p_20269_) final void
setRemoved
(Entity.RemovalReason p_146876_) void
setRequiresPrecisePosition
(boolean p_416605_) protected void
setRot
(float p_19916_, float p_19917_) protected void
setSharedFlag
(int p_20116_, boolean p_20117_) void
setSharedFlagOnFire
(boolean p_146869_) void
setShiftKeyDown
(boolean p_20261_) void
setSilent
(boolean p_20226_) void
setSprinting
(boolean p_20274_) void
setSwimming
(boolean p_20283_) void
setTicksFrozen
(int p_146918_) void
static void
setViewScale
(double p_20104_) void
setXRot
(float p_146927_) void
setYBodyRot
(float p_20338_) void
setYHeadRot
(float p_20328_) void
setYRot
(float p_146923_) boolean
shearOffAllLeashConnections
(Player p_418337_) boolean
boolean
shouldBlockExplode
(Explosion p_19987_, BlockGetter p_19988_, BlockPos p_19989_, BlockState p_19990_, float p_19991_) private boolean
shouldPlayAmethystStepSound
(BlockState p_278069_) protected boolean
boolean
shouldRender
(double p_20296_, double p_20297_, double p_20298_) boolean
shouldRenderAtSqrDistance
(double p_19883_) boolean
boolean
boolean
skipAttackInteraction
(Entity p_20357_) void
snapTo
(double p_397080_, double p_398021_, double p_397836_) void
snapTo
(double p_20108_, double p_20109_, double p_20110_, float p_20111_, float p_20112_) void
void
void
spawnAtLocation
(ServerLevel p_376705_, ItemStack p_376226_) spawnAtLocation
(ServerLevel p_376141_, ItemStack p_376472_, float p_376881_) spawnAtLocation
(ServerLevel p_426271_, ItemStack p_426002_, Vec3 p_426167_) spawnAtLocation
(ServerLevel p_376558_, ItemLike p_376369_) spawnAtLocation
(ServerLevel p_376116_, ItemLike p_376163_, int p_376104_) protected void
boolean
startRiding
(Entity p_20330_) boolean
startRiding
(Entity p_19966_, boolean p_19967_) void
startSeenByPlayer
(ServerPlayer p_20119_) void
void
stopSeenByPlayer
(ServerPlayer p_20174_) boolean
void
syncPacketPositionCodec
(double p_217007_, double p_217008_, double p_217009_) teleport
(TeleportTransition p_379899_) private Entity
teleportCrossDimension
(ServerLevel p_380146_, ServerLevel p_416740_, TeleportTransition p_379377_) private void
void
teleportRelative
(double p_249341_, double p_252229_, double p_252038_) private Entity
teleportSameDimension
(ServerLevel p_379931_, TeleportTransition p_380103_) void
teleportSetPosition
(PositionMoveRotation p_376669_, Set<Relative> p_376772_) protected void
teleportSpectators
(TeleportTransition p_415929_, ServerLevel p_416559_) void
teleportTo
(double p_19887_, double p_19888_, double p_19889_) boolean
teleportTo
(ServerLevel p_265257_, double p_265407_, double p_265727_, double p_265410_, Set<Relative> p_265083_, float p_265573_, float p_265094_, boolean p_365015_) void
thunderHit
(ServerLevel p_19927_, LightningBolt p_19928_) void
tick()
toString()
boolean
void
turn
(double p_19885_, double p_19886_) final void
unRide()
protected void
void
void
boolean
updateFluidHeightAndDoFluidPushing
(TagKey<Fluid> p_204032_, double p_204033_) 已过时。private void
protected boolean
(专用程序包) void
void
private boolean
vibrationAndSoundEffectsFromBlock
(BlockPos p_286221_, BlockState p_286549_, boolean p_286708_, boolean p_286543_, Vec3 p_286448_) private void
walkingStepSound
(BlockPos p_281828_, BlockState p_282118_) protected void
从类继承的方法 net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, removeData, serializeAttachments
从接口继承的方法 net.minecraft.core.component.DataComponentGetter
get, getOrDefault, getOrDefault, getTyped, has, has
从接口继承的方法 net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData
从接口继承的方法 net.neoforged.neoforge.common.extensions.IEntityExtension
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canSwimInFluidType, copyAttachmentsFrom, getClassification, getFluidFallDistanceModifier, getFluidMotionScale, getParts, getSoundFromFluidType, hasCustomOutlineRendering, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, sendPairingData, shouldRiderSit
从接口继承的方法 net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
字段详细资料
-
LOGGER
private static final org.slf4j.Logger LOGGER -
TAG_ID
- 另请参阅:
-
TAG_UUID
- 另请参阅:
-
TAG_PASSENGERS
- 另请参阅:
-
TAG_DATA
- 另请参阅:
-
TAG_POS
- 另请参阅:
-
TAG_MOTION
- 另请参阅:
-
TAG_ROTATION
- 另请参阅:
-
TAG_PORTAL_COOLDOWN
- 另请参阅:
-
TAG_NO_GRAVITY
- 另请参阅:
-
TAG_AIR
- 另请参阅:
-
TAG_ON_GROUND
- 另请参阅:
-
TAG_FALL_DISTANCE
- 另请参阅:
-
TAG_FIRE
- 另请参阅:
-
TAG_SILENT
- 另请参阅:
-
TAG_GLOWING
- 另请参阅:
-
TAG_INVULNERABLE
- 另请参阅:
-
ENTITY_COUNTER
-
CONTENTS_SLOT_INDEX
public static final int CONTENTS_SLOT_INDEX- 另请参阅:
-
BOARDING_COOLDOWN
public static final int BOARDING_COOLDOWN- 另请参阅:
-
TOTAL_AIR_SUPPLY
public static final int TOTAL_AIR_SUPPLY- 另请参阅:
-
MAX_ENTITY_TAG_COUNT
public static final int MAX_ENTITY_TAG_COUNT- 另请参阅:
-
TAG_LIST_CODEC
-
DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2
public static final float DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2- 另请参阅:
-
DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5
public static final double DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5- 另请参阅:
-
DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0
public static final double DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0- 另请参阅:
-
BASE_TICKS_REQUIRED_TO_FREEZE
public static final int BASE_TICKS_REQUIRED_TO_FREEZE- 另请参阅:
-
FREEZE_HURT_FREQUENCY
public static final int FREEZE_HURT_FREQUENCY- 另请参阅:
-
BASE_SAFE_FALL_DISTANCE
public static final int BASE_SAFE_FALL_DISTANCE- 另请参阅:
-
YXZ_AXIS_ORDER
-
YZX_AXIS_ORDER
-
INITIAL_AABB
-
WATER_FLOW_SCALE
private static final double WATER_FLOW_SCALE- 另请参阅:
-
LAVA_FAST_FLOW_SCALE
private static final double LAVA_FAST_FLOW_SCALE- 另请参阅:
-
LAVA_SLOW_FLOW_SCALE
private static final double LAVA_SLOW_FLOW_SCALE- 另请参阅:
-
viewScale
private static double viewScale -
type
已过时。 -
requiresPrecisePosition
private boolean requiresPrecisePosition -
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- 另请参阅:
-
DEFAULT_BB_HEIGHT
public static final float DEFAULT_BB_HEIGHT- 另请参阅:
-
moveDist
public float moveDist -
flyDist
public float flyDist -
fallDistance
public double 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
已过时。 -
wasEyeInWater
protected boolean wasEyeInWater -
fluidOnEyes
已过时。 -
invulnerableTime
public int invulnerableTime -
firstTick
protected boolean firstTick -
entityData
-
DATA_SHARED_FLAGS_ID
-
FLAG_ONFIRE
protected static final int FLAG_ONFIRE- 另请参阅:
-
FLAG_SHIFT_KEY_DOWN
private static final int FLAG_SHIFT_KEY_DOWN- 另请参阅:
-
FLAG_SPRINTING
private static final int FLAG_SPRINTING- 另请参阅:
-
FLAG_SWIMMING
private static final int FLAG_SWIMMING- 另请参阅:
-
FLAG_INVISIBLE
private static final int FLAG_INVISIBLE- 另请参阅:
-
FLAG_GLOWING
protected static final int FLAG_GLOWING- 另请参阅:
-
FLAG_FALL_FLYING
protected static final int FLAG_FALL_FLYING- 另请参阅:
-
DATA_AIR_SUPPLY_ID
-
DATA_CUSTOM_NAME
-
DATA_CUSTOM_NAME_VISIBLE
-
DATA_SILENT
-
DATA_NO_GRAVITY
-
DATA_POSE
-
DATA_TICKS_FROZEN
-
levelCallback
-
packetPositionCodec
-
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 -
mainSupportingBlockPos
-
onGroundNoBlocks
private boolean onGroundNoBlocks -
crystalSoundIntensity
private float crystalSoundIntensity -
lastCrystalSoundPlayTick
private int lastCrystalSoundPlayTick -
hasVisualFire
private boolean hasVisualFire -
inBlockState
-
MAX_MOVEMENTS_HANDELED_PER_TICK
public static final int MAX_MOVEMENTS_HANDELED_PER_TICK- 另请参阅:
-
movementThisTick
-
finalMovementsThisTick
-
visitedBlocks
private final it.unimi.dsi.fastutil.longs.LongSet visitedBlocks -
insideEffectCollector
-
customData
-
captureDrops
Neo: Short-lived holder of dropped item entities. Used mainly for Neo hooks and event logic.When not null, records all item entities from
引用无效
#spawnAtLocation(ItemStack, float)
ServerPlayer.drop(ItemStack, boolean, boolean)
instead of adding them to the world. -
persistentData
-
isAddedToLevel
private boolean isAddedToLevelNeo: 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. -
forgeFluidTypeHeight
-
forgeFluidTypeOnEyes
-
-
构造器详细资料
-
Entity
-
-
方法详细资料
-
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
-
getRequiresPrecisePosition
public boolean getRequiresPrecisePosition() -
setRequiresPrecisePosition
public void setRequiresPrecisePosition(boolean p_416605_) -
getId
public int getId()- 指定者:
getId
在接口中EntityAccess
-
setId
public void setId(int p_20235_) -
getTags
-
addTag
-
removeTag
-
kill
-
discard
public final void discard() -
defineSynchedData
-
getEntityData
-
equals
-
hashCode
public int hashCode() -
remove
-
onClientRemoval
public void onClientRemoval() -
onRemoval
-
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
-
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() -
lavaIgnite
public void lavaIgnite() -
lavaHurt
public void lavaHurt() -
shouldPlayLavaHurtSound
protected boolean shouldPlayLavaHurtSound() -
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
-
setOnGroundWithMovement
-
isSupportedBy
-
checkSupportingBlock
-
onGround
public boolean onGround() -
move
-
applyMovementEmissionAndPlaySound
private void applyMovementEmissionAndPlaySound(Entity.MovementEmission p_365086_, Vec3 p_365141_, BlockPos p_365493_, BlockState p_365295_) -
applyEffectsFromBlocks
protected void applyEffectsFromBlocks() -
addMovementThisTick
-
removeLatestMovementRecording
public void removeLatestMovementRecording() -
clearMovementThisTick
protected void clearMovementThisTick() -
applyEffectsFromBlocks
-
applyEffectsFromBlocks
-
isAffectedByBlocks
protected boolean isAffectedByBlocks() -
isStateClimbable
-
vibrationAndSoundEffectsFromBlock
private boolean vibrationAndSoundEffectsFromBlock(BlockPos p_286221_, BlockState p_286549_, boolean p_286708_, boolean p_286543_, Vec3 p_286448_) -
isHorizontalCollisionMinor
-
playEntityOnFireExtinguishedSound
protected void playEntityOnFireExtinguishedSound() -
extinguishFire
public void extinguishFire() -
processFlappingMovement
protected void processFlappingMovement() -
getOnPosLegacy
已过时。 -
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
-
axisStepOrder
-
nextStep
protected float nextStep() -
getSwimSound
-
getSwimSplashSound
-
getSwimHighSpeedSplashSound
-
checkInsideBlocks
private void checkInsideBlocks(List<Entity.Movement> p_381632_, InsideBlockEffectApplier.StepBasedCollector p_405233_) -
checkInsideBlocks
private void checkInsideBlocks(Vec3 p_428555_, Vec3 p_428532_, InsideBlockEffectApplier.StepBasedCollector p_428368_, it.unimi.dsi.fastutil.longs.LongSet p_428369_) -
debugBlockIntersection
-
collidedWithFluid
public boolean collidedWithFluid(FluidState p_398005_, BlockPos p_397890_, Vec3 p_397088_, Vec3 p_397336_) -
collidedWithShapeMovingFrom
-
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() -
doCheckFallDamage
public final void doCheckFallDamage(double p_390594_, double p_390598_, double p_390591_, boolean p_390600_) -
checkFallDamage
protected void checkFallDamage(double p_19911_, boolean p_19912_, BlockState p_19913_, BlockPos p_19914_) -
fireImmune
public boolean fireImmune() -
causeFallDamage
-
propagateFallToPassengers
-
isInWater
public boolean isInWater() -
isInRain
boolean isInRain() -
isInWaterOrRain
public boolean isInWaterOrRain() -
isInLiquid
public boolean isInLiquid() -
isUnderWater
public boolean isUnderWater() -
isInClouds
public boolean isInClouds() -
updateSwimming
public void updateSwimming() -
updateInWaterStateAndDoFluidPushing
protected boolean updateInWaterStateAndDoFluidPushing() -
updateInWaterStateAndDoWaterCurrentPushing
void updateInWaterStateAndDoWaterCurrentPushing() -
updateFluidOnEyes
private void updateFluidOnEyes() -
doWaterSplashEffect
protected void doWaterSplashEffect() -
getBlockStateOnLegacy
已过时。 -
getBlockStateOn
-
canSpawnSprintParticle
public boolean canSpawnSprintParticle() -
spawnSprintParticle
protected void spawnSprintParticle() -
isEyeInFluid
已过时。 -
isInLava
public boolean isInLava() -
moveRelative
-
getInputVector
-
getLightLevelDependentMagicValue
已过时。 -
absSnapTo
public void absSnapTo(double p_397411_, double p_397695_, double p_397235_, float p_397420_, float p_397906_) -
absSnapRotationTo
public void absSnapRotationTo(float p_348662_, float p_348500_) -
absSnapTo
public void absSnapTo(double p_20249_, double p_20250_, double p_20251_) -
snapTo
-
snapTo
public void snapTo(double p_397080_, double p_398021_, double p_397836_) -
snapTo
-
snapTo
-
snapTo
public void snapTo(double p_20108_, double p_20109_, double p_20110_, float p_20111_, float p_20112_) -
setOldPosAndRot
public final void setOldPosAndRot() -
setOldPosAndRot
-
setOldPos
protected void setOldPos() -
setOldRot
public void setOldRot() -
setOldPos
-
setOldRot
private void setOldRot(float p_371749_, float p_371505_) -
oldPosition
-
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
已过时。 -
hurtOrSimulate
已过时。 -
hurtServer
-
hurtClient
-
getViewVector
-
getNearestViewDirection
-
getViewXRot
public float getViewXRot(float p_20268_) -
getViewYRot
public float getViewYRot(float p_20279_) -
getXRot
public float getXRot(float p_363660_) -
getYRot
public float getYRot(float p_363186_) -
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
-
spawnAtLocation
-
spawnAtLocation
@Nullable public ItemEntity spawnAtLocation(ServerLevel p_376116_, ItemLike p_376163_, int p_376104_) -
spawnAtLocation
-
spawnAtLocation
@Nullable public ItemEntity spawnAtLocation(ServerLevel p_426271_, ItemStack p_426002_, Vec3 p_426167_) -
spawnAtLocation
@Nullable public ItemEntity spawnAtLocation(ServerLevel p_376141_, ItemStack p_376472_, float p_376881_) -
isAlive
public boolean isAlive() -
isInWall
public boolean isInWall() -
interact
-
shearOffAllLeashConnections
-
dropAllLeashConnections
-
attemptToShearEquipment
private boolean attemptToShearEquipment(Player p_426225_, InteractionHand p_425581_, ItemStack p_426326_, Mob p_426179_) -
canCollideWith
-
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
已过时。Forge: Userider sensitive version
-
isInterpolating
public final boolean isInterpolating() -
moveOrInterpolateTo
-
getInterpolation
-
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
-
considersEntityAsAlly
-
isAlliedTo
-
setInvisible
public void setInvisible(boolean p_20304_) -
getMaxAirSupply
public int getMaxAirSupply() -
getAirSupply
public int getAirSupply() -
setAirSupply
public void setAirSupply(int p_20302_) -
clearFreeze
public void clearFreeze() -
getTicksFrozen
public int getTicksFrozen() -
setTicksFrozen
public void setTicksFrozen(int p_146918_) -
getPercentFrozen
public float getPercentFrozen() -
isFullyFrozen
public boolean isFullyFrozen() -
getTicksRequiredToFreeze
public int getTicksRequiredToFreeze() -
thunderHit
-
onAboveBubbleColumn
-
handleOnAboveBubbleColumn
-
sendBubbleColumnParticles
-
onInsideBubbleColumn
public void onInsideBubbleColumn(boolean p_20322_) -
handleOnInsideBubbleColumn
-
killedEntity
-
checkFallDistanceAccumulation
public void checkFallDistanceAccumulation() -
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
-
isInvulnerableToBase
-
isInvulnerable
public boolean isInvulnerable() -
setInvulnerable
public void setInvulnerable(boolean p_20332_) -
copyPosition
-
restoreFrom
-
teleport
-
teleportSameDimension
-
teleportCrossDimension
private Entity teleportCrossDimension(ServerLevel p_380146_, ServerLevel p_416740_, TeleportTransition p_379377_) -
teleportSpectators
-
calculatePassengerTransition
private TeleportTransition calculatePassengerTransition(TeleportTransition p_380120_, Entity p_379847_) -
sendTeleportTransitionToRidingPlayers
-
teleportSetPosition
-
forceSetRotation
public void forceSetRotation(float p_379323_, float p_380342_) -
placePortalTicket
-
removeAfterChangingDimensions
protected void removeAfterChangingDimensions() -
getRelativePortalPosition
-
canUsePortal
public boolean canUsePortal(boolean p_352898_) -
canTeleport
-
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
- 指定者:
getUUID
在接口中UniquelyIdentifyable
-
getStringUUID
-
getScoreboardName
- 指定者:
getScoreboardName
在接口中ScoreHolder
-
isPushedByFluid
已过时。 -
getViewScale
public static double getViewScale() -
setViewScale
public static void setViewScale(double p_20104_) -
getDisplayName
- 指定者:
getDisplayName
在接口中Nameable
- 指定者:
getDisplayName
在接口中ScoreHolder
-
setCustomName
-
getCustomName
- 指定者:
getCustomName
在接口中Nameable
-
hasCustomName
public boolean hasCustomName()- 指定者:
hasCustomName
在接口中Nameable
-
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<Relative> p_265083_, float p_265573_, float p_265094_, boolean p_365015_) -
dismountTo
public void dismountTo(double p_146825_, double p_146826_, double p_146827_) -
teleportTo
public void teleportTo(double p_19887_, double p_19888_, double p_19889_) -
teleportPassengers
private void teleportPassengers() -
teleportRelative
public void teleportRelative(double p_249341_, double p_252229_, double p_252038_) -
shouldShowName
public boolean shouldShowName() -
onSyncedDataUpdated
- 指定者:
onSyncedDataUpdated
在接口中SyncedDataHolder
-
onSyncedDataUpdated
- 指定者:
onSyncedDataUpdated
在接口中SyncedDataHolder
-
fixupDimensions
已过时。 -
refreshDimensions
public void refreshDimensions() -
fudgePositionAfterSizeChange
-
getDirection
-
getMotionDirection
-
createHoverEvent
-
broadcastToPlayer
-
getBoundingBox
- 指定者:
getBoundingBox
在接口中EntityAccess
-
setBoundingBox
-
getEyeHeight
-
getEyeHeight
public final float getEyeHeight() -
getSlot
-
getServer
-
interactAt
-
ignoreExplosion
-
startSeenByPlayer
-
stopSeenByPlayer
-
rotate
-
mirror
-
deflection
-
getControllingPassenger
-
hasControllingPassenger
public final boolean hasControllingPassenger() -
getPassengers
-
getFirstPassenger
-
hasPassenger
-
hasPassenger
-
getIndirectPassengersStream
-
getSelfAndPassengers
- 指定者:
getSelfAndPassengers
在接口中EntityAccess
-
getPassengersAndSelf
- 指定者:
getPassengersAndSelf
在接口中EntityAccess
-
getIndirectPassengers
-
countPlayerPassengers
public int countPlayerPassengers() -
hasExactlyOnePlayerPassenger
public boolean hasExactlyOnePlayerPassenger() -
getRootVehicle
-
isPassengerOfSameVehicle
-
hasIndirectPassenger
-
isLocalInstanceAuthoritative
public final boolean isLocalInstanceAuthoritative() -
isLocalClientAuthoritative
protected boolean isLocalClientAuthoritative() -
isClientAuthoritative
public boolean isClientAuthoritative() -
canSimulateMovement
public boolean canSimulateMovement() -
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() -
createCommandSourceStackForNameResolution
-
lookAt
-
getPreciseBodyRotation
public float getPreciseBodyRotation(float p_352259_) -
updateFluidHeightAndDoFluidPushing
@Deprecated public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> p_204032_, double p_204033_) 已过时。 -
updateFluidHeightAndDoFluidPushing
public void updateFluidHeightAndDoFluidPushing() -
touchingUnloadedChunk
public boolean touchingUnloadedChunk() -
getFluidHeight
已过时。 -
getFluidJumpThreshold
public double getFluidJumpThreshold() -
getBbWidth
public final float getBbWidth() -
getBbHeight
public final float getBbHeight() -
getAddEntityPacket
-
getDimensions
-
getAttachments
-
position
-
trackingPosition
-
blockPosition
- 指定者:
blockPosition
在接口中EntityAccess
-
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() -
getQuadLeashHolderOffsets
-
supportQuadLeashAsHolder
public boolean supportQuadLeashAsHolder() -
notifyLeashHolder
-
notifyLeasheeRemoved
-
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()- 指定者:
isRemoved
在接口中UniquelyIdentifyable
-
getRemovalReason
-
setRemoved
- 指定者:
setRemoved
在接口中EntityAccess
-
unsetRemoved
protected void unsetRemoved() -
setLevelCallback
- 指定者:
setLevelCallback
在接口中EntityAccess
-
shouldBeSaved
public boolean shouldBeSaved()- 指定者:
shouldBeSaved
在接口中EntityAccess
-
isAlwaysTicking
public boolean isAlwaysTicking()- 指定者:
isAlwaysTicking
在接口中EntityAccess
-
mayInteract
-
captureDrops
- 指定者:
captureDrops
在接口中IEntityExtension
-
captureDrops
- 指定者:
captureDrops
在接口中IEntityExtension
-
getPersistentData
从接口复制的说明:IEntityExtension
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.- 指定者:
getPersistentData
在接口中IEntityExtension
- 返回:
- A NBTTagCompound
-
canTrample
从接口复制的说明:IEntityExtension
- 指定者:
canTrample
在接口中IEntityExtension
- 参数:
pos
- The block posfallDistance
- The fall distance- 返回:
true
if this entity can trample,false
otherwise
-
isAddedToLevel
public final boolean isAddedToLevel()从接口复制的说明:IEntityExtension
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.- 指定者:
isAddedToLevel
在接口中IEntityExtension
- 返回:
- True if this entity is being tracked by a world
-
onAddedToLevel
public void onAddedToLevel()从接口复制的说明:IEntityExtension
Called after the entity has been added to the world's ticking list.- 指定者:
onAddedToLevel
在接口中IEntityExtension
-
onRemovedFromLevel
public void onRemovedFromLevel()从接口复制的说明:IEntityExtension
Called after the entity has been removed to the world's ticking list.- 指定者:
onRemovedFromLevel
在接口中IEntityExtension
-
revive
public void revive()从接口复制的说明:IEntityExtension
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.- 指定者:
revive
在接口中IEntityExtension
-
setFluidTypeHeight
-
getFluidTypeHeight
从接口复制的说明:IEntityExtension
Returns the height of the fluid type in relation to the bounding box of the entity. If the entity is not in the fluid type, then0
is returned.- 指定者:
getFluidTypeHeight
在接口中IEntityExtension
- 参数:
type
- the type of the fluid- 返回:
- the height of the fluid compared to the entity
-
isInFluidType
从接口复制的说明:IEntityExtension
Returns whether the fluid type the entity is currently in matches the specified condition.- 指定者:
isInFluidType
在接口中IEntityExtension
- 参数:
predicate
- a test taking in the fluid type and its heightforAllTypes
-true
if all fluid types should match the condition instead of at least one- 返回:
true
if a fluid type meets the condition,false
otherwise
-
isInFluidType
public final boolean isInFluidType()从接口复制的说明:IEntityExtension
Returns whether the entity is in a fluid.- 指定者:
isInFluidType
在接口中IEntityExtension
- 返回:
true
if the entity is in a fluid,false
otherwise
-
getEyeInFluidType
从接口复制的说明:IEntityExtension
Returns the fluid that is on the entity's eyes.- 指定者:
getEyeInFluidType
在接口中IEntityExtension
- 返回:
- the fluid that is on the entity's eyes
-
getMaxHeightFluidType
从接口复制的说明:IEntityExtension
Returns the fluid type which is the highest on the bounding box of the entity.- 指定者:
getMaxHeightFluidType
在接口中IEntityExtension
- 返回:
- the fluid type which is the highest on the bounding box of the entity
-
setData
从接口复制的说明:IAttachmentHolder
Sets the data attachment of the given type.- 指定者:
setData
在接口中IAttachmentHolder
- 覆盖:
setData
在类中AttachmentHolder
- 返回:
- the previous value for that attachment type, if any, or
null
if there was none
-
getCapability
@Nullable public final <T,C extends @Nullable Object> T getCapability(EntityCapability<T, C> capability, C context) -
getCapability
-
isFlyingVehicle
public boolean isFlyingVehicle() -
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
-
getLootTable
-
applyImplicitComponents
-
applyComponentsFromItemStack
-
get
- 指定者:
get
在接口中DataComponentGetter
-
castComponentValue
@Nullable @Contract("_,!null->!null;_,_->_") protected static <T> T castComponentValue(DataComponentType<T> p_397295_, @Nullable Object p_397934_) -
setComponent
-
applyImplicitComponent
-
applyImplicitComponentIfPresent
protected <T> boolean applyImplicitComponentIfPresent(DataComponentGetter p_397023_, DataComponentType<T> p_397949_) -
problemPath
-
rider sensitive version