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 |
---|---|
boolean |
addedToChunk |
private static DataParameter<java.lang.Integer> |
AIR |
private AxisAlignedBB |
boundingBox |
protected java.lang.String |
cachedUniqueIdString |
private boolean |
canUpdate |
private java.util.Collection<ItemEntity> |
captureDrops |
int |
chunkCoordX |
int |
chunkCoordY |
int |
chunkCoordZ |
boolean |
collided |
boolean |
collidedHorizontally |
boolean |
collidedVertically |
private static DataParameter<java.util.Optional<ITextComponent>> |
CUSTOM_NAME |
private static DataParameter<java.lang.Boolean> |
CUSTOM_NAME_VISIBLE |
protected EntityDataManager |
dataManager |
DimensionType |
dimension |
float |
distanceWalkedModified |
float |
distanceWalkedOnStepModified |
private static java.util.List<ItemStack> |
EMPTY_EQUIPMENT |
float |
entityCollisionReduction |
private int |
entityId |
protected java.util.UUID |
entityUniqueID |
private float |
eyeHeight |
protected boolean |
eyesInWater |
float |
fallDistance |
private int |
fire |
protected boolean |
firstUpdate |
protected static DataParameter<java.lang.Byte> |
FLAGS |
boolean |
forceSpawn |
protected boolean |
glowing |
int |
hurtResistantTime |
boolean |
ignoreFrustumCheck |
protected boolean |
inLava |
protected boolean |
inPortal |
private boolean |
invulnerable |
protected boolean |
inWater |
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.
|
boolean |
isAirBorne |
private boolean |
isPositionDirty |
protected BlockPos |
lastPortalPos |
protected Vec3d |
lastPortalVec |
double |
lastTickPosX |
double |
lastTickPosY |
double |
lastTickPosZ |
protected static org.apache.logging.log4j.Logger |
LOGGER |
private Vec3d |
motion |
protected Vec3d |
motionMultiplier |
private static java.util.concurrent.atomic.AtomicInteger |
NEXT_ENTITY_ID |
private float |
nextFlap |
private float |
nextStepDistance |
private static DataParameter<java.lang.Boolean> |
NO_GRAVITY |
boolean |
noClip |
boolean |
onGround |
private java.util.List<Entity> |
passengers |
private CompoundNBT |
persistentData |
private double[] |
pistonDeltas |
private long |
pistonDeltasGameTime |
protected int |
portalCounter |
protected static DataParameter<Pose> |
POSE |
private double |
posX |
private double |
posY |
private double |
posZ |
float |
prevDistanceWalkedModified |
boolean |
preventEntitySpawning |
double |
prevPosX |
double |
prevPosY |
double |
prevPosZ |
float |
prevRotationPitch |
float |
prevRotationYaw |
protected java.util.Random |
rand |
boolean |
removed
Deprecated.
|
private static double |
renderDistanceWeight |
protected int |
rideCooldown |
private Entity |
ridingEntity |
float |
rotationPitch |
float |
rotationYaw |
long |
serverPosX |
long |
serverPosY |
long |
serverPosZ |
private static DataParameter<java.lang.Boolean> |
SILENT |
private EntitySize |
size |
float |
stepHeight |
protected double |
submergedHeight |
private java.util.Set<java.lang.String> |
tags |
protected Direction |
teleportDirection |
int |
ticksExisted |
int |
timeUntilPortal |
private EntityType<?> |
type
Deprecated.
|
boolean |
velocityChanged |
World |
world |
private static AxisAlignedBB |
ZERO_AABB |
DUMMY
Constructor and Description |
---|
Entity(EntityType<?> entityTypeIn,
World worldIn) |
Modifier and Type | Method and Description |
---|---|
protected void |
addPassenger(Entity passenger) |
boolean |
addTag(java.lang.String tag) |
void |
addTrackingPlayer(ServerPlayerEntity player) |
void |
addVelocity(double x,
double y,
double z) |
boolean |
allowLogging() |
protected void |
applyEnchantments(LivingEntity entityLivingBaseIn,
Entity entityIn) |
void |
applyEntityCollision(Entity entityIn) |
void |
applyOrientationToEntity(Entity entityToUpdate) |
ActionResultType |
applyPlayerInteraction(PlayerEntity player,
Vec3d vec,
Hand hand) |
boolean |
areEyesInFluid(Tag<Fluid> tagIn) |
boolean |
areEyesInFluid(Tag<Fluid> p_213290_1_,
boolean checkChunkLoaded) |
boolean |
attackEntityFrom(DamageSource source,
float amount) |
void |
awardKillScore(Entity p_191956_1_,
int p_191956_2_,
DamageSource p_191956_3_) |
void |
baseTick() |
private double |
calculatePistonDeltas(Direction.Axis axis,
double distance) |
protected Vec3d |
calculateUpVector(float p_213320_1_,
float p_213320_2_) |
boolean |
canBeAttackedWithItem() |
boolean |
canBeCollidedWith() |
boolean |
canBePushed() |
protected boolean |
canBeRidden(Entity entityIn) |
boolean |
canBeRiddenInWater()
Deprecated.
|
boolean |
canExplosionDestroyBlock(Explosion explosionIn,
IBlockReader worldIn,
BlockPos pos,
BlockState blockStateIn,
float p_174816_5_) |
protected boolean |
canFitPassenger(Entity passenger) |
boolean |
canPassengerSteer() |
boolean |
canRenderOnFire() |
boolean |
canSwim() |
boolean |
canTrample(BlockState state,
BlockPos pos,
float fallDistance)
Checks if this
Entity can trample a Block . |
protected boolean |
canTriggerWalking() |
boolean |
canUpdate() |
void |
canUpdate(boolean value) |
java.util.Collection<ItemEntity> |
captureDrops() |
java.util.Collection<ItemEntity> |
captureDrops(java.util.Collection<ItemEntity> value) |
Entity |
changeDimension(DimensionType destination) |
Entity |
changeDimension(DimensionType destination,
ITeleporter teleporter) |
void |
checkDespawn() |
static Vec3d |
collideBoundingBox(Vec3d p_223310_0_,
AxisAlignedBB p_223310_1_,
ReuseableStream<VoxelShape> p_223310_2_) |
static Vec3d |
collideBoundingBoxHeuristically(Entity p_223307_0_,
Vec3d p_223307_1_,
AxisAlignedBB p_223307_2_,
World p_223307_3_,
ISelectionContext p_223307_4_,
ReuseableStream<VoxelShape> p_223307_5_) |
void |
copyDataFromOld(Entity entityIn) |
void |
copyLocationAndAnglesFrom(Entity entityIn) |
protected void |
createRunningParticles() |
abstract IPacket<?> |
createSpawnPacket() |
protected void |
dealFireDamage(int amount) |
protected void |
decrementTimeUntilPortal() |
void |
detach() |
protected float |
determineNextStepDistance() |
protected void |
doBlockCollisions() |
boolean |
doesEntityNotTriggerPressurePlate() |
protected void |
doWaterSplashEffect() |
ItemEntity |
entityDropItem(IItemProvider itemIn) |
ItemEntity |
entityDropItem(IItemProvider itemIn,
int offset) |
ItemEntity |
entityDropItem(ItemStack stack) |
ItemEntity |
entityDropItem(ItemStack stack,
float offsetY) |
boolean |
equals(java.lang.Object p_equals_1_) |
void |
extinguish() |
void |
fillCrashReport(CrashReportCategory category) |
void |
forceSetPosition(double x,
double y,
double z) |
private static Vec3d |
getAbsoluteMotion(Vec3d relative,
float p_213299_1_,
float facing) |
Direction |
getAdjustedHorizontalFacing() |
int |
getAir() |
private Vec3d |
getAllowedMovement(Vec3d vec) |
static Vec3d |
getAllowedMovement(Vec3d vec,
AxisAlignedBB collisionBox,
IWorldReader worldIn,
ISelectionContext selectionContext,
ReuseableStream<VoxelShape> potentialHits) |
boolean |
getAlwaysRenderNameTagForRender() |
java.lang.Iterable<ItemStack> |
getArmorInventoryList() |
AxisAlignedBB |
getBoundingBox() |
protected AxisAlignedBB |
getBoundingBox(Pose p_213321_1_) |
float |
getBrightness() |
java.lang.String |
getCachedUniqueIdString() |
float |
getCollisionBorderSize() |
AxisAlignedBB |
getCollisionBoundingBox() |
AxisAlignedBB |
getCollisionBox(Entity entityIn) |
CommandSource |
getCommandSource() |
Entity |
getControllingPassenger() |
ITextComponent |
getCustomName() |
EntityDataManager |
getDataManager() |
ITextComponent |
getDisplayName() |
float |
getDistance(Entity entityIn) |
double |
getDistanceSq(double x,
double y,
double z) |
double |
getDistanceSq(Entity entityIn) |
double |
getDistanceSq(Vec3d p_195048_1_) |
int |
getEntityId() |
java.lang.String |
getEntityString() |
World |
getEntityWorld() |
java.lang.Iterable<ItemStack> |
getEquipmentAndArmor() |
float |
getExplosionResistance(Explosion explosionIn,
IBlockReader worldIn,
BlockPos pos,
BlockState blockStateIn,
IFluidState p_180428_5_,
float p_180428_6_) |
float |
getEyeHeight() |
float |
getEyeHeight(Pose p_213307_1_) |
protected float |
getEyeHeight(Pose poseIn,
EntitySize sizeIn) |
private float |
getEyeHeightForge(Pose pose,
EntitySize size) |
Vec3d |
getEyePosition(float partialTicks) |
protected int |
getFireImmuneTicks() |
int |
getFireTimer() |
protected boolean |
getFlag(int flag) |
Vec3d |
getForward() |
float |
getHeight() |
java.lang.Iterable<ItemStack> |
getHeldEquipment() |
protected SoundEvent |
getHighspeedSplashSound() |
Direction |
getHorizontalFacing() |
protected HoverEvent |
getHoverEvent() |
protected float |
getJumpFactor() |
Vec3d |
getLastPortalVec() |
Vec3d |
getLook(float partialTicks) |
Vec3d |
getLookVec() |
Entity |
getLowestRidingEntity() |
int |
getMaxAir() |
int |
getMaxFallHeight() |
int |
getMaxInPortalTime() |
float |
getMirroredYaw(Mirror transformMirror) |
Vec3d |
getMotion() |
double |
getMountedYOffset() |
ITextComponent |
getName() |
protected BlockPos |
getOnPosition() |
java.util.List<Entity> |
getPassengers() |
protected int |
getPermissionLevel() |
CompoundNBT |
getPersistentData()
Returns a NBTTagCompound that can be used to store custom data for this entity.
|
float |
getPitch(float partialTicks) |
Vec2f |
getPitchYaw() |
int |
getPortalCooldown() |
Pose |
getPose() |
BlockPos |
getPosition() |
protected BlockPos |
getPositionUnderneath() |
Vec3d |
getPositionVec() |
Vec3d |
getPositionVector() |
double |
getPosX() |
double |
getPosXRandom(double p_226282_1_) |
double |
getPosXWidth(double p_226275_1_) |
double |
getPosY() |
double |
getPosYEye() |
double |
getPosYHeight(double p_226283_1_) |
double |
getPosYRandom() |
double |
getPosZ() |
double |
getPosZRandom(double p_226287_1_) |
double |
getPosZWidth(double p_226285_1_) |
protected ITextComponent |
getProfessionName() |
PushReaction |
getPushReaction() |
java.util.Collection<Entity> |
getRecursivePassengers() |
private void |
getRecursivePassengers(boolean playersOnly,
java.util.Set<Entity> p_200604_2_) |
AxisAlignedBB |
getRenderBoundingBox() |
static double |
getRenderDistanceWeight() |
Entity |
getRidingEntity() |
float |
getRotatedYaw(Rotation transformRotation) |
float |
getRotationYawHead() |
java.lang.String |
getScoreboardName() |
java.util.stream.Stream<Entity> |
getSelfAndPassengers() |
MinecraftServer |
getServer() |
EntitySize |
getSize(Pose poseIn) |
SoundCategory |
getSoundCategory() |
protected float |
getSpeedFactor() |
protected SoundEvent |
getSplashSound() |
double |
getSubmergedHeight() |
protected SoundEvent |
getSwimSound() |
java.util.Set<java.lang.String> |
getTags() |
Team |
getTeam() |
int |
getTeamColor() |
Direction |
getTeleportDirection() |
EntityType<?> |
getType() |
java.util.UUID |
getUniqueID() |
Vec3d |
getUpVector(float partialTicks) |
protected Vec3d |
getVectorForRotation(float pitch,
float yaw) |
float |
getWidth() |
float |
getYaw(float partialTicks) |
double |
getYOffset() |
boolean |
handleFluidAcceleration(Tag<Fluid> p_210500_1_) |
protected Vec3d |
handlePistonMovement(Vec3d pos) |
void |
handleStatusUpdate(byte id) |
boolean |
handleWaterMovement() |
boolean |
hasCustomName() |
int |
hashCode() |
boolean |
hasNoGravity() |
boolean |
hasPermissionLevel(int p_211513_1_) |
boolean |
hitByEntity(Entity entityIn) |
static double |
horizontalMag(Vec3d vec) |
boolean |
ignoreItemEntityData() |
boolean |
isActualySwimming() |
boolean |
isAddedToWorld()
Gets whether this entity has been added to a world (for tracking).
|
boolean |
isAlive() |
boolean |
isBeingRidden() |
boolean |
isBurning() |
boolean |
isCrouching() |
boolean |
isCustomNameVisible() |
boolean |
isDescending() |
boolean |
isDiscrete() |
boolean |
isEntityEqual(Entity entityIn) |
boolean |
isEntityInsideOpaqueBlock() |
boolean |
isGlowing() |
boolean |
isImmuneToExplosions() |
boolean |
isImmuneToFire() |
private boolean |
isInBubbleColumn() |
boolean |
isInLava() |
private boolean |
isInRain() |
boolean |
isInRangeToRender3d(double x,
double y,
double z) |
boolean |
isInRangeToRenderDist(double distance) |
boolean |
isInvisible() |
boolean |
isInvisibleToPlayer(PlayerEntity player) |
boolean |
isInvulnerable() |
boolean |
isInvulnerableTo(DamageSource source) |
boolean |
isInWater() |
boolean |
isInWaterOrBubbleColumn() |
boolean |
isInWaterRainOrBubbleColumn() |
private boolean |
isLiquidPresentInAABB(AxisAlignedBB bb) |
boolean |
isLiving() |
boolean |
isNonBoss() |
boolean |
isOffsetPositionInLiquid(double x,
double y,
double z) |
boolean |
isOnePlayerRiding() |
boolean |
isOnSameTeam(Entity entityIn) |
boolean |
isOnScoreboardTeam(Team teamIn) |
boolean |
isPassenger() |
boolean |
isPassenger(java.lang.Class<? extends Entity> p_205708_1_) |
boolean |
isPassenger(Entity entityIn) |
protected boolean |
isPoseClear(Pose p_213298_1_) |
boolean |
isPushedByWater() |
boolean |
isRidingOrBeingRiddenBy(Entity entityIn) |
boolean |
isRidingSameEntity(Entity entityIn) |
boolean |
isSilent() |
boolean |
isSneaking() |
boolean |
isSpectatedByPlayer(ServerPlayerEntity player) |
boolean |
isSpectator() |
boolean |
isSprinting() |
boolean |
isSteppingCarefully() |
boolean |
isSuppressingBounce() |
boolean |
isSwimming() |
boolean |
isVisuallySwimming() |
boolean |
isWet() |
void |
lookAt(EntityAnchorArgument.Type p_200602_1_,
Vec3d p_200602_2_) |
protected boolean |
makeFlySound() |
protected void |
markVelocityChanged() |
protected Vec3d |
maybeBackOffFromEdge(Vec3d p_225514_1_,
MoverType p_225514_2_) |
void |
move(MoverType typeIn,
Vec3d pos) |
void |
moveForced(double p_225653_1_,
double p_225653_3_,
double p_225653_5_) |
void |
moveRelative(float p_213309_1_,
Vec3d relative) |
void |
moveToBlockPosAndAngles(BlockPos pos,
float rotationYawIn,
float rotationPitchIn) |
protected ListNBT |
newDoubleNBTList(double... numbers) |
protected ListNBT |
newFloatNBTList(float... numbers) |
void |
notifyDataManagerChange(DataParameter<?> key) |
void |
onAddedToWorld()
Called after the entity has been added to the world's
ticking list.
|
void |
onCollideWithPlayer(PlayerEntity entityIn) |
void |
onEnterBubbleColumn(boolean downwards) |
void |
onEnterBubbleColumnWithAirAbove(boolean downwards) |
protected void |
onInsideBlock(BlockState p_191955_1_) |
void |
onKillCommand() |
void |
onKillEntity(LivingEntity entityLivingIn) |
boolean |
onLivingFall(float distance,
float damageMultiplier) |
void |
onRemovedFromWorld()
Called after the entity has been removed to the world's
ticking list.
|
void |
onStruckByLightning(LightningBoltEntity lightningBolt) |
protected void |
outOfWorld() |
void |
performHurtAnimation() |
RayTraceResult |
pick(double p_213324_1_,
float p_213324_3_,
boolean p_213324_4_) |
protected float |
playFlySound(float volume) |
void |
playSound(SoundEvent soundIn,
float volume,
float pitch) |
protected void |
playStepSound(BlockPos pos,
BlockState blockIn) |
protected void |
playSwimSound(float volume) |
void |
positionRider(Entity p_226266_1_,
Entity.IMoveCallback p_226266_2_) |
protected void |
preparePlayerToSpawn() |
boolean |
processInitialInteract(PlayerEntity player,
Hand hand) |
protected void |
pushOutOfBlocks(double x,
double y,
double z) |
void |
read(CompoundNBT compound) |
protected abstract void |
readAdditional(CompoundNBT compound) |
void |
recalculateSize() |
protected void |
recenterBoundingBox() |
protected abstract void |
registerData() |
void |
remove() |
void |
remove(boolean keepData) |
private static void |
removeClickEvents(ITextComponent p_207712_0_) |
protected void |
removePassenger(Entity passenger) |
void |
removePassengers() |
boolean |
removeTag(java.lang.String tag) |
void |
removeTrackingPlayer(ServerPlayerEntity player) |
boolean |
replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn) |
void |
repositionDirectPassengers(Entity.IMoveCallback p_226265_1_) |
void |
resetPositionToBB() |
void |
revive()
Revives an entity that has been removed from a world.
|
void |
rotateTowards(double yaw,
double pitch) |
void |
sendMessage(ITextComponent component) |
void |
setAir(int air) |
void |
setBoundingBox(AxisAlignedBB bb) |
void |
setCustomName(ITextComponent name) |
void |
setCustomNameVisible(boolean alwaysRenderNameTag) |
void |
setEntityId(int id) |
void |
setFire(int seconds) |
void |
setFireTimer(int p_223308_1_) |
protected void |
setFlag(int flag,
boolean set) |
void |
setGlowing(boolean glowingIn) |
void |
setHeadRotation(float yaw,
int pitch) |
void |
setInLava() |
void |
setInvisible(boolean invisible) |
void |
setInvulnerable(boolean isInvulnerable) |
void |
setItemStackToSlot(EquipmentSlotType slotIn,
ItemStack stack) |
void |
setLocationAndAngles(double x,
double y,
double z,
float yaw,
float pitch) |
void |
setMotion(double x,
double y,
double z) |
void |
setMotion(Vec3d motionIn) |
void |
setMotionMultiplier(BlockState state,
Vec3d motionMultiplierIn) |
void |
setNoGravity(boolean noGravity) |
protected void |
setOnFireFromLava() |
void |
setPacketCoordinates(double p_213312_1_,
double p_213312_3_,
double p_213312_5_) |
void |
setPortal(BlockPos pos) |
protected void |
setPose(Pose poseIn) |
void |
setPosition(double x,
double y,
double z) |
void |
setPositionAndRotation(double x,
double y,
double z,
float yaw,
float pitch) |
void |
setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport) |
void |
setPositionAndUpdate(double x,
double y,
double z) |
boolean |
setPositionNonDirty() |
void |
setRawPosition(double x,
double y,
double z) |
static void |
setRenderDistanceWeight(double renderDistWeight) |
void |
setRenderYawOffset(float offset) |
protected void |
setRotation(float yaw,
float pitch) |
void |
setRotationYawHead(float rotation) |
void |
setSilent(boolean isSilent) |
void |
setSneaking(boolean keyDownIn) |
void |
setSprinting(boolean sprinting) |
void |
setSwimming(boolean p_204711_1_) |
void |
setUniqueId(java.util.UUID uniqueIdIn) |
void |
setVelocity(double x,
double y,
double z) |
void |
setWorld(World worldIn) |
boolean |
shouldReceiveErrors() |
boolean |
shouldReceiveFeedback() |
protected boolean |
shouldSetPosAfterLoading() |
void |
spawnRunningParticles() |
boolean |
startRiding(Entity entityIn) |
boolean |
startRiding(Entity entityIn,
boolean force) |
void |
stopRiding() |
void |
teleportKeepLoaded(double p_223102_1_,
double p_223102_3_,
double p_223102_5_) |
void |
tick() |
java.lang.String |
toString() |
private void |
updateAquatics() |
private void |
updateEyesInWater() |
protected void |
updateFallState(double y,
boolean onGroundIn,
BlockState state,
BlockPos pos) |
void |
updatePassenger(Entity passenger) |
protected void |
updatePortal() |
void |
updateRidden() |
void |
updateSwimming() |
protected abstract void |
writeAdditional(CompoundNBT compound) |
boolean |
writeUnlessPassenger(CompoundNBT compound) |
boolean |
writeUnlessRemoved(CompoundNBT compound) |
CompoundNBT |
writeWithoutTypeId(CompoundNBT compound) |
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSit
getCapability, getCapability
protected static final org.apache.logging.log4j.Logger LOGGER
private static final java.util.concurrent.atomic.AtomicInteger NEXT_ENTITY_ID
private static final java.util.List<ItemStack> EMPTY_EQUIPMENT
private static final AxisAlignedBB ZERO_AABB
private static double renderDistanceWeight
@Deprecated private final EntityType<?> type
private int entityId
public boolean preventEntitySpawning
private final java.util.List<Entity> passengers
protected int rideCooldown
@Nullable private Entity ridingEntity
public boolean forceSpawn
public World world
public double prevPosX
public double prevPosY
public double prevPosZ
private double posX
private double posY
private double posZ
private Vec3d motion
public float rotationYaw
public float rotationPitch
public float prevRotationYaw
public float prevRotationPitch
private AxisAlignedBB boundingBox
public boolean onGround
public boolean collidedHorizontally
public boolean collidedVertically
public boolean collided
public boolean velocityChanged
protected Vec3d motionMultiplier
@Deprecated public boolean removed
public float prevDistanceWalkedModified
public float distanceWalkedModified
public float distanceWalkedOnStepModified
public float fallDistance
private float nextStepDistance
private float nextFlap
public double lastTickPosX
public double lastTickPosY
public double lastTickPosZ
public float stepHeight
public boolean noClip
public float entityCollisionReduction
protected final java.util.Random rand
public int ticksExisted
private int fire
protected boolean inWater
protected double submergedHeight
protected boolean eyesInWater
protected boolean inLava
public int hurtResistantTime
protected boolean firstUpdate
protected final EntityDataManager dataManager
protected static final DataParameter<java.lang.Byte> FLAGS
private static final DataParameter<java.lang.Integer> AIR
private static final DataParameter<java.util.Optional<ITextComponent>> CUSTOM_NAME
private static final DataParameter<java.lang.Boolean> CUSTOM_NAME_VISIBLE
private static final DataParameter<java.lang.Boolean> SILENT
private static final DataParameter<java.lang.Boolean> NO_GRAVITY
protected static final DataParameter<Pose> POSE
public boolean addedToChunk
public int chunkCoordX
public int chunkCoordY
public int chunkCoordZ
public long serverPosX
public long serverPosY
public long serverPosZ
public boolean ignoreFrustumCheck
public boolean isAirBorne
public int timeUntilPortal
protected boolean inPortal
protected int portalCounter
public DimensionType dimension
protected BlockPos lastPortalPos
protected Vec3d lastPortalVec
protected Direction teleportDirection
private boolean invulnerable
protected java.util.UUID entityUniqueID
protected java.lang.String cachedUniqueIdString
protected boolean glowing
private final java.util.Set<java.lang.String> tags
private boolean isPositionDirty
private final double[] pistonDeltas
private long pistonDeltasGameTime
private EntitySize size
private float eyeHeight
private boolean canUpdate
private java.util.Collection<ItemEntity> captureDrops
private CompoundNBT persistentData
private boolean isAddedToWorld
public Entity(EntityType<?> entityTypeIn, World worldIn)
public int getTeamColor()
public boolean isSpectator()
public final void detach()
public void setPacketCoordinates(double p_213312_1_, double p_213312_3_, double p_213312_5_)
public EntityType<?> getType()
public int getEntityId()
public void setEntityId(int id)
public java.util.Set<java.lang.String> getTags()
public boolean addTag(java.lang.String tag)
public boolean removeTag(java.lang.String tag)
public void onKillCommand()
protected abstract void registerData()
public EntityDataManager getDataManager()
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 preparePlayerToSpawn()
public void remove()
public void remove(boolean keepData)
protected void setPose(Pose poseIn)
public Pose getPose()
protected void setRotation(float yaw, float pitch)
public void setPosition(double x, double y, double z)
protected void recenterBoundingBox()
public void rotateTowards(double yaw, double pitch)
public void tick()
public void baseTick()
protected void decrementTimeUntilPortal()
public int getMaxInPortalTime()
protected void setOnFireFromLava()
public void setFire(int seconds)
public void setFireTimer(int p_223308_1_)
public int getFireTimer()
public void extinguish()
protected void outOfWorld()
public boolean isOffsetPositionInLiquid(double x, double y, double z)
private boolean isLiquidPresentInAABB(AxisAlignedBB bb)
protected BlockPos getOnPosition()
protected float getJumpFactor()
protected float getSpeedFactor()
protected BlockPos getPositionUnderneath()
private double calculatePistonDeltas(Direction.Axis axis, double distance)
public static double horizontalMag(Vec3d vec)
public static Vec3d collideBoundingBoxHeuristically(@Nullable Entity p_223307_0_, Vec3d p_223307_1_, AxisAlignedBB p_223307_2_, World p_223307_3_, ISelectionContext p_223307_4_, ReuseableStream<VoxelShape> p_223307_5_)
public static Vec3d collideBoundingBox(Vec3d p_223310_0_, AxisAlignedBB p_223310_1_, ReuseableStream<VoxelShape> p_223310_2_)
public static Vec3d getAllowedMovement(Vec3d vec, AxisAlignedBB collisionBox, IWorldReader worldIn, ISelectionContext selectionContext, ReuseableStream<VoxelShape> potentialHits)
protected float determineNextStepDistance()
public void resetPositionToBB()
protected SoundEvent getSwimSound()
protected SoundEvent getSplashSound()
protected SoundEvent getHighspeedSplashSound()
protected void doBlockCollisions()
protected void onInsideBlock(BlockState p_191955_1_)
protected void playStepSound(BlockPos pos, BlockState blockIn)
protected void playSwimSound(float volume)
protected float playFlySound(float volume)
protected boolean makeFlySound()
public void playSound(SoundEvent soundIn, float volume, float pitch)
public boolean isSilent()
public void setSilent(boolean isSilent)
public boolean hasNoGravity()
public void setNoGravity(boolean noGravity)
protected boolean canTriggerWalking()
protected void updateFallState(double y, boolean onGroundIn, BlockState state, BlockPos pos)
@Nullable public AxisAlignedBB getCollisionBoundingBox()
protected void dealFireDamage(int amount)
public final boolean isImmuneToFire()
public boolean onLivingFall(float distance, float damageMultiplier)
public boolean isInWater()
private boolean isInRain()
private boolean isInBubbleColumn()
public boolean isWet()
public boolean isInWaterRainOrBubbleColumn()
public boolean isInWaterOrBubbleColumn()
public boolean canSwim()
private void updateAquatics()
public void updateSwimming()
public boolean handleWaterMovement()
private void updateEyesInWater()
protected void doWaterSplashEffect()
public void spawnRunningParticles()
protected void createRunningParticles()
public void setInLava()
public boolean isInLava()
public void moveRelative(float p_213309_1_, Vec3d relative)
private static Vec3d getAbsoluteMotion(Vec3d relative, float p_213299_1_, float facing)
public float getBrightness()
public void setWorld(World worldIn)
public void setPositionAndRotation(double x, double y, double z, float yaw, float pitch)
public void moveToBlockPosAndAngles(BlockPos pos, float rotationYawIn, float rotationPitchIn)
public void setLocationAndAngles(double x, double y, double z, float yaw, float pitch)
public void forceSetPosition(double x, double y, double z)
public float getDistance(Entity entityIn)
public double getDistanceSq(double x, double y, double z)
public double getDistanceSq(Entity entityIn)
public double getDistanceSq(Vec3d p_195048_1_)
public void onCollideWithPlayer(PlayerEntity entityIn)
public void applyEntityCollision(Entity entityIn)
public void addVelocity(double x, double y, double z)
protected void markVelocityChanged()
public boolean attackEntityFrom(DamageSource source, float amount)
public final Vec3d getLook(float partialTicks)
public float getPitch(float partialTicks)
public float getYaw(float partialTicks)
protected final Vec3d getVectorForRotation(float pitch, float yaw)
public final Vec3d getUpVector(float partialTicks)
protected final Vec3d calculateUpVector(float p_213320_1_, float p_213320_2_)
public final Vec3d getEyePosition(float partialTicks)
public RayTraceResult pick(double p_213324_1_, float p_213324_3_, boolean p_213324_4_)
public boolean canBeCollidedWith()
public boolean canBePushed()
public void awardKillScore(Entity p_191956_1_, int p_191956_2_, DamageSource p_191956_3_)
public boolean isInRangeToRender3d(double x, double y, double z)
public boolean isInRangeToRenderDist(double distance)
public boolean writeUnlessRemoved(CompoundNBT compound)
public boolean writeUnlessPassenger(CompoundNBT compound)
public CompoundNBT writeWithoutTypeId(CompoundNBT compound)
public void read(CompoundNBT compound)
protected boolean shouldSetPosAfterLoading()
@Nullable public final java.lang.String getEntityString()
protected abstract void readAdditional(CompoundNBT compound)
protected abstract void writeAdditional(CompoundNBT compound)
protected ListNBT newDoubleNBTList(double... numbers)
protected ListNBT newFloatNBTList(float... numbers)
@Nullable public ItemEntity entityDropItem(IItemProvider itemIn)
@Nullable public ItemEntity entityDropItem(IItemProvider itemIn, int offset)
@Nullable public ItemEntity entityDropItem(ItemStack stack)
@Nullable public ItemEntity entityDropItem(ItemStack stack, float offsetY)
public boolean isAlive()
public boolean isEntityInsideOpaqueBlock()
public boolean processInitialInteract(PlayerEntity player, Hand hand)
@Nullable public AxisAlignedBB getCollisionBox(Entity entityIn)
public void updateRidden()
public void updatePassenger(Entity passenger)
public void positionRider(Entity p_226266_1_, Entity.IMoveCallback p_226266_2_)
public void applyOrientationToEntity(Entity entityToUpdate)
public double getYOffset()
public double getMountedYOffset()
public boolean startRiding(Entity entityIn)
public boolean isLiving()
public boolean startRiding(Entity entityIn, boolean force)
protected boolean canBeRidden(Entity entityIn)
protected boolean isPoseClear(Pose p_213298_1_)
public void removePassengers()
public void stopRiding()
protected void addPassenger(Entity passenger)
protected void removePassenger(Entity passenger)
protected boolean canFitPassenger(Entity passenger)
public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport)
public void setHeadRotation(float yaw, int pitch)
public float getCollisionBorderSize()
public Vec3d getLookVec()
public Vec2f getPitchYaw()
public Vec3d getForward()
public void setPortal(BlockPos pos)
protected void updatePortal()
public int getPortalCooldown()
public void setVelocity(double x, double y, double z)
public void handleStatusUpdate(byte id)
public void performHurtAnimation()
public java.lang.Iterable<ItemStack> getHeldEquipment()
public java.lang.Iterable<ItemStack> getArmorInventoryList()
public java.lang.Iterable<ItemStack> getEquipmentAndArmor()
public void setItemStackToSlot(EquipmentSlotType slotIn, ItemStack stack)
public boolean isBurning()
public boolean isPassenger()
public boolean isBeingRidden()
@Deprecated public boolean canBeRiddenInWater()
public void setSneaking(boolean keyDownIn)
public boolean isSneaking()
public boolean isSteppingCarefully()
public boolean isSuppressingBounce()
public boolean isDiscrete()
public boolean isDescending()
public boolean isCrouching()
public boolean isSprinting()
public void setSprinting(boolean sprinting)
public boolean isSwimming()
public boolean isActualySwimming()
public boolean isVisuallySwimming()
public void setSwimming(boolean p_204711_1_)
public boolean isGlowing()
public void setGlowing(boolean glowingIn)
public boolean isInvisible()
public boolean isInvisibleToPlayer(PlayerEntity player)
@Nullable public Team getTeam()
public boolean isOnSameTeam(Entity entityIn)
public boolean isOnScoreboardTeam(Team teamIn)
public void setInvisible(boolean invisible)
protected boolean getFlag(int flag)
protected void setFlag(int flag, boolean set)
public int getMaxAir()
public int getAir()
public void setAir(int air)
public void onStruckByLightning(LightningBoltEntity lightningBolt)
public void onEnterBubbleColumnWithAirAbove(boolean downwards)
public void onEnterBubbleColumn(boolean downwards)
public void onKillEntity(LivingEntity entityLivingIn)
protected void pushOutOfBlocks(double x, double y, double z)
public void setMotionMultiplier(BlockState state, Vec3d motionMultiplierIn)
private static void removeClickEvents(ITextComponent p_207712_0_)
public ITextComponent getName()
protected ITextComponent getProfessionName()
public boolean isEntityEqual(Entity entityIn)
public float getRotationYawHead()
public void setRotationYawHead(float rotation)
public void setRenderYawOffset(float offset)
public boolean canBeAttackedWithItem()
public boolean hitByEntity(Entity entityIn)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isInvulnerableTo(DamageSource source)
public boolean isInvulnerable()
public void setInvulnerable(boolean isInvulnerable)
public void copyLocationAndAnglesFrom(Entity entityIn)
public void copyDataFromOld(Entity entityIn)
@Nullable public Entity changeDimension(DimensionType destination)
@Nullable public Entity changeDimension(DimensionType destination, ITeleporter teleporter)
public boolean isNonBoss()
public float getExplosionResistance(Explosion explosionIn, IBlockReader worldIn, BlockPos pos, BlockState blockStateIn, IFluidState p_180428_5_, float p_180428_6_)
public boolean canExplosionDestroyBlock(Explosion explosionIn, IBlockReader worldIn, BlockPos pos, BlockState blockStateIn, float p_174816_5_)
public int getMaxFallHeight()
public Vec3d getLastPortalVec()
public Direction getTeleportDirection()
public boolean doesEntityNotTriggerPressurePlate()
public void fillCrashReport(CrashReportCategory category)
public boolean canRenderOnFire()
public void setUniqueId(java.util.UUID uniqueIdIn)
public java.util.UUID getUniqueID()
public java.lang.String getCachedUniqueIdString()
public java.lang.String getScoreboardName()
public boolean isPushedByWater()
public static double getRenderDistanceWeight()
public static void setRenderDistanceWeight(double renderDistWeight)
public ITextComponent getDisplayName()
getDisplayName
in interface INameable
public void setCustomName(@Nullable ITextComponent name)
@Nullable public ITextComponent getCustomName()
getCustomName
in interface INameable
public boolean hasCustomName()
hasCustomName
in interface INameable
public void setCustomNameVisible(boolean alwaysRenderNameTag)
public boolean isCustomNameVisible()
public final void teleportKeepLoaded(double p_223102_1_, double p_223102_3_, double p_223102_5_)
public void setPositionAndUpdate(double x, double y, double z)
public boolean getAlwaysRenderNameTagForRender()
public void notifyDataManagerChange(DataParameter<?> key)
public void recalculateSize()
public Direction getHorizontalFacing()
public Direction getAdjustedHorizontalFacing()
protected HoverEvent getHoverEvent()
public boolean isSpectatedByPlayer(ServerPlayerEntity player)
public AxisAlignedBB getBoundingBox()
public AxisAlignedBB getRenderBoundingBox()
protected AxisAlignedBB getBoundingBox(Pose p_213321_1_)
public void setBoundingBox(AxisAlignedBB bb)
protected float getEyeHeight(Pose poseIn, EntitySize sizeIn)
public float getEyeHeight(Pose p_213307_1_)
public final float getEyeHeight()
public boolean replaceItemInInventory(int inventorySlot, ItemStack itemStackIn)
public void sendMessage(ITextComponent component)
sendMessage
in interface ICommandSource
public BlockPos getPosition()
public Vec3d getPositionVector()
public World getEntityWorld()
@Nullable public MinecraftServer getServer()
public ActionResultType applyPlayerInteraction(PlayerEntity player, Vec3d vec, Hand hand)
public boolean isImmuneToExplosions()
protected void applyEnchantments(LivingEntity entityLivingBaseIn, Entity entityIn)
public void addTrackingPlayer(ServerPlayerEntity player)
public void removeTrackingPlayer(ServerPlayerEntity player)
public float getRotatedYaw(Rotation transformRotation)
public float getMirroredYaw(Mirror transformMirror)
public boolean ignoreItemEntityData()
public boolean setPositionNonDirty()
@Nullable public Entity getControllingPassenger()
public java.util.List<Entity> getPassengers()
public boolean isPassenger(Entity entityIn)
public boolean isPassenger(java.lang.Class<? extends Entity> p_205708_1_)
public java.util.Collection<Entity> getRecursivePassengers()
public java.util.stream.Stream<Entity> getSelfAndPassengers()
public boolean isOnePlayerRiding()
private void getRecursivePassengers(boolean playersOnly, java.util.Set<Entity> p_200604_2_)
public Entity getLowestRidingEntity()
public boolean isRidingSameEntity(Entity entityIn)
public boolean isRidingOrBeingRiddenBy(Entity entityIn)
public void repositionDirectPassengers(Entity.IMoveCallback p_226265_1_)
public boolean canPassengerSteer()
@Nullable public Entity getRidingEntity()
public PushReaction getPushReaction()
public SoundCategory getSoundCategory()
protected int getFireImmuneTicks()
public CommandSource getCommandSource()
protected int getPermissionLevel()
public boolean hasPermissionLevel(int p_211513_1_)
public boolean shouldReceiveFeedback()
shouldReceiveFeedback
in interface ICommandSource
public boolean shouldReceiveErrors()
shouldReceiveErrors
in interface ICommandSource
public boolean allowLogging()
allowLogging
in interface ICommandSource
public void lookAt(EntityAnchorArgument.Type p_200602_1_, Vec3d p_200602_2_)
public double getSubmergedHeight()
public final float getWidth()
public final float getHeight()
public abstract IPacket<?> createSpawnPacket()
public EntitySize getSize(Pose poseIn)
public Vec3d getPositionVec()
public Vec3d getMotion()
public void setMotion(Vec3d motionIn)
public void setMotion(double x, double y, double z)
public final double getPosX()
public double getPosXWidth(double p_226275_1_)
public double getPosXRandom(double p_226282_1_)
public final double getPosY()
public double getPosYHeight(double p_226283_1_)
public double getPosYRandom()
public double getPosYEye()
public final double getPosZ()
public double getPosZWidth(double p_226285_1_)
public double getPosZRandom(double p_226287_1_)
public void setRawPosition(double x, double y, double z)
public void checkDespawn()
public void moveForced(double p_225653_1_, double p_225653_3_, double p_225653_5_)
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
private float getEyeHeightForge(Pose pose, EntitySize size)