public abstract class Entity extends CapabilityProvider<Entity> implements INameable, ICommandSource, IForgeEntity
Modifier and Type | Class and Description |
---|---|
static interface |
Entity.IMoveCallback |
Modifier and Type | Field and Description |
---|---|
private AxisAlignedBB |
bb |
private BlockPos |
blockPosition |
boolean |
blocksBuilding |
protected int |
boardingCooldown |
private boolean |
canUpdate |
private java.util.Collection<ItemEntity> |
captureDrops |
private static DataParameter<java.lang.Integer> |
DATA_AIR_SUPPLY_ID |
private static DataParameter<java.util.Optional<ITextComponent>> |
DATA_CUSTOM_NAME |
private static DataParameter<java.lang.Boolean> |
DATA_CUSTOM_NAME_VISIBLE |
private static DataParameter<java.lang.Boolean> |
DATA_NO_GRAVITY |
protected static DataParameter<Pose> |
DATA_POSE |
protected static DataParameter<java.lang.Byte> |
DATA_SHARED_FLAGS_ID |
private static DataParameter<java.lang.Boolean> |
DATA_SILENT |
private Vector3d |
deltaMovement |
private EntitySize |
dimensions |
private static java.util.List<ItemStack> |
EMPTY_LIST |
private static java.util.concurrent.atomic.AtomicInteger |
ENTITY_COUNTER |
protected EntityDataManager |
entityData |
private float |
eyeHeight |
float |
fallDistance |
protected boolean |
firstTick |
protected it.unimi.dsi.fastutil.objects.Object2DoubleMap<ITag<Fluid>> |
fluidHeight |
protected ITag<Fluid> |
fluidOnEyes |
private boolean |
forceChunkAddition |
boolean |
forcedLoading |
protected boolean |
glowing |
boolean |
hasImpulse |
boolean |
horizontalCollision |
boolean |
hurtMarked |
private int |
id |
boolean |
inChunk |
private static AxisAlignedBB |
INITIAL_AABB |
private boolean |
invulnerable |
int |
invulnerableTime |
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.
|
protected boolean |
isInsidePortal |
World |
level |
protected static org.apache.logging.log4j.Logger |
LOGGER |
float |
maxUpStep |
float |
moveDist |
private boolean |
movedSinceLastChunkCheck |
private float |
nextFlap |
private float |
nextStep |
boolean |
noCulling |
boolean |
noPhysics |
protected boolean |
onGround |
private Vector3d |
packetCoordinates |
private java.util.List<Entity> |
passengers |
private CompoundNBT |
persistentData |
private double[] |
pistonDeltas |
private long |
pistonDeltasGameTime |
private int |
portalCooldown |
protected BlockPos |
portalEntrancePos |
protected int |
portalTime |
private Vector3d |
position |
float |
pushthrough |
protected java.util.Random |
random |
private int |
remainingFireTicks |
boolean |
removed
Deprecated.
|
protected java.lang.String |
stringUUID |
protected Vector3d |
stuckSpeedMultiplier |
private java.util.Set<java.lang.String> |
tags |
int |
tickCount |
private EntityType<?> |
type
Deprecated.
|
protected java.util.UUID |
uuid |
private Entity |
vehicle |
boolean |
verticalCollision |
private static double |
viewScale |
float |
walkDist |
float |
walkDistO |
protected boolean |
wasEyeInWater |
protected boolean |
wasTouchingWater |
int |
xChunk |
double |
xo |
double |
xOld |
float |
xRot |
float |
xRotO |
int |
yChunk |
double |
yo |
double |
yOld |
float |
yRot |
float |
yRotO |
int |
zChunk |
double |
zo |
double |
zOld |
NULL
Constructor and Description |
---|
Entity(EntityType<?> p_i48580_1_,
World p_i48580_2_) |
Modifier and Type | Method and Description |
---|---|
void |
absMoveTo(double p_242281_1_,
double p_242281_3_,
double p_242281_5_) |
void |
absMoveTo(double p_70080_1_,
double p_70080_3_,
double p_70080_5_,
float p_70080_7_,
float p_70080_8_) |
boolean |
acceptsFailure() |
boolean |
acceptsSuccess() |
protected abstract void |
addAdditionalSaveData(CompoundNBT p_213281_1_) |
protected void |
addPassenger(Entity p_184200_1_) |
boolean |
addTag(java.lang.String p_184211_1_) |
void |
animateHurt() |
private double |
applyPistonMovementRestriction(Direction.Axis p_213304_1_,
double p_213304_2_) |
void |
awardKillScore(Entity p_191956_1_,
int p_191956_2_,
DamageSource p_191956_3_) |
void |
baseTick() |
BlockPos |
blockPosition() |
boolean |
broadcastToPlayer(ServerPlayerEntity p_174827_1_) |
protected Vector3d |
calculateUpVector(float p_213320_1_,
float p_213320_2_) |
protected Vector3d |
calculateViewVector(float p_174806_1_,
float p_174806_2_) |
protected boolean |
canAddPassenger(Entity p_184219_1_) |
boolean |
canBeCollidedWith() |
boolean |
canChangeDimensions() |
boolean |
canCollideWith(Entity p_241849_1_) |
protected boolean |
canEnterPose(Pose p_213298_1_) |
protected boolean |
canRide(Entity p_184228_1_) |
boolean |
canSpawnSprintParticle() |
boolean |
canTrample(BlockState state,
BlockPos pos,
float fallDistance)
Checks if this
Entity can trample a Block . |
boolean |
canUpdate() |
void |
canUpdate(boolean value) |
java.util.Collection<ItemEntity> |
captureDrops() |
java.util.Collection<ItemEntity> |
captureDrops(java.util.Collection<ItemEntity> value) |
boolean |
causeFallDamage(float p_225503_1_,
float p_225503_2_) |
Entity |
changeDimension(ServerWorld p_241206_1_) |
Entity |
changeDimension(ServerWorld p_241206_1_,
ITeleporter teleporter) |
boolean |
checkAndResetForcedChunkAdditionFlag() |
boolean |
checkAndResetUpdateChunkPos() |
void |
checkDespawn() |
protected void |
checkFallDamage(double p_184231_1_,
boolean p_184231_3_,
BlockState p_184231_4_,
BlockPos p_184231_5_) |
protected void |
checkInsideBlocks() |
void |
clearFire() |
boolean |
closerThan(Entity p_233562_1_,
double p_233562_2_) |
private Vector3d |
collide(Vector3d p_213306_1_) |
static Vector3d |
collideBoundingBox(Vector3d p_213313_0_,
AxisAlignedBB p_213313_1_,
IWorldReader p_213313_2_,
ISelectionContext p_213313_3_,
ReuseableStream<VoxelShape> p_213313_4_) |
static Vector3d |
collideBoundingBoxHeuristically(Entity p_223307_0_,
Vector3d p_223307_1_,
AxisAlignedBB p_223307_2_,
World p_223307_3_,
ISelectionContext p_223307_4_,
ReuseableStream<VoxelShape> p_223307_5_) |
static Vector3d |
collideBoundingBoxLegacy(Vector3d p_223310_0_,
AxisAlignedBB p_223310_1_,
ReuseableStream<VoxelShape> p_223310_2_) |
void |
copyPosition(Entity p_82149_1_) |
CommandSource |
createCommandSourceStack() |
protected HoverEvent |
createHoverEvent() |
protected abstract void |
defineSynchedData() |
boolean |
displayFireAnimation() |
float |
distanceTo(Entity p_70032_1_) |
double |
distanceToSqr(double p_70092_1_,
double p_70092_3_,
double p_70092_5_) |
double |
distanceToSqr(Entity p_70068_1_) |
double |
distanceToSqr(Vector3d p_195048_1_) |
void |
doEnchantDamageEffects(LivingEntity p_174815_1_,
Entity p_174815_2_) |
protected void |
doWaterSplashEffect() |
void |
ejectPassengers() |
boolean |
equals(java.lang.Object p_equals_1_) |
void |
fillCrashReportCategory(CrashReportCategory p_85029_1_) |
private void |
fillIndirectPassengers(boolean p_200604_1_,
java.util.Set<Entity> p_200604_2_) |
protected PortalInfo |
findDimensionEntryPoint(ServerWorld p_241829_1_) |
boolean |
fireImmune() |
abstract IPacket<?> |
getAddEntityPacket() |
int |
getAirSupply() |
java.lang.Iterable<ItemStack> |
getAllSlots() |
java.lang.Iterable<ItemStack> |
getArmorSlots() |
float |
getBbHeight() |
float |
getBbWidth() |
float |
getBlockExplosionResistance(Explosion p_180428_1_,
IBlockReader p_180428_2_,
BlockPos p_180428_3_,
BlockState p_180428_4_,
FluidState p_180428_5_,
float p_180428_6_) |
protected float |
getBlockJumpFactor() |
protected BlockPos |
getBlockPosBelowThatAffectsMyMovement() |
protected float |
getBlockSpeedFactor() |
protected BlockState |
getBlockStateOn() |
AxisAlignedBB |
getBoundingBox() |
AxisAlignedBB |
getBoundingBoxForCulling() |
protected AxisAlignedBB |
getBoundingBoxForPose(Pose p_213321_1_) |
float |
getBrightness() |
protected static Vector3d |
getCollisionHorizontalEscapeVector(double p_233559_0_,
double p_233559_2_,
float p_233559_4_) |
World |
getCommandSenderWorld() |
Entity |
getControllingPassenger() |
ITextComponent |
getCustomName() |
Vector3d |
getDeltaMovement() |
int |
getDimensionChangingDelay() |
EntitySize |
getDimensions(Pose p_213305_1_) |
Direction |
getDirection() |
Vector3d |
getDismountLocationForPassenger(LivingEntity p_230268_1_) |
ITextComponent |
getDisplayName() |
java.lang.String |
getEncodeId() |
EntityDataManager |
getEntityData() |
protected java.util.Optional<TeleportationRepositioner.Result> |
getExitPortal(ServerWorld p_241830_1_,
BlockPos p_241830_2_,
boolean p_241830_3_) |
float |
getEyeHeight() |
float |
getEyeHeight(Pose p_213307_1_) |
protected float |
getEyeHeight(Pose p_213316_1_,
EntitySize p_213316_2_) |
float |
getEyeHeightAccess(Pose pose,
EntitySize size)
Accessor method for
getEyeHeight(Pose, EntitySize) |
Vector3d |
getEyePosition(float p_174824_1_) |
double |
getEyeY() |
protected int |
getFireImmuneTicks() |
double |
getFluidHeight(ITag<Fluid> p_233571_1_) |
double |
getFluidJumpThreshold() |
Vector3d |
getForward() |
java.lang.Iterable<ItemStack> |
getHandSlots() |
static double |
getHorizontalDistanceSqr(Vector3d p_213296_0_) |
int |
getId() |
java.util.Collection<Entity> |
getIndirectPassengers() |
private static Vector3d |
getInputVector(Vector3d p_213299_0_,
float p_213299_1_,
float p_213299_2_) |
Vector3d |
getLeashOffset() |
Vector3d |
getLightProbePosition(float p_241842_1_) |
Vector3d |
getLookAngle() |
int |
getMaxAirSupply() |
int |
getMaxFallDistance() |
Direction |
getMotionDirection() |
double |
getMyRidingOffset() |
ITextComponent |
getName() |
protected BlockPos |
getOnPos() |
Vector3d |
getPacketCoordinates() |
java.util.List<Entity> |
getPassengers() |
double |
getPassengersRidingOffset() |
protected int |
getPermissionLevel() |
CompoundNBT |
getPersistentData()
Returns a NBTTagCompound that can be used to store custom data for this entity.
|
float |
getPickRadius() |
PushReaction |
getPistonPushReaction() |
int |
getPortalWaitTime() |
Pose |
getPose() |
Vector3d |
getPosition(float p_242282_1_) |
double |
getRandomX(double p_226282_1_) |
double |
getRandomY() |
double |
getRandomZ(double p_226287_1_) |
protected Vector3d |
getRelativePortalPosition(Direction.Axis p_241839_1_,
TeleportationRepositioner.Result p_241839_2_) |
int |
getRemainingFireTicks() |
Entity |
getRootVehicle() |
Vector3d |
getRopeHoldPosition(float p_241843_1_) |
Vector2f |
getRotationVector() |
java.lang.String |
getScoreboardName() |
java.util.stream.Stream<Entity> |
getSelfAndPassengers() |
MinecraftServer |
getServer() |
protected boolean |
getSharedFlag(int p_70083_1_) |
SoundCategory |
getSoundSource() |
java.lang.String |
getStringUUID() |
protected SoundEvent |
getSwimHighSpeedSplashSound() |
protected SoundEvent |
getSwimSound() |
protected SoundEvent |
getSwimSplashSound() |
java.util.Set<java.lang.String> |
getTags() |
Team |
getTeam() |
int |
getTeamColor() |
EntityType<?> |
getType() |
protected ITextComponent |
getTypeName() |
Vector3d |
getUpVector(float p_213286_1_) |
java.util.UUID |
getUUID() |
Entity |
getVehicle() |
static double |
getViewScale() |
Vector3d |
getViewVector(float p_70676_1_) |
float |
getViewXRot(float p_195050_1_) |
float |
getViewYRot(float p_195046_1_) |
double |
getX() |
double |
getX(double p_226275_1_) |
double |
getY() |
double |
getY(double p_226283_1_) |
float |
getYHeadRot() |
double |
getZ() |
double |
getZ(double p_226285_1_) |
void |
handleEntityEvent(byte p_70103_1_) |
void |
handleInsidePortal(BlockPos p_181015_1_) |
protected void |
handleNetherPortal() |
boolean |
hasCustomName() |
int |
hashCode() |
boolean |
hasIndirectPassenger(Entity p_184215_1_) |
boolean |
hasOnePlayerPassenger() |
boolean |
hasPassenger(java.lang.Class<? extends Entity> p_205708_1_) |
boolean |
hasPassenger(Entity p_184196_1_) |
boolean |
hasPermissions(int p_211513_1_) |
boolean |
hurt(DamageSource p_70097_1_,
float p_70097_2_) |
boolean |
ignoreExplosion() |
ActionResultType |
interact(PlayerEntity p_184230_1_,
Hand p_184230_2_) |
ActionResultType |
interactAt(PlayerEntity p_184199_1_,
Vector3d p_184199_2_,
Hand p_184199_3_) |
boolean |
is(Entity p_70028_1_) |
boolean |
isAddedToWorld()
Gets whether this entity has been added to a world (for tracking).
|
boolean |
isAlive() |
boolean |
isAlliedTo(Entity p_184191_1_) |
boolean |
isAlliedTo(Team p_184194_1_) |
boolean |
isAttackable() |
boolean |
isColliding(BlockPos p_242278_1_,
BlockState p_242278_2_) |
boolean |
isControlledByLocalInstance() |
boolean |
isCrouching() |
boolean |
isCustomNameVisible() |
boolean |
isDescending() |
boolean |
isDiscrete() |
boolean |
isEyeInFluid(ITag<Fluid> p_208600_1_) |
private boolean |
isFree(AxisAlignedBB p_174809_1_) |
boolean |
isFree(double p_70038_1_,
double p_70038_3_,
double p_70038_5_) |
boolean |
isGlowing() |
boolean |
isIgnoringBlockTriggers() |
private boolean |
isInBubbleColumn() |
boolean |
isInLava() |
private boolean |
isInRain() |
boolean |
isInvisible() |
boolean |
isInvisibleTo(PlayerEntity p_98034_1_) |
boolean |
isInvulnerable() |
boolean |
isInvulnerableTo(DamageSource p_180431_1_) |
boolean |
isInWall() |
boolean |
isInWater() |
boolean |
isInWaterOrBubble() |
boolean |
isInWaterOrRain() |
boolean |
isInWaterRainOrBubble() |
protected boolean |
isMovementNoisy() |
boolean |
isNoGravity() |
boolean |
isOnFire() |
boolean |
isOnGround() |
boolean |
isOnPortalCooldown() |
boolean |
isPassenger() |
boolean |
isPassengerOfSameVehicle(Entity p_184223_1_) |
boolean |
isPickable() |
boolean |
isPushable() |
boolean |
isPushedByFluid() |
boolean |
isShiftKeyDown() |
boolean |
isSilent() |
boolean |
isSpectator() |
boolean |
isSprinting() |
boolean |
isSteppingCarefully() |
boolean |
isSuppressingBounce() |
boolean |
isSwimming() |
boolean |
isUnderWater() |
boolean |
isVehicle() |
boolean |
isVisuallyCrawling() |
boolean |
isVisuallySwimming() |
void |
kill() |
void |
killed(ServerWorld p_241847_1_,
LivingEntity p_241847_2_) |
protected void |
lavaHurt() |
void |
lerpHeadTo(float p_208000_1_,
int p_208000_2_) |
void |
lerpMotion(double p_70016_1_,
double p_70016_3_,
double p_70016_5_) |
void |
lerpTo(double p_180426_1_,
double p_180426_3_,
double p_180426_5_,
float p_180426_7_,
float p_180426_8_,
int p_180426_9_,
boolean p_180426_10_) |
protected Vector3d |
limitPistonMovement(Vector3d p_213308_1_) |
void |
load(CompoundNBT p_70020_1_) |
void |
lookAt(EntityAnchorArgument.Type p_200602_1_,
Vector3d p_200602_2_) |
protected boolean |
makeFlySound() |
void |
makeStuckInBlock(BlockState p_213295_1_,
Vector3d p_213295_2_) |
protected void |
markHurt() |
protected Vector3d |
maybeBackOffFromEdge(Vector3d p_225514_1_,
MoverType p_225514_2_) |
float |
mirror(Mirror p_184217_1_) |
void |
move(MoverType p_213315_1_,
Vector3d p_213315_2_) |
void |
moveRelative(float p_213309_1_,
Vector3d p_213309_2_) |
void |
moveTo(BlockPos p_174828_1_,
float p_174828_2_,
float p_174828_3_) |
void |
moveTo(double p_225653_1_,
double p_225653_3_,
double p_225653_5_) |
void |
moveTo(double p_70012_1_,
double p_70012_3_,
double p_70012_5_,
float p_70012_7_,
float p_70012_8_) |
void |
moveTo(Vector3d p_233576_1_) |
protected void |
moveTowardsClosestSpace(double p_213282_1_,
double p_213282_3_,
double p_213282_5_) |
protected ListNBT |
newDoubleList(double... p_70087_1_) |
protected ListNBT |
newFloatList(float... p_70049_1_) |
protected float |
nextStep() |
void |
onAboveBubbleCol(boolean p_203002_1_) |
void |
onAddedToWorld()
Called after the entity has been added to the world's
ticking list.
|
protected void |
onInsideBlock(BlockState p_191955_1_) |
void |
onInsideBubbleColumn(boolean p_203004_1_) |
boolean |
onlyOpCanSetNbt() |
void |
onPassengerTurned(Entity p_184190_1_) |
void |
onRemovedFromWorld()
Called after the entity has been removed to the world's
ticking list.
|
void |
onSyncedDataUpdated(DataParameter<?> p_184206_1_) |
protected void |
outOfWorld() |
RayTraceResult |
pick(double p_213324_1_,
float p_213324_3_,
boolean p_213324_4_) |
void |
playerTouch(PlayerEntity p_70100_1_) |
protected float |
playFlySound(float p_191954_1_) |
void |
playSound(SoundEvent p_184185_1_,
float p_184185_2_,
float p_184185_3_) |
protected void |
playStepSound(BlockPos p_180429_1_,
BlockState p_180429_2_) |
protected void |
playSwimSound(float p_203006_1_) |
Vector3d |
position() |
void |
positionRider(Entity p_184232_1_) |
private void |
positionRider(Entity p_226266_1_,
Entity.IMoveCallback p_226266_2_) |
protected void |
processPortalCooldown() |
void |
push(double p_70024_1_,
double p_70024_3_,
double p_70024_5_) |
void |
push(Entity p_70108_1_) |
protected abstract void |
readAdditionalSaveData(CompoundNBT p_70037_1_) |
protected void |
reapplyPosition() |
void |
refreshDimensions() |
void |
remove() |
void |
remove(boolean keepData) |
private static ITextComponent |
removeAction(ITextComponent p_233573_0_) |
protected void |
removeAfterChangingDimensions() |
protected void |
removePassenger(Entity p_184225_1_) |
boolean |
removeTag(java.lang.String p_184197_1_) |
void |
removeVehicle() |
protected boolean |
repositionEntityAfterLoad() |
protected void |
resetPos() |
void |
restoreFrom(Entity p_180432_1_) |
void |
revive()
Revives an entity that has been removed from a world.
|
boolean |
rideableUnderWater()
Deprecated.
|
void |
rideTick() |
float |
rotate(Rotation p_184229_1_) |
boolean |
save(CompoundNBT p_70039_1_) |
boolean |
saveAsPassenger(CompoundNBT p_184198_1_) |
CompoundNBT |
saveWithoutId(CompoundNBT p_189511_1_) |
void |
sendMessage(ITextComponent p_145747_1_,
java.util.UUID p_145747_2_) |
void |
setAirSupply(int p_70050_1_) |
void |
setBoundingBox(AxisAlignedBB p_174826_1_) |
void |
setCustomName(ITextComponent p_200203_1_) |
void |
setCustomNameVisible(boolean p_174805_1_) |
void |
setDeltaMovement(double p_213293_1_,
double p_213293_3_,
double p_213293_5_) |
void |
setDeltaMovement(Vector3d p_213317_1_) |
void |
setGlowing(boolean p_184195_1_) |
void |
setId(int p_145769_1_) |
void |
setInvisible(boolean p_82142_1_) |
void |
setInvulnerable(boolean p_184224_1_) |
void |
setItemSlot(EquipmentSlotType p_184201_1_,
ItemStack p_184201_2_) |
void |
setLevel(World p_70029_1_) |
void |
setLocationFromBoundingbox() |
void |
setNoGravity(boolean p_189654_1_) |
void |
setOnGround(boolean p_230245_1_) |
void |
setPacketCoordinates(double p_213312_1_,
double p_213312_3_,
double p_213312_5_) |
void |
setPacketCoordinates(Vector3d p_242277_1_) |
void |
setPortalCooldown() |
void |
setPos(double p_70107_1_,
double p_70107_3_,
double p_70107_5_) |
void |
setPosAndOldPos(double p_226286_1_,
double p_226286_3_,
double p_226286_5_) |
void |
setPose(Pose p_213301_1_) |
void |
setPosRaw(double p_226288_1_,
double p_226288_3_,
double p_226288_5_) |
void |
setRemainingFireTicks(int p_241209_1_) |
protected void |
setRot(float p_70101_1_,
float p_70101_2_) |
void |
setSecondsOnFire(int p_70015_1_) |
protected void |
setSharedFlag(int p_70052_1_,
boolean p_70052_2_) |
void |
setShiftKeyDown(boolean p_226284_1_) |
void |
setSilent(boolean p_174810_1_) |
boolean |
setSlot(int p_174820_1_,
ItemStack p_174820_2_) |
void |
setSprinting(boolean p_70031_1_) |
void |
setSwimming(boolean p_204711_1_) |
void |
setUUID(java.util.UUID p_184221_1_) |
static void |
setViewScale(double p_184227_0_) |
void |
setYBodyRot(float p_181013_1_) |
void |
setYHeadRot(float p_70034_1_) |
boolean |
shouldBlockExplode(Explosion p_174816_1_,
IBlockReader p_174816_2_,
BlockPos p_174816_3_,
BlockState p_174816_4_,
float p_174816_5_) |
boolean |
shouldInformAdmins() |
boolean |
shouldRender(double p_145770_1_,
double p_145770_3_,
double p_145770_5_) |
boolean |
shouldRenderAtSqrDistance(double p_70112_1_) |
boolean |
shouldShowName() |
boolean |
showVehicleHealth() |
boolean |
skipAttackInteraction(Entity p_85031_1_) |
ItemEntity |
spawnAtLocation(IItemProvider p_199703_1_) |
ItemEntity |
spawnAtLocation(IItemProvider p_199702_1_,
int p_199702_2_) |
ItemEntity |
spawnAtLocation(ItemStack p_199701_1_) |
ItemEntity |
spawnAtLocation(ItemStack p_70099_1_,
float p_70099_2_) |
protected void |
spawnSprintParticle() |
boolean |
startRiding(Entity p_184220_1_) |
boolean |
startRiding(Entity p_184205_1_,
boolean p_184205_2_) |
void |
startSeenByPlayer(ServerPlayerEntity p_184178_1_) |
void |
stopRiding() |
void |
stopSeenByPlayer(ServerPlayerEntity p_184203_1_) |
void |
teleportTo(double p_70634_1_,
double p_70634_3_,
double p_70634_5_) |
void |
teleportToWithTicket(double p_223102_1_,
double p_223102_3_,
double p_223102_5_) |
void |
thunderHit(ServerWorld p_241841_1_,
LightningBoltEntity p_241841_2_) |
void |
tick() |
java.lang.String |
toString() |
void |
turn(double p_195049_1_,
double p_195049_3_) |
void |
unRide() |
boolean |
updateFluidHeightAndDoFluidPushing(ITag<Fluid> p_210500_1_,
double p_210500_2_) |
private void |
updateFluidOnEyes() |
protected boolean |
updateInWaterStateAndDoFluidPushing() |
(package private) void |
updateInWaterStateAndDoWaterCurrentPushing() |
void |
updateSwimming() |
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
getCapability, getCapability
protected static final org.apache.logging.log4j.Logger LOGGER
private static final java.util.concurrent.atomic.AtomicInteger ENTITY_COUNTER
private static final java.util.List<ItemStack> EMPTY_LIST
private static final AxisAlignedBB INITIAL_AABB
private static double viewScale
@Deprecated private final EntityType<?> type
private int id
public boolean blocksBuilding
private final java.util.List<Entity> passengers
protected int boardingCooldown
@Nullable private Entity vehicle
public boolean forcedLoading
public World level
public double xo
public double yo
public double zo
private Vector3d position
private BlockPos blockPosition
private Vector3d deltaMovement
public float yRot
public float xRot
public float yRotO
public float xRotO
private AxisAlignedBB bb
protected boolean onGround
public boolean horizontalCollision
public boolean verticalCollision
public boolean hurtMarked
protected Vector3d stuckSpeedMultiplier
@Deprecated public boolean removed
public float walkDistO
public float walkDist
public float moveDist
public float fallDistance
private float nextStep
private float nextFlap
public double xOld
public double yOld
public double zOld
public float maxUpStep
public boolean noPhysics
public float pushthrough
protected final java.util.Random random
public int tickCount
private int remainingFireTicks
protected boolean wasTouchingWater
protected boolean wasEyeInWater
public int invulnerableTime
protected boolean firstTick
protected final EntityDataManager entityData
protected static final DataParameter<java.lang.Byte> DATA_SHARED_FLAGS_ID
private static final DataParameter<java.lang.Integer> DATA_AIR_SUPPLY_ID
private static final DataParameter<java.util.Optional<ITextComponent>> DATA_CUSTOM_NAME
private static final DataParameter<java.lang.Boolean> DATA_CUSTOM_NAME_VISIBLE
private static final DataParameter<java.lang.Boolean> DATA_SILENT
private static final DataParameter<java.lang.Boolean> DATA_NO_GRAVITY
protected static final DataParameter<Pose> DATA_POSE
public boolean inChunk
public int xChunk
public int yChunk
public int zChunk
private boolean movedSinceLastChunkCheck
private Vector3d packetCoordinates
public boolean noCulling
public boolean hasImpulse
private int portalCooldown
protected boolean isInsidePortal
protected int portalTime
protected BlockPos portalEntrancePos
private boolean invulnerable
protected java.util.UUID uuid
protected java.lang.String stringUUID
protected boolean glowing
private final java.util.Set<java.lang.String> tags
private boolean forceChunkAddition
private final double[] pistonDeltas
private long pistonDeltasGameTime
private EntitySize dimensions
private float eyeHeight
private boolean canUpdate
private java.util.Collection<ItemEntity> captureDrops
private CompoundNBT persistentData
private boolean isAddedToWorld
public Entity(EntityType<?> p_i48580_1_, World p_i48580_2_)
public boolean isColliding(BlockPos p_242278_1_, BlockState p_242278_2_)
public int getTeamColor()
public boolean isSpectator()
public final void unRide()
public void setPacketCoordinates(double p_213312_1_, double p_213312_3_, double p_213312_5_)
public void setPacketCoordinates(Vector3d p_242277_1_)
public Vector3d getPacketCoordinates()
public EntityType<?> getType()
public int getId()
public void setId(int p_145769_1_)
public java.util.Set<java.lang.String> getTags()
public boolean addTag(java.lang.String p_184211_1_)
public boolean removeTag(java.lang.String p_184197_1_)
public void kill()
protected abstract void defineSynchedData()
public EntityDataManager getEntityData()
public boolean equals(java.lang.Object p_equals_1_)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
protected void resetPos()
public void remove()
public void remove(boolean keepData)
public void setPose(Pose p_213301_1_)
public Pose getPose()
public boolean closerThan(Entity p_233562_1_, double p_233562_2_)
protected void setRot(float p_70101_1_, float p_70101_2_)
public void setPos(double p_70107_1_, double p_70107_3_, double p_70107_5_)
protected void reapplyPosition()
public void turn(double p_195049_1_, double p_195049_3_)
public void tick()
public void baseTick()
public void setPortalCooldown()
public boolean isOnPortalCooldown()
protected void processPortalCooldown()
public int getPortalWaitTime()
protected void lavaHurt()
public void setSecondsOnFire(int p_70015_1_)
public void setRemainingFireTicks(int p_241209_1_)
public int getRemainingFireTicks()
public void clearFire()
protected void outOfWorld()
public boolean isFree(double p_70038_1_, double p_70038_3_, double p_70038_5_)
private boolean isFree(AxisAlignedBB p_174809_1_)
public void setOnGround(boolean p_230245_1_)
public boolean isOnGround()
protected BlockPos getOnPos()
protected float getBlockJumpFactor()
protected float getBlockSpeedFactor()
protected BlockPos getBlockPosBelowThatAffectsMyMovement()
protected Vector3d maybeBackOffFromEdge(Vector3d p_225514_1_, MoverType p_225514_2_)
private double applyPistonMovementRestriction(Direction.Axis p_213304_1_, double p_213304_2_)
public static double getHorizontalDistanceSqr(Vector3d p_213296_0_)
public static Vector3d collideBoundingBoxHeuristically(@Nullable Entity p_223307_0_, Vector3d p_223307_1_, AxisAlignedBB p_223307_2_, World p_223307_3_, ISelectionContext p_223307_4_, ReuseableStream<VoxelShape> p_223307_5_)
public static Vector3d collideBoundingBoxLegacy(Vector3d p_223310_0_, AxisAlignedBB p_223310_1_, ReuseableStream<VoxelShape> p_223310_2_)
public static Vector3d collideBoundingBox(Vector3d p_213313_0_, AxisAlignedBB p_213313_1_, IWorldReader p_213313_2_, ISelectionContext p_213313_3_, ReuseableStream<VoxelShape> p_213313_4_)
protected float nextStep()
public void setLocationFromBoundingbox()
protected SoundEvent getSwimSound()
protected SoundEvent getSwimSplashSound()
protected SoundEvent getSwimHighSpeedSplashSound()
protected void checkInsideBlocks()
protected void onInsideBlock(BlockState p_191955_1_)
protected void playStepSound(BlockPos p_180429_1_, BlockState p_180429_2_)
protected void playSwimSound(float p_203006_1_)
protected float playFlySound(float p_191954_1_)
protected boolean makeFlySound()
public void playSound(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_)
public boolean isSilent()
public void setSilent(boolean p_174810_1_)
public boolean isNoGravity()
public void setNoGravity(boolean p_189654_1_)
protected boolean isMovementNoisy()
protected void checkFallDamage(double p_184231_1_, boolean p_184231_3_, BlockState p_184231_4_, BlockPos p_184231_5_)
public boolean fireImmune()
public boolean causeFallDamage(float p_225503_1_, float p_225503_2_)
public boolean isInWater()
private boolean isInRain()
private boolean isInBubbleColumn()
public boolean isInWaterOrRain()
public boolean isInWaterRainOrBubble()
public boolean isInWaterOrBubble()
public boolean isUnderWater()
public void updateSwimming()
protected boolean updateInWaterStateAndDoFluidPushing()
void updateInWaterStateAndDoWaterCurrentPushing()
private void updateFluidOnEyes()
protected void doWaterSplashEffect()
protected BlockState getBlockStateOn()
public boolean canSpawnSprintParticle()
protected void spawnSprintParticle()
public boolean isInLava()
public void moveRelative(float p_213309_1_, Vector3d p_213309_2_)
private static Vector3d getInputVector(Vector3d p_213299_0_, float p_213299_1_, float p_213299_2_)
public float getBrightness()
public void setLevel(World p_70029_1_)
public void absMoveTo(double p_70080_1_, double p_70080_3_, double p_70080_5_, float p_70080_7_, float p_70080_8_)
public void absMoveTo(double p_242281_1_, double p_242281_3_, double p_242281_5_)
public void moveTo(Vector3d p_233576_1_)
public void moveTo(double p_225653_1_, double p_225653_3_, double p_225653_5_)
public void moveTo(BlockPos p_174828_1_, float p_174828_2_, float p_174828_3_)
public void moveTo(double p_70012_1_, double p_70012_3_, double p_70012_5_, float p_70012_7_, float p_70012_8_)
public void setPosAndOldPos(double p_226286_1_, double p_226286_3_, double p_226286_5_)
public float distanceTo(Entity p_70032_1_)
public double distanceToSqr(double p_70092_1_, double p_70092_3_, double p_70092_5_)
public double distanceToSqr(Entity p_70068_1_)
public double distanceToSqr(Vector3d p_195048_1_)
public void playerTouch(PlayerEntity p_70100_1_)
public void push(Entity p_70108_1_)
public void push(double p_70024_1_, double p_70024_3_, double p_70024_5_)
protected void markHurt()
public boolean hurt(DamageSource p_70097_1_, float p_70097_2_)
public final Vector3d getViewVector(float p_70676_1_)
public float getViewXRot(float p_195050_1_)
public float getViewYRot(float p_195046_1_)
protected final Vector3d calculateViewVector(float p_174806_1_, float p_174806_2_)
public final Vector3d getUpVector(float p_213286_1_)
protected final Vector3d calculateUpVector(float p_213320_1_, float p_213320_2_)
public final Vector3d getEyePosition(float p_174824_1_)
public Vector3d getLightProbePosition(float p_241842_1_)
public final Vector3d getPosition(float p_242282_1_)
public RayTraceResult pick(double p_213324_1_, float p_213324_3_, boolean p_213324_4_)
public boolean isPickable()
public boolean isPushable()
public void awardKillScore(Entity p_191956_1_, int p_191956_2_, DamageSource p_191956_3_)
public boolean shouldRender(double p_145770_1_, double p_145770_3_, double p_145770_5_)
public boolean shouldRenderAtSqrDistance(double p_70112_1_)
public boolean saveAsPassenger(CompoundNBT p_184198_1_)
public boolean save(CompoundNBT p_70039_1_)
public CompoundNBT saveWithoutId(CompoundNBT p_189511_1_)
public void load(CompoundNBT p_70020_1_)
protected boolean repositionEntityAfterLoad()
@Nullable public final java.lang.String getEncodeId()
protected abstract void readAdditionalSaveData(CompoundNBT p_70037_1_)
protected abstract void addAdditionalSaveData(CompoundNBT p_213281_1_)
protected ListNBT newDoubleList(double... p_70087_1_)
protected ListNBT newFloatList(float... p_70049_1_)
@Nullable public ItemEntity spawnAtLocation(IItemProvider p_199703_1_)
@Nullable public ItemEntity spawnAtLocation(IItemProvider p_199702_1_, int p_199702_2_)
@Nullable public ItemEntity spawnAtLocation(ItemStack p_199701_1_)
@Nullable public ItemEntity spawnAtLocation(ItemStack p_70099_1_, float p_70099_2_)
public boolean isAlive()
public boolean isInWall()
public ActionResultType interact(PlayerEntity p_184230_1_, Hand p_184230_2_)
public boolean canCollideWith(Entity p_241849_1_)
public boolean canBeCollidedWith()
public void rideTick()
public void positionRider(Entity p_184232_1_)
private void positionRider(Entity p_226266_1_, Entity.IMoveCallback p_226266_2_)
public void onPassengerTurned(Entity p_184190_1_)
public double getMyRidingOffset()
public double getPassengersRidingOffset()
public boolean startRiding(Entity p_184220_1_)
public boolean showVehicleHealth()
public boolean startRiding(Entity p_184205_1_, boolean p_184205_2_)
protected boolean canRide(Entity p_184228_1_)
protected boolean canEnterPose(Pose p_213298_1_)
public void ejectPassengers()
public void removeVehicle()
public void stopRiding()
protected void addPassenger(Entity p_184200_1_)
protected void removePassenger(Entity p_184225_1_)
protected boolean canAddPassenger(Entity p_184219_1_)
public void lerpTo(double p_180426_1_, double p_180426_3_, double p_180426_5_, float p_180426_7_, float p_180426_8_, int p_180426_9_, boolean p_180426_10_)
public void lerpHeadTo(float p_208000_1_, int p_208000_2_)
public float getPickRadius()
public Vector3d getLookAngle()
public Vector2f getRotationVector()
public Vector3d getForward()
public void handleInsidePortal(BlockPos p_181015_1_)
protected void handleNetherPortal()
public int getDimensionChangingDelay()
public void lerpMotion(double p_70016_1_, double p_70016_3_, double p_70016_5_)
public void handleEntityEvent(byte p_70103_1_)
public void animateHurt()
public java.lang.Iterable<ItemStack> getHandSlots()
public java.lang.Iterable<ItemStack> getArmorSlots()
public java.lang.Iterable<ItemStack> getAllSlots()
public void setItemSlot(EquipmentSlotType p_184201_1_, ItemStack p_184201_2_)
public boolean isOnFire()
public boolean isPassenger()
public boolean isVehicle()
@Deprecated public boolean rideableUnderWater()
public void setShiftKeyDown(boolean p_226284_1_)
public boolean isShiftKeyDown()
public boolean isSteppingCarefully()
public boolean isSuppressingBounce()
public boolean isDiscrete()
public boolean isDescending()
public boolean isCrouching()
public boolean isSprinting()
public void setSprinting(boolean p_70031_1_)
public boolean isSwimming()
public boolean isVisuallySwimming()
public boolean isVisuallyCrawling()
public void setSwimming(boolean p_204711_1_)
public boolean isGlowing()
public void setGlowing(boolean p_184195_1_)
public boolean isInvisible()
public boolean isInvisibleTo(PlayerEntity p_98034_1_)
@Nullable public Team getTeam()
public boolean isAlliedTo(Entity p_184191_1_)
public boolean isAlliedTo(Team p_184194_1_)
public void setInvisible(boolean p_82142_1_)
protected boolean getSharedFlag(int p_70083_1_)
protected void setSharedFlag(int p_70052_1_, boolean p_70052_2_)
public int getMaxAirSupply()
public int getAirSupply()
public void setAirSupply(int p_70050_1_)
public void thunderHit(ServerWorld p_241841_1_, LightningBoltEntity p_241841_2_)
public void onAboveBubbleCol(boolean p_203002_1_)
public void onInsideBubbleColumn(boolean p_203004_1_)
public void killed(ServerWorld p_241847_1_, LivingEntity p_241847_2_)
protected void moveTowardsClosestSpace(double p_213282_1_, double p_213282_3_, double p_213282_5_)
public void makeStuckInBlock(BlockState p_213295_1_, Vector3d p_213295_2_)
private static ITextComponent removeAction(ITextComponent p_233573_0_)
public ITextComponent getName()
protected ITextComponent getTypeName()
public boolean is(Entity p_70028_1_)
public float getYHeadRot()
public void setYHeadRot(float p_70034_1_)
public void setYBodyRot(float p_181013_1_)
public boolean isAttackable()
public boolean skipAttackInteraction(Entity p_85031_1_)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isInvulnerableTo(DamageSource p_180431_1_)
public boolean isInvulnerable()
public void setInvulnerable(boolean p_184224_1_)
public void copyPosition(Entity p_82149_1_)
public void restoreFrom(Entity p_180432_1_)
@Nullable public Entity changeDimension(ServerWorld p_241206_1_)
@Nullable public Entity changeDimension(ServerWorld p_241206_1_, ITeleporter teleporter)
protected void removeAfterChangingDimensions()
@Nullable protected PortalInfo findDimensionEntryPoint(ServerWorld p_241829_1_)
protected Vector3d getRelativePortalPosition(Direction.Axis p_241839_1_, TeleportationRepositioner.Result p_241839_2_)
protected java.util.Optional<TeleportationRepositioner.Result> getExitPortal(ServerWorld p_241830_1_, BlockPos p_241830_2_, boolean p_241830_3_)
public boolean canChangeDimensions()
public float getBlockExplosionResistance(Explosion p_180428_1_, IBlockReader p_180428_2_, BlockPos p_180428_3_, BlockState p_180428_4_, FluidState p_180428_5_, float p_180428_6_)
public boolean shouldBlockExplode(Explosion p_174816_1_, IBlockReader p_174816_2_, BlockPos p_174816_3_, BlockState p_174816_4_, float p_174816_5_)
public int getMaxFallDistance()
public boolean isIgnoringBlockTriggers()
public void fillCrashReportCategory(CrashReportCategory p_85029_1_)
public boolean displayFireAnimation()
public void setUUID(java.util.UUID p_184221_1_)
public java.util.UUID getUUID()
public java.lang.String getStringUUID()
public java.lang.String getScoreboardName()
public boolean isPushedByFluid()
public static double getViewScale()
public static void setViewScale(double p_184227_0_)
public ITextComponent getDisplayName()
getDisplayName
in interface INameable
public void setCustomName(@Nullable ITextComponent p_200203_1_)
@Nullable public ITextComponent getCustomName()
getCustomName
in interface INameable
public boolean hasCustomName()
hasCustomName
in interface INameable
public void setCustomNameVisible(boolean p_174805_1_)
public boolean isCustomNameVisible()
public final void teleportToWithTicket(double p_223102_1_, double p_223102_3_, double p_223102_5_)
public void teleportTo(double p_70634_1_, double p_70634_3_, double p_70634_5_)
public boolean shouldShowName()
public void onSyncedDataUpdated(DataParameter<?> p_184206_1_)
public void refreshDimensions()
public Direction getDirection()
public Direction getMotionDirection()
protected HoverEvent createHoverEvent()
public boolean broadcastToPlayer(ServerPlayerEntity p_174827_1_)
public AxisAlignedBB getBoundingBox()
public AxisAlignedBB getBoundingBoxForCulling()
protected AxisAlignedBB getBoundingBoxForPose(Pose p_213321_1_)
public void setBoundingBox(AxisAlignedBB p_174826_1_)
protected float getEyeHeight(Pose p_213316_1_, EntitySize p_213316_2_)
public float getEyeHeight(Pose p_213307_1_)
public final float getEyeHeight()
public Vector3d getLeashOffset()
public boolean setSlot(int p_174820_1_, ItemStack p_174820_2_)
public void sendMessage(ITextComponent p_145747_1_, java.util.UUID p_145747_2_)
sendMessage
in interface ICommandSource
public World getCommandSenderWorld()
@Nullable public MinecraftServer getServer()
public ActionResultType interactAt(PlayerEntity p_184199_1_, Vector3d p_184199_2_, Hand p_184199_3_)
public boolean ignoreExplosion()
public void doEnchantDamageEffects(LivingEntity p_174815_1_, Entity p_174815_2_)
public void startSeenByPlayer(ServerPlayerEntity p_184178_1_)
public void stopSeenByPlayer(ServerPlayerEntity p_184203_1_)
public float rotate(Rotation p_184229_1_)
public float mirror(Mirror p_184217_1_)
public boolean onlyOpCanSetNbt()
public boolean checkAndResetForcedChunkAdditionFlag()
public boolean checkAndResetUpdateChunkPos()
@Nullable public Entity getControllingPassenger()
public java.util.List<Entity> getPassengers()
public boolean hasPassenger(Entity p_184196_1_)
public boolean hasPassenger(java.lang.Class<? extends Entity> p_205708_1_)
public java.util.Collection<Entity> getIndirectPassengers()
public java.util.stream.Stream<Entity> getSelfAndPassengers()
public boolean hasOnePlayerPassenger()
private void fillIndirectPassengers(boolean p_200604_1_, java.util.Set<Entity> p_200604_2_)
public Entity getRootVehicle()
public boolean isPassengerOfSameVehicle(Entity p_184223_1_)
public boolean hasIndirectPassenger(Entity p_184215_1_)
public boolean isControlledByLocalInstance()
protected static Vector3d getCollisionHorizontalEscapeVector(double p_233559_0_, double p_233559_2_, float p_233559_4_)
public Vector3d getDismountLocationForPassenger(LivingEntity p_230268_1_)
@Nullable public Entity getVehicle()
public PushReaction getPistonPushReaction()
public SoundCategory getSoundSource()
protected int getFireImmuneTicks()
public CommandSource createCommandSourceStack()
protected int getPermissionLevel()
public boolean hasPermissions(int p_211513_1_)
public boolean acceptsSuccess()
acceptsSuccess
in interface ICommandSource
public boolean acceptsFailure()
acceptsFailure
in interface ICommandSource
public boolean shouldInformAdmins()
shouldInformAdmins
in interface ICommandSource
public void lookAt(EntityAnchorArgument.Type p_200602_1_, Vector3d p_200602_2_)
public boolean updateFluidHeightAndDoFluidPushing(ITag<Fluid> p_210500_1_, double p_210500_2_)
public double getFluidJumpThreshold()
public final float getBbWidth()
public final float getBbHeight()
public abstract IPacket<?> getAddEntityPacket()
public EntitySize getDimensions(Pose p_213305_1_)
public Vector3d position()
public BlockPos blockPosition()
public Vector3d getDeltaMovement()
public void setDeltaMovement(Vector3d p_213317_1_)
public void setDeltaMovement(double p_213293_1_, double p_213293_3_, double p_213293_5_)
public final double getX()
public double getX(double p_226275_1_)
public double getRandomX(double p_226282_1_)
public final double getY()
public double getY(double p_226283_1_)
public double getRandomY()
public double getEyeY()
public final double getZ()
public double getZ(double p_226285_1_)
public double getRandomZ(double p_226287_1_)
public void setPosRaw(double p_226288_1_, double p_226288_3_, double p_226288_5_)
public void checkDespawn()
public Vector3d getRopeHoldPosition(float p_241843_1_)
public void canUpdate(boolean value)
canUpdate
in interface IForgeEntity
public boolean canUpdate()
canUpdate
in interface IForgeEntity
public java.util.Collection<ItemEntity> captureDrops()
captureDrops
in interface IForgeEntity
public java.util.Collection<ItemEntity> captureDrops(java.util.Collection<ItemEntity> value)
captureDrops
in interface IForgeEntity
public CompoundNBT getPersistentData()
IForgeEntity
getPersistentData
in interface IForgeEntity
public boolean canTrample(BlockState state, BlockPos pos, float fallDistance)
IForgeEntity
Entity
can trample a Block
.canTrample
in interface IForgeEntity
pos
- The block posfallDistance
- The fall distancetrue
if this entity can trample, false
otherwisepublic final boolean isAddedToWorld()
IForgeEntity
World#onEntityAdded(Entity)
and
World#onEntityRemoved(Entity)
.isAddedToWorld
in interface IForgeEntity
public void onAddedToWorld()
IForgeEntity
onAddedToWorld
in interface IForgeEntity
public void onRemovedFromWorld()
IForgeEntity
onRemovedFromWorld
in interface IForgeEntity
public void revive()
IForgeEntity
revive
in interface IForgeEntity
public float getEyeHeightAccess(Pose pose, EntitySize size)
getEyeHeight(Pose, EntitySize)