类 Entity

所有已实现的接口:
CommandSource, EntityAccess, Nameable, ICapabilityProvider, ICapabilityProviderImpl<Entity>, ICapabilitySerializable<CompoundTag>, IForgeEntity, INBTSerializable<CompoundTag>
直接已知子类:
AbstractMinecart, AreaEffectCloud, Boat, Display, EndCrystal, EvokerFangs, ExperienceOrb, EyeOfEnder, FallingBlockEntity, HangingEntity, Interaction, ItemEntity, LightningBolt, LivingEntity, Marker, PartEntity, PrimedTnt, Projectile

public abstract class Entity extends CapabilityProvider<Entity> implements Nameable, EntityAccess, CommandSource, IForgeEntity
  • 字段详细资料

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • ID_TAG

      public static final String ID_TAG
      另请参阅:
    • PASSENGERS_TAG

      public static final String PASSENGERS_TAG
      另请参阅:
    • ENTITY_COUNTER

      protected static final AtomicInteger ENTITY_COUNTER
    • EMPTY_LIST

      private static final List<ItemStack> EMPTY_LIST
    • 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
      另请参阅:
    • 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
      另请参阅:
    • BREATHING_DISTANCE_BELOW_EYES

      public static final float BREATHING_DISTANCE_BELOW_EYES
      另请参阅:
    • BASE_TICKS_REQUIRED_TO_FREEZE

      public static final int BASE_TICKS_REQUIRED_TO_FREEZE
      另请参阅:
    • FREEZE_HURT_FREQUENCY

      public static final int FREEZE_HURT_FREQUENCY
      另请参阅:
    • INITIAL_AABB

      private static final AABB 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
      另请参阅:
    • UUID_TAG

      public static final String UUID_TAG
      另请参阅:
    • viewScale

      private static double viewScale
    • type

      @Deprecated private final EntityType<?> type
      已过时。
    • id

      private int id
    • blocksBuilding

      public boolean blocksBuilding
    • passengers

      private com.google.common.collect.ImmutableList<Entity> passengers
    • boardingCooldown

      protected int boardingCooldown
    • vehicle

      @Nullable private Entity vehicle
    • level

      private Level level
    • xo

      public double xo
    • yo

      public double yo
    • zo

      public double zo
    • position

      private Vec3 position
    • blockPosition

      private BlockPos blockPosition
    • chunkPosition

      private ChunkPos chunkPosition
    • deltaMovement

      private Vec3 deltaMovement
    • yRot

      private float yRot
    • xRot

      private float xRot
    • yRotO

      public float yRotO
    • xRotO

      public float xRotO
    • bb

      private AABB 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

      protected Vec3 stuckSpeedMultiplier
    • removalReason

      @Nullable private Entity.RemovalReason removalReason
    • DEFAULT_BB_WIDTH

      public static final float DEFAULT_BB_WIDTH
      另请参阅:
    • DEFAULT_BB_HEIGHT

      public static final float DEFAULT_BB_HEIGHT
      另请参阅:
    • walkDistO

      public float walkDistO
    • walkDist

      public float walkDist
    • moveDist

      public float moveDist
    • flyDist

      public float flyDist
    • fallDistance

      public float fallDistance
    • nextStep

      private float nextStep
    • xOld

      public double xOld
    • yOld

      public double yOld
    • zOld

      public double zOld
    • maxUpStep

      private float maxUpStep
    • noPhysics

      public boolean noPhysics
    • random

      protected final RandomSource random
    • tickCount

      public int tickCount
    • remainingFireTicks

      private int remainingFireTicks
    • wasTouchingWater

      protected boolean wasTouchingWater
    • fluidHeight

      @Deprecated protected it.unimi.dsi.fastutil.objects.Object2DoubleMap<TagKey<Fluid>> fluidHeight
      已过时。
    • wasEyeInWater

      protected boolean wasEyeInWater
    • fluidOnEyes

      @Deprecated private final Set<TagKey<Fluid>> fluidOnEyes
      已过时。
    • invulnerableTime

      public int invulnerableTime
    • firstTick

      protected boolean firstTick
    • entityData

      protected final SynchedEntityData entityData
    • DATA_SHARED_FLAGS_ID

      protected static final EntityDataAccessor<Byte> 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

      private static final EntityDataAccessor<Integer> DATA_AIR_SUPPLY_ID
    • DATA_CUSTOM_NAME

      private static final EntityDataAccessor<Optional<Component>> DATA_CUSTOM_NAME
    • DATA_CUSTOM_NAME_VISIBLE

      private static final EntityDataAccessor<Boolean> DATA_CUSTOM_NAME_VISIBLE
    • DATA_SILENT

      private static final EntityDataAccessor<Boolean> DATA_SILENT
    • DATA_NO_GRAVITY

      private static final EntityDataAccessor<Boolean> DATA_NO_GRAVITY
    • DATA_POSE

      protected static final EntityDataAccessor<Pose> DATA_POSE
    • DATA_TICKS_FROZEN

      private static final EntityDataAccessor<Integer> DATA_TICKS_FROZEN
    • levelCallback

      private EntityInLevelCallback levelCallback
    • packetPositionCodec

      private final VecDeltaCodec packetPositionCodec
    • noCulling

      public boolean noCulling
    • hasImpulse

      public boolean hasImpulse
    • portalCooldown

      private int portalCooldown
    • isInsidePortal

      protected boolean isInsidePortal
    • portalTime

      protected int portalTime
    • portalEntrancePos

      protected BlockPos portalEntrancePos
    • invulnerable

      private boolean invulnerable
    • uuid

      protected UUID uuid
    • stringUUID

      protected String stringUUID
    • hasGlowingTag

      private boolean hasGlowingTag
    • tags

      private final Set<String> tags
    • pistonDeltas

      private final double[] pistonDeltas
    • pistonDeltasGameTime

      private long pistonDeltasGameTime
    • dimensions

      private EntityDimensions dimensions
    • eyeHeight

      private float eyeHeight
    • isInPowderSnow

      public boolean isInPowderSnow
    • wasInPowderSnow

      public boolean wasInPowderSnow
    • wasOnFire

      public boolean wasOnFire
    • mainSupportingBlockPos

      public Optional<BlockPos> mainSupportingBlockPos
    • onGroundNoBlocks

      private boolean onGroundNoBlocks
    • crystalSoundIntensity

      private float crystalSoundIntensity
    • lastCrystalSoundPlayTick

      private int lastCrystalSoundPlayTick
    • hasVisualFire

      private boolean hasVisualFire
    • feetBlockState

      @Nullable private BlockState feetBlockState
    • canUpdate

      private boolean canUpdate
    • captureDrops

      private Collection<ItemEntity> captureDrops
    • persistentData

      private CompoundTag persistentData
    • isAddedToWorld

      private boolean isAddedToWorld
      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

      protected it.unimi.dsi.fastutil.objects.Object2DoubleMap<FluidType> forgeFluidTypeHeight
    • forgeFluidTypeOnEyes

      private FluidType forgeFluidTypeOnEyes
  • 构造器详细资料

  • 方法详细资料

    • isColliding

      public boolean isColliding(BlockPos pPos, BlockState pState)
    • getTeamColor

      public int getTeamColor()
    • isSpectator

      public boolean isSpectator()
    • unRide

      public final void unRide()
    • syncPacketPositionCodec

      public void syncPacketPositionCodec(double pX, double pY, double pZ)
    • getPositionCodec

      public VecDeltaCodec getPositionCodec()
    • getType

      public EntityType<?> getType()
    • getId

      public int getId()
      指定者:
      getId 在接口中 EntityAccess
    • setId

      public void setId(int pId)
    • getTags

      public Set<String> getTags()
    • addTag

      public boolean addTag(String pTag)
    • removeTag

      public boolean removeTag(String pTag)
    • kill

      public void kill()
    • discard

      public final void discard()
    • defineSynchedData

      protected abstract void defineSynchedData()
    • getEntityData

      public SynchedEntityData getEntityData()
    • equals

      public boolean equals(Object pObject)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • remove

      public void remove(Entity.RemovalReason pReason)
    • onClientRemoval

      public void onClientRemoval()
    • setPose

      public void setPose(Pose pPose)
    • getPose

      public Pose getPose()
    • hasPose

      public boolean hasPose(Pose pPose)
    • closerThan

      public boolean closerThan(Entity pEntity, double pDistance)
    • closerThan

      public boolean closerThan(Entity pEntity, double pHorizontalDistance, double pVerticalDistance)
    • setRot

      protected void setRot(float pYRot, float pXRot)
    • setPos

      public final void setPos(Vec3 pPos)
    • setPos

      public void setPos(double p_20210_, double p_20211_, double p_20212_)
    • makeBoundingBox

      protected AABB makeBoundingBox()
    • reapplyPosition

      protected void reapplyPosition()
    • turn

      public void turn(double pYRot, double pXRot)
    • tick

      public void tick()
    • baseTick

      public void baseTick()
    • setSharedFlagOnFire

      public void setSharedFlagOnFire(boolean pIsOnFire)
    • checkBelowWorld

      public void checkBelowWorld()
    • setPortalCooldown

      public void setPortalCooldown()
    • setPortalCooldown

      public void setPortalCooldown(int pPortalCooldown)
    • getPortalCooldown

      public int getPortalCooldown()
    • isOnPortalCooldown

      public boolean isOnPortalCooldown()
    • processPortalCooldown

      protected void processPortalCooldown()
    • getPortalWaitTime

      public int getPortalWaitTime()
    • lavaHurt

      public void lavaHurt()
    • setSecondsOnFire

      public void setSecondsOnFire(int pSeconds)
    • setRemainingFireTicks

      public void setRemainingFireTicks(int pRemainingFireTicks)
    • getRemainingFireTicks

      public int getRemainingFireTicks()
    • clearFire

      public void clearFire()
    • onBelowWorld

      protected void onBelowWorld()
    • isFree

      public boolean isFree(double pX, double pY, double pZ)
    • isFree

      private boolean isFree(AABB pBox)
    • setOnGround

      public void setOnGround(boolean pOnGround)
    • setOnGroundWithKnownMovement

      public void setOnGroundWithKnownMovement(boolean pOnGround, Vec3 pMovement)
    • isSupportedBy

      public boolean isSupportedBy(BlockPos pPos)
    • checkSupportingBlock

      protected void checkSupportingBlock(boolean pOnGround, @Nullable Vec3 pMovement)
    • onGround

      public boolean onGround()
    • move

      public void move(MoverType pType, Vec3 pPos)
    • isStateClimbable

      private boolean isStateClimbable(BlockState pState)
    • vibrationAndSoundEffectsFromBlock

      private boolean vibrationAndSoundEffectsFromBlock(BlockPos pPos, BlockState pState, boolean pPlayStepSound, boolean pBroadcastGameEvent, Vec3 p_286448_)
    • isHorizontalCollisionMinor

      protected boolean isHorizontalCollisionMinor(Vec3 pDeltaMovement)
    • tryCheckInsideBlocks

      protected void tryCheckInsideBlocks()
    • playEntityOnFireExtinguishedSound

      protected void playEntityOnFireExtinguishedSound()
    • extinguishFire

      public void extinguishFire()
    • processFlappingMovement

      protected void processFlappingMovement()
    • getOnPosLegacy

      @Deprecated public BlockPos getOnPosLegacy()
      已过时。
    • getBlockPosBelowThatAffectsMyMovement

      protected BlockPos getBlockPosBelowThatAffectsMyMovement()
    • getOnPos

      public BlockPos getOnPos()
    • getOnPos

      protected BlockPos getOnPos(float pYOffset)
    • getBlockJumpFactor

      protected float getBlockJumpFactor()
    • getBlockSpeedFactor

      protected float getBlockSpeedFactor()
    • maybeBackOffFromEdge

      protected Vec3 maybeBackOffFromEdge(Vec3 pVec, MoverType pMover)
    • limitPistonMovement

      protected Vec3 limitPistonMovement(Vec3 pPos)
    • applyPistonMovementRestriction

      private double applyPistonMovementRestriction(Direction.Axis pAxis, double pDistance)
    • collide

      private Vec3 collide(Vec3 pVec)
    • collideBoundingBox

      public static Vec3 collideBoundingBox(@Nullable Entity pEntity, Vec3 pVec, AABB pCollisionBox, Level pLevel, List<VoxelShape> pPotentialHits)
    • collideWithShapes

      private static Vec3 collideWithShapes(Vec3 pDeltaMovement, AABB pEntityBB, List<VoxelShape> pShapes)
    • nextStep

      protected float nextStep()
    • getSwimSound

      protected SoundEvent getSwimSound()
    • getSwimSplashSound

      protected SoundEvent getSwimSplashSound()
    • getSwimHighSpeedSplashSound

      protected SoundEvent getSwimHighSpeedSplashSound()
    • checkInsideBlocks

      protected void checkInsideBlocks()
    • onInsideBlock

      protected void onInsideBlock(BlockState pState)
    • gameEvent

      public void gameEvent(GameEvent pEvent, @Nullable Entity pEntity)
    • gameEvent

      public void gameEvent(GameEvent pEvent)
    • walkingStepSound

      private void walkingStepSound(BlockPos pPos, BlockState pState)
    • waterSwimSound

      protected void waterSwimSound()
    • getPrimaryStepSoundBlockPos

      protected BlockPos getPrimaryStepSoundBlockPos(BlockPos pPos)
    • playCombinationStepSounds

      protected void playCombinationStepSounds(BlockState pPrimaryState, BlockState pSecondaryState, BlockPos primaryPos, BlockPos secondaryPos)
    • playMuffledStepSound

      protected void playMuffledStepSound(BlockState pState, BlockPos pos)
    • playStepSound

      protected void playStepSound(BlockPos pPos, BlockState pState)
    • shouldPlayAmethystStepSound

      private boolean shouldPlayAmethystStepSound(BlockState pState)
    • playAmethystStepSound

      private void playAmethystStepSound()
    • playSwimSound

      protected void playSwimSound(float pVolume)
    • onFlap

      protected void onFlap()
    • isFlapping

      protected boolean isFlapping()
    • playSound

      public void playSound(SoundEvent pSound, float pVolume, float pPitch)
    • playSound

      public void playSound(SoundEvent pSound)
    • isSilent

      public boolean isSilent()
    • setSilent

      public void setSilent(boolean pIsSilent)
    • isNoGravity

      public boolean isNoGravity()
    • setNoGravity

      public void setNoGravity(boolean pNoGravity)
    • getMovementEmission

      protected Entity.MovementEmission getMovementEmission()
    • dampensVibrations

      public boolean dampensVibrations()
    • checkFallDamage

      protected void checkFallDamage(double pY, boolean pOnGround, BlockState pState, BlockPos pPos)
    • fireImmune

      public boolean fireImmune()
    • causeFallDamage

      public boolean causeFallDamage(float pFallDistance, float pMultiplier, DamageSource pSource)
    • isInWater

      public boolean isInWater()
    • isInRain

      private boolean isInRain()
    • isInBubbleColumn

      private boolean isInBubbleColumn()
    • isInWaterOrRain

      public boolean isInWaterOrRain()
    • isInWaterRainOrBubble

      public boolean isInWaterRainOrBubble()
    • isInWaterOrBubble

      public boolean isInWaterOrBubble()
    • isUnderWater

      public boolean isUnderWater()
    • updateSwimming

      public void updateSwimming()
    • updateInWaterStateAndDoFluidPushing

      protected boolean updateInWaterStateAndDoFluidPushing()
    • updateInWaterStateAndDoWaterCurrentPushing

      void updateInWaterStateAndDoWaterCurrentPushing()
    • updateFluidOnEyes

      private void updateFluidOnEyes()
    • doWaterSplashEffect

      protected void doWaterSplashEffect()
    • getBlockStateOnLegacy

      @Deprecated protected BlockState getBlockStateOnLegacy()
      已过时。
    • getBlockStateOn

      public BlockState getBlockStateOn()
    • canSpawnSprintParticle

      public boolean canSpawnSprintParticle()
    • spawnSprintParticle

      protected void spawnSprintParticle()
    • isEyeInFluid

      @Deprecated public boolean isEyeInFluid(TagKey<Fluid> pFluidTag)
      已过时。
    • isInLava

      public boolean isInLava()
    • moveRelative

      public void moveRelative(float pAmount, Vec3 pRelative)
    • getInputVector

      private static Vec3 getInputVector(Vec3 pRelative, float pMotionScaler, float pFacing)
    • getLightLevelDependentMagicValue

      @Deprecated public float getLightLevelDependentMagicValue()
      已过时。
    • absMoveTo

      public void absMoveTo(double pX, double pY, double pZ, float pYRot, float pXRot)
    • absMoveTo

      public void absMoveTo(double pX, double pY, double pZ)
    • moveTo

      public void moveTo(Vec3 pVec)
    • moveTo

      public void moveTo(double p_20105_, double p_20106_, double p_20107_)
    • moveTo

      public void moveTo(BlockPos pPos, float pYRot, float pXRot)
    • moveTo

      public void moveTo(double pX, double pY, double pZ, float pYRot, float pXRot)
    • setOldPosAndRot

      public final void setOldPosAndRot()
    • distanceTo

      public float distanceTo(Entity pEntity)
    • distanceToSqr

      public double distanceToSqr(double pX, double pY, double pZ)
    • distanceToSqr

      public double distanceToSqr(Entity pEntity)
    • distanceToSqr

      public double distanceToSqr(Vec3 pVec)
    • playerTouch

      public void playerTouch(Player pPlayer)
    • push

      public void push(Entity pEntity)
    • push

      public void push(double pX, double pY, double pZ)
    • markHurt

      protected void markHurt()
    • hurt

      public boolean hurt(DamageSource pSource, float pAmount)
    • getViewVector

      public final Vec3 getViewVector(float pPartialTicks)
    • getViewXRot

      public float getViewXRot(float pPartialTicks)
    • getViewYRot

      public float getViewYRot(float pPartialTick)
    • calculateViewVector

      protected final Vec3 calculateViewVector(float pXRot, float pYRot)
    • getUpVector

      public final Vec3 getUpVector(float pPartialTicks)
    • calculateUpVector

      protected final Vec3 calculateUpVector(float pXRot, float pYRot)
    • getEyePosition

      public final Vec3 getEyePosition()
    • getEyePosition

      public final Vec3 getEyePosition(float pPartialTicks)
    • getLightProbePosition

      public Vec3 getLightProbePosition(float pPartialTicks)
    • getPosition

      public final Vec3 getPosition(float pPartialTicks)
    • pick

      public HitResult pick(double pHitDistance, float pPartialTicks, boolean pHitFluids)
    • canBeHitByProjectile

      public boolean canBeHitByProjectile()
    • isPickable

      public boolean isPickable()
    • isPushable

      public boolean isPushable()
    • awardKillScore

      public void awardKillScore(Entity pKilled, int pScoreValue, DamageSource pSource)
    • shouldRender

      public boolean shouldRender(double pX, double pY, double pZ)
    • shouldRenderAtSqrDistance

      public boolean shouldRenderAtSqrDistance(double pDistance)
    • saveAsPassenger

      public boolean saveAsPassenger(CompoundTag pCompound)
    • save

      public boolean save(CompoundTag pCompound)
    • saveWithoutId

      public CompoundTag saveWithoutId(CompoundTag pCompound)
    • load

      public void load(CompoundTag pCompound)
    • repositionEntityAfterLoad

      protected boolean repositionEntityAfterLoad()
    • getEncodeId

      @Nullable public final String getEncodeId()
    • readAdditionalSaveData

      protected abstract void readAdditionalSaveData(CompoundTag pCompound)
    • addAdditionalSaveData

      protected abstract void addAdditionalSaveData(CompoundTag pCompound)
    • newDoubleList

      protected ListTag newDoubleList(double... pNumbers)
    • newFloatList

      protected ListTag newFloatList(float... pNumbers)
    • spawnAtLocation

      @Nullable public ItemEntity spawnAtLocation(ItemLike pItem)
    • spawnAtLocation

      @Nullable public ItemEntity spawnAtLocation(ItemLike pItem, int pOffsetY)
    • spawnAtLocation

      @Nullable public ItemEntity spawnAtLocation(ItemStack pStack)
    • spawnAtLocation

      @Nullable public ItemEntity spawnAtLocation(ItemStack pStack, float pOffsetY)
    • isAlive

      public boolean isAlive()
    • isInWall

      public boolean isInWall()
    • interact

      public InteractionResult interact(Player pPlayer, InteractionHand pHand)
    • canCollideWith

      public boolean canCollideWith(Entity pEntity)
    • canBeCollidedWith

      public boolean canBeCollidedWith()
    • rideTick

      public void rideTick()
    • positionRider

      public final void positionRider(Entity pPassenger)
    • positionRider

      protected void positionRider(Entity pPassenger, Entity.MoveFunction pCallback)
    • onPassengerTurned

      public void onPassengerTurned(Entity pEntityToUpdate)
    • getMyRidingOffset

      public double getMyRidingOffset()
    • getPassengersRidingOffset

      public double getPassengersRidingOffset()
    • startRiding

      public boolean startRiding(Entity pVehicle)
    • showVehicleHealth

      public boolean showVehicleHealth()
    • startRiding

      public boolean startRiding(Entity pVehicle, boolean pForce)
    • canRide

      protected boolean canRide(Entity pVehicle)
    • canEnterPose

      protected boolean canEnterPose(Pose pPose)
    • ejectPassengers

      public void ejectPassengers()
    • removeVehicle

      public void removeVehicle()
    • stopRiding

      public void stopRiding()
    • addPassenger

      protected void addPassenger(Entity pPassenger)
    • removePassenger

      protected void removePassenger(Entity pPassenger)
    • canAddPassenger

      protected boolean canAddPassenger(Entity pPassenger)
    • couldAcceptPassenger

      @Deprecated protected boolean couldAcceptPassenger()
      已过时。
    • lerpTo

      public void lerpTo(double pX, double pY, double pZ, float pYRot, float pXRot, int pLerpSteps, boolean pTeleport)
    • lerpHeadTo

      public void lerpHeadTo(float pYaw, int pPitch)
    • getPickRadius

      public float getPickRadius()
    • getLookAngle

      public Vec3 getLookAngle()
    • getHandHoldingItemAngle

      public Vec3 getHandHoldingItemAngle(Item pItem)
    • getRotationVector

      public Vec2 getRotationVector()
    • getForward

      public Vec3 getForward()
    • handleInsidePortal

      public void handleInsidePortal(BlockPos pPos)
    • handleNetherPortal

      protected void handleNetherPortal()
    • getDimensionChangingDelay

      public int getDimensionChangingDelay()
    • lerpMotion

      public void lerpMotion(double pX, double pY, double pZ)
    • handleDamageEvent

      public void handleDamageEvent(DamageSource pDamageSource)
    • handleEntityEvent

      public void handleEntityEvent(byte pId)
    • animateHurt

      public void animateHurt(float pYaw)
    • getHandSlots

      public Iterable<ItemStack> getHandSlots()
    • getArmorSlots

      public Iterable<ItemStack> getArmorSlots()
    • getAllSlots

      public Iterable<ItemStack> getAllSlots()
    • setItemSlot

      public void setItemSlot(EquipmentSlot pSlot, ItemStack pStack)
    • isOnFire

      public boolean isOnFire()
    • isPassenger

      public boolean isPassenger()
    • isVehicle

      public boolean isVehicle()
    • dismountsUnderwater

      public boolean dismountsUnderwater()
    • setShiftKeyDown

      public void setShiftKeyDown(boolean pKeyDown)
    • 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 pSprinting)
    • isSwimming

      public boolean isSwimming()
    • isVisuallySwimming

      public boolean isVisuallySwimming()
    • isVisuallyCrawling

      public boolean isVisuallyCrawling()
    • setSwimming

      public void setSwimming(boolean pSwimming)
    • hasGlowingTag

      public final boolean hasGlowingTag()
    • setGlowingTag

      public final void setGlowingTag(boolean pHasGlowingTag)
    • isCurrentlyGlowing

      public boolean isCurrentlyGlowing()
    • isInvisible

      public boolean isInvisible()
    • isInvisibleTo

      public boolean isInvisibleTo(Player pPlayer)
    • isOnRails

      public boolean isOnRails()
    • updateDynamicGameEventListener

      public void updateDynamicGameEventListener(BiConsumer<DynamicGameEventListener<?>,ServerLevel> pListenerConsumer)
    • getTeam

      @Nullable public Team getTeam()
    • isAlliedTo

      public boolean isAlliedTo(Entity pEntity)
    • isAlliedTo

      public boolean isAlliedTo(Team pTeam)
    • setInvisible

      public void setInvisible(boolean pInvisible)
    • getSharedFlag

      protected boolean getSharedFlag(int pFlag)
    • setSharedFlag

      protected void setSharedFlag(int pFlag, boolean pSet)
    • getMaxAirSupply

      public int getMaxAirSupply()
    • getAirSupply

      public int getAirSupply()
    • setAirSupply

      public void setAirSupply(int pAir)
    • getTicksFrozen

      public int getTicksFrozen()
    • setTicksFrozen

      public void setTicksFrozen(int pTicksFrozen)
    • getPercentFrozen

      public float getPercentFrozen()
    • isFullyFrozen

      public boolean isFullyFrozen()
    • getTicksRequiredToFreeze

      public int getTicksRequiredToFreeze()
    • thunderHit

      public void thunderHit(ServerLevel pLevel, LightningBolt pLightning)
    • onAboveBubbleCol

      public void onAboveBubbleCol(boolean pDownwards)
    • onInsideBubbleColumn

      public void onInsideBubbleColumn(boolean pDownwards)
    • killedEntity

      public boolean killedEntity(ServerLevel pLevel, LivingEntity pEntity)
    • checkSlowFallDistance

      public void checkSlowFallDistance()
    • resetFallDistance

      public void resetFallDistance()
    • moveTowardsClosestSpace

      protected void moveTowardsClosestSpace(double pX, double pY, double pZ)
    • makeStuckInBlock

      public void makeStuckInBlock(BlockState pState, Vec3 pMotionMultiplier)
    • removeAction

      private static Component removeAction(Component pName)
    • getName

      public Component getName()
      指定者:
      getName 在接口中 Nameable
    • getTypeName

      protected Component getTypeName()
    • is

      public boolean is(Entity pEntity)
    • getYHeadRot

      public float getYHeadRot()
    • setYHeadRot

      public void setYHeadRot(float pYHeadRot)
    • setYBodyRot

      public void setYBodyRot(float pYBodyRot)
    • isAttackable

      public boolean isAttackable()
    • skipAttackInteraction

      public boolean skipAttackInteraction(Entity pEntity)
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • isInvulnerableTo

      public boolean isInvulnerableTo(DamageSource pSource)
    • isInvulnerable

      public boolean isInvulnerable()
    • setInvulnerable

      public void setInvulnerable(boolean pIsInvulnerable)
    • copyPosition

      public void copyPosition(Entity pEntity)
    • restoreFrom

      public void restoreFrom(Entity pEntity)
    • changeDimension

      @Nullable public Entity changeDimension(ServerLevel pDestination)
    • changeDimension

      @Nullable public Entity changeDimension(ServerLevel pDestination, ITeleporter teleporter)
    • removeAfterChangingDimensions

      protected void removeAfterChangingDimensions()
    • findDimensionEntryPoint

      @Nullable protected PortalInfo findDimensionEntryPoint(ServerLevel pDestination)
    • getRelativePortalPosition

      protected Vec3 getRelativePortalPosition(Direction.Axis pAxis, BlockUtil.FoundRectangle pPortal)
    • getExitPortal

      protected Optional<BlockUtil.FoundRectangle> getExitPortal(ServerLevel pDestination, BlockPos pFindFrom, boolean pIsToNether, WorldBorder pWorldBorder)
    • canChangeDimensions

      public boolean canChangeDimensions()
    • getBlockExplosionResistance

      public float getBlockExplosionResistance(Explosion pExplosion, BlockGetter pLevel, BlockPos pPos, BlockState pBlockState, FluidState pFluidState, float pExplosionPower)
    • shouldBlockExplode

      public boolean shouldBlockExplode(Explosion pExplosion, BlockGetter pLevel, BlockPos pPos, BlockState pBlockState, float pExplosionPower)
    • getMaxFallDistance

      public int getMaxFallDistance()
    • isIgnoringBlockTriggers

      public boolean isIgnoringBlockTriggers()
    • fillCrashReportCategory

      public void fillCrashReportCategory(CrashReportCategory pCategory)
    • displayFireAnimation

      public boolean displayFireAnimation()
    • setUUID

      public void setUUID(UUID pUniqueId)
    • getUUID

      public UUID getUUID()
      指定者:
      getUUID 在接口中 EntityAccess
    • getStringUUID

      public String getStringUUID()
    • getScoreboardName

      public String getScoreboardName()
    • isPushedByFluid

      @Deprecated public boolean isPushedByFluid()
      已过时。
    • getViewScale

      public static double getViewScale()
    • setViewScale

      public static void setViewScale(double pRenderDistWeight)
    • getDisplayName

      public Component getDisplayName()
      指定者:
      getDisplayName 在接口中 Nameable
    • setCustomName

      public void setCustomName(@Nullable Component pName)
    • getCustomName

      @Nullable public Component getCustomName()
      指定者:
      getCustomName 在接口中 Nameable
    • hasCustomName

      public boolean hasCustomName()
      指定者:
      hasCustomName 在接口中 Nameable
    • setCustomNameVisible

      public void setCustomNameVisible(boolean pAlwaysRenderNameTag)
    • isCustomNameVisible

      public boolean isCustomNameVisible()
    • teleportToWithTicket

      public final void teleportToWithTicket(double pX, double pY, double pZ)
    • teleportTo

      public boolean teleportTo(ServerLevel pLevel, double pX, double pY, double pZ, Set<RelativeMovement> pRelativeMovements, float pYRot, float pXRot)
    • dismountTo

      public void dismountTo(double pX, double pY, double pZ)
    • teleportTo

      public void teleportTo(double pX, double pY, double pZ)
    • teleportPassengers

      private void teleportPassengers()
    • teleportRelative

      public void teleportRelative(double pDx, double pDy, double pDz)
    • shouldShowName

      public boolean shouldShowName()
    • onSyncedDataUpdated

      public void onSyncedDataUpdated(List<SynchedEntityData.DataValue<?>> pDataValues)
    • onSyncedDataUpdated

      public void onSyncedDataUpdated(EntityDataAccessor<?> pKey)
    • fixupDimensions

      @Deprecated protected void fixupDimensions()
      已过时。
    • refreshDimensions

      public void refreshDimensions()
    • getDirection

      public Direction getDirection()
    • getMotionDirection

      public Direction getMotionDirection()
    • createHoverEvent

      protected HoverEvent createHoverEvent()
    • broadcastToPlayer

      public boolean broadcastToPlayer(ServerPlayer pPlayer)
    • getBoundingBox

      public final AABB getBoundingBox()
      指定者:
      getBoundingBox 在接口中 EntityAccess
    • getBoundingBoxForCulling

      public AABB getBoundingBoxForCulling()
    • getBoundingBoxForPose

      protected AABB getBoundingBoxForPose(Pose pPose)
    • setBoundingBox

      public final void setBoundingBox(AABB pBb)
    • getEyeHeight

      protected float getEyeHeight(Pose pPose, EntityDimensions pDimensions)
    • getEyeHeight

      public float getEyeHeight(Pose pPose)
    • getEyeHeight

      public final float getEyeHeight()
    • getLeashOffset

      public Vec3 getLeashOffset(float pPartialTick)
    • getLeashOffset

      protected Vec3 getLeashOffset()
    • getSlot

      public SlotAccess getSlot(int pSlot)
    • sendSystemMessage

      public void sendSystemMessage(Component pComponent)
      指定者:
      sendSystemMessage 在接口中 CommandSource
    • getCommandSenderWorld

      public Level getCommandSenderWorld()
    • getServer

      @Nullable public MinecraftServer getServer()
    • interactAt

      public InteractionResult interactAt(Player pPlayer, Vec3 pVec, InteractionHand pHand)
    • ignoreExplosion

      public boolean ignoreExplosion()
    • doEnchantDamageEffects

      public void doEnchantDamageEffects(LivingEntity pAttacker, Entity pTarget)
    • startSeenByPlayer

      public void startSeenByPlayer(ServerPlayer pServerPlayer)
    • stopSeenByPlayer

      public void stopSeenByPlayer(ServerPlayer pServerPlayer)
    • rotate

      public float rotate(Rotation pTransformRotation)
    • mirror

      public float mirror(Mirror pTransformMirror)
    • onlyOpCanSetNbt

      public boolean onlyOpCanSetNbt()
    • getControllingPassenger

      @Nullable public LivingEntity getControllingPassenger()
    • hasControllingPassenger

      public final boolean hasControllingPassenger()
    • getPassengers

      public final List<Entity> getPassengers()
    • getFirstPassenger

      @Nullable public Entity getFirstPassenger()
    • hasPassenger

      public boolean hasPassenger(Entity pEntity)
    • hasPassenger

      public boolean hasPassenger(Predicate<Entity> pPredicate)
    • getIndirectPassengersStream

      private Stream<Entity> getIndirectPassengersStream()
    • getSelfAndPassengers

      public Stream<Entity> getSelfAndPassengers()
      指定者:
      getSelfAndPassengers 在接口中 EntityAccess
    • getPassengersAndSelf

      public Stream<Entity> getPassengersAndSelf()
      指定者:
      getPassengersAndSelf 在接口中 EntityAccess
    • getIndirectPassengers

      public Iterable<Entity> getIndirectPassengers()
    • hasExactlyOnePlayerPassenger

      public boolean hasExactlyOnePlayerPassenger()
    • getRootVehicle

      public Entity getRootVehicle()
    • isPassengerOfSameVehicle

      public boolean isPassengerOfSameVehicle(Entity pEntity)
    • hasIndirectPassenger

      public boolean hasIndirectPassenger(Entity pEntity)
    • isControlledByLocalInstance

      public boolean isControlledByLocalInstance()
    • isEffectiveAi

      public boolean isEffectiveAi()
    • getCollisionHorizontalEscapeVector

      protected static Vec3 getCollisionHorizontalEscapeVector(double pVehicleWidth, double pPassengerWidth, float pYRot)
    • getDismountLocationForPassenger

      public Vec3 getDismountLocationForPassenger(LivingEntity pPassenger)
    • getVehicle

      @Nullable public Entity getVehicle()
    • getControlledVehicle

      @Nullable public Entity getControlledVehicle()
    • getPistonPushReaction

      public PushReaction getPistonPushReaction()
    • getSoundSource

      public SoundSource getSoundSource()
    • getFireImmuneTicks

      protected int getFireImmuneTicks()
    • createCommandSourceStack

      public CommandSourceStack createCommandSourceStack()
    • getPermissionLevel

      protected int getPermissionLevel()
    • hasPermissions

      public boolean hasPermissions(int pLevel)
    • acceptsSuccess

      public boolean acceptsSuccess()
      指定者:
      acceptsSuccess 在接口中 CommandSource
    • acceptsFailure

      public boolean acceptsFailure()
      指定者:
      acceptsFailure 在接口中 CommandSource
    • shouldInformAdmins

      public boolean shouldInformAdmins()
      指定者:
      shouldInformAdmins 在接口中 CommandSource
    • lookAt

      public void lookAt(EntityAnchorArgument.Anchor pAnchor, Vec3 pTarget)
    • updateFluidHeightAndDoFluidPushing

      @Deprecated public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> pFluidTag, double pMotionScale)
      已过时。
    • updateFluidHeightAndDoFluidPushing

      public void updateFluidHeightAndDoFluidPushing()
    • touchingUnloadedChunk

      public boolean touchingUnloadedChunk()
    • getFluidHeight

      @Deprecated public double getFluidHeight(TagKey<Fluid> pFluidTag)
      已过时。
    • getFluidJumpThreshold

      public double getFluidJumpThreshold()
    • getBbWidth

      public final float getBbWidth()
    • getBbHeight

      public final float getBbHeight()
    • getNameTagOffsetY

      public float getNameTagOffsetY()
    • getAddEntityPacket

      public Packet<ClientGamePacketListener> getAddEntityPacket()
    • getDimensions

      public EntityDimensions getDimensions(Pose pPose)
    • position

      public Vec3 position()
    • trackingPosition

      public Vec3 trackingPosition()
    • blockPosition

      public BlockPos blockPosition()
      指定者:
      blockPosition 在接口中 EntityAccess
    • getFeetBlockState

      public BlockState getFeetBlockState()
    • chunkPosition

      public ChunkPos chunkPosition()
    • getDeltaMovement

      public Vec3 getDeltaMovement()
    • setDeltaMovement

      public void setDeltaMovement(Vec3 pDeltaMovement)
    • addDeltaMovement

      public void addDeltaMovement(Vec3 pAddend)
    • setDeltaMovement

      public void setDeltaMovement(double pX, double pY, double pZ)
    • getBlockX

      public final int getBlockX()
    • getX

      public final double getX()
    • getX

      public double getX(double pScale)
    • getRandomX

      public double getRandomX(double pScale)
    • getBlockY

      public final int getBlockY()
    • getY

      public final double getY()
    • getY

      public double getY(double pScale)
    • getRandomY

      public double getRandomY()
    • getEyeY

      public double getEyeY()
    • getBlockZ

      public final int getBlockZ()
    • getZ

      public final double getZ()
    • getZ

      public double getZ(double pScale)
    • getRandomZ

      public double getRandomZ(double pScale)
    • setPosRaw

      public final void setPosRaw(double pX, double pY, double pZ)
    • checkDespawn

      public void checkDespawn()
    • getRopeHoldPosition

      public Vec3 getRopeHoldPosition(float pPartialTicks)
    • recreateFromPacket

      public void recreateFromPacket(ClientboundAddEntityPacket pPacket)
    • getPickResult

      @Nullable public ItemStack getPickResult()
    • setIsInPowderSnow

      public void setIsInPowderSnow(boolean pIsInPowderSnow)
    • canFreeze

      public boolean canFreeze()
    • isFreezing

      public boolean isFreezing()
    • getYRot

      public float getYRot()
    • getVisualRotationYInDegrees

      public float getVisualRotationYInDegrees()
    • setYRot

      public void setYRot(float pYRot)
    • getXRot

      public float getXRot()
    • setXRot

      public void setXRot(float pXRot)
    • canSprint

      public boolean canSprint()
    • maxUpStep

      @Deprecated public float maxUpStep()
      已过时。
      Use IForgeEntity.getStepHeight() to get the real step height value.
      Gets the value of the legacy maxUpStep field. Only used by players when the modified value causes issues.
    • setMaxUpStep

      @Deprecated public void setMaxUpStep(float pMaxUpStep)
      已过时。
      Use attribute modifiers for the ForgeMod#STEP_HEIGHT attribute.
      Changes the legacy maxUpStep field. Only used by vanilla entities to improve maintainability.

      For your own entities, you should change the default value of ForgeMod#STEP_HEIGHT during attribute creation.

      For modifying the step height of other entities, you should use AttributeModifiers for ForgeMod#STEP_HEIGHT.

    • isRemoved

      public final boolean isRemoved()
    • getRemovalReason

      @Nullable public Entity.RemovalReason getRemovalReason()
    • setRemoved

      public final void setRemoved(Entity.RemovalReason pRemovalReason)
      指定者:
      setRemoved 在接口中 EntityAccess
    • unsetRemoved

      protected void unsetRemoved()
    • setLevelCallback

      public void setLevelCallback(EntityInLevelCallback pLevelCallback)
      指定者:
      setLevelCallback 在接口中 EntityAccess
    • shouldBeSaved

      public boolean shouldBeSaved()
      指定者:
      shouldBeSaved 在接口中 EntityAccess
    • isAlwaysTicking

      public boolean isAlwaysTicking()
      指定者:
      isAlwaysTicking 在接口中 EntityAccess
    • mayInteract

      public boolean mayInteract(Level pLevel, BlockPos pPos)
    • canUpdate

      public void canUpdate(boolean value)
      指定者:
      canUpdate 在接口中 IForgeEntity
    • canUpdate

      public boolean canUpdate()
      指定者:
      canUpdate 在接口中 IForgeEntity
    • captureDrops

      public Collection<ItemEntity> captureDrops()
      指定者:
      captureDrops 在接口中 IForgeEntity
    • captureDrops

      public Collection<ItemEntity> captureDrops(Collection<ItemEntity> value)
      指定者:
      captureDrops 在接口中 IForgeEntity
    • getPersistentData

      public CompoundTag getPersistentData()
      从接口复制的说明: IForgeEntity
      Returns a NBTTagCompound that can be used to store custom data for this entity. It will be written, and read from disc, so it persists over world saves.
      指定者:
      getPersistentData 在接口中 IForgeEntity
      返回:
      A NBTTagCompound
    • canTrample

      public boolean canTrample(BlockState state, BlockPos pos, float fallDistance)
      从接口复制的说明: IForgeEntity
      Checks if this Entity can trample a Block.
      指定者:
      canTrample 在接口中 IForgeEntity
      pos - The block pos
      fallDistance - The fall distance
      返回:
      true if this entity can trample, false otherwise
    • isAddedToWorld

      public final boolean isAddedToWorld()
      从接口复制的说明: IForgeEntity
      Gets whether this entity has been added to a world (for tracking). Specifically between the times when an entity is added to a world and the entity being removed from the world's tracked lists.
      指定者:
      isAddedToWorld 在接口中 IForgeEntity
      返回:
      True if this entity is being tracked by a world
    • onAddedToWorld

      public void onAddedToWorld()
      从接口复制的说明: IForgeEntity
      Called after the entity has been added to the world's ticking list. Can be overriden, but needs to call super to prevent MC-136995.
      指定者:
      onAddedToWorld 在接口中 IForgeEntity
    • onRemovedFromWorld

      public void onRemovedFromWorld()
      从接口复制的说明: IForgeEntity
      Called after the entity has been removed to the world's ticking list. Can be overriden, but needs to call super to prevent MC-136995.
      指定者:
      onRemovedFromWorld 在接口中 IForgeEntity
    • revive

      public void revive()
      从接口复制的说明: IForgeEntity
      Revives an entity that has been removed from a world. Used as replacement for entity.removed = true. Having it as a function allows the entity to react to being revived.
      指定者:
      revive 在接口中 IForgeEntity
    • getEyeHeightAccess

      public float getEyeHeightAccess(Pose pose, EntityDimensions size)
    • setFluidTypeHeight

      protected final void setFluidTypeHeight(FluidType type, double height)
    • getFluidTypeHeight

      public final double getFluidTypeHeight(FluidType type)
      从接口复制的说明: IForgeEntity
      Returns the height of the fluid type in relation to the bounding box of the entity. If the entity is not in the fluid type, then 0 is returned.
      指定者:
      getFluidTypeHeight 在接口中 IForgeEntity
      参数:
      type - the type of the fluid
      返回:
      the height of the fluid compared to the entity
    • isInFluidType

      public final boolean isInFluidType(BiPredicate<FluidType,Double> predicate, boolean forAllTypes)
      从接口复制的说明: IForgeEntity
      Returns whether the fluid type the entity is currently in matches the specified condition.
      指定者:
      isInFluidType 在接口中 IForgeEntity
      参数:
      predicate - a test taking in the fluid type and its height
      forAllTypes - 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()
      从接口复制的说明: IForgeEntity
      Returns whether the entity is in a fluid.
      指定者:
      isInFluidType 在接口中 IForgeEntity
      返回:
      true if the entity is in a fluid, false otherwise
    • getEyeInFluidType

      public final FluidType getEyeInFluidType()
      从接口复制的说明: IForgeEntity
      Returns the fluid that is on the entity's eyes.
      指定者:
      getEyeInFluidType 在接口中 IForgeEntity
      返回:
      the fluid that is on the entity's eyes
    • getMaxHeightFluidType

      public FluidType getMaxHeightFluidType()
      从接口复制的说明: IForgeEntity
      Returns the fluid type which is the highest on the bounding box of the entity.
      指定者:
      getMaxHeightFluidType 在接口中 IForgeEntity
      返回:
      the fluid type which is the highest on the bounding box of the entity
    • level

      public Level level()
    • setLevel

      protected void setLevel(Level pLevel)
    • damageSources

      public DamageSources damageSources()