Package net.minecraft.server.level
Class ServerPlayer
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
net.minecraft.world.entity.LivingEntity
net.minecraft.world.entity.player.Player
net.minecraft.server.level.ServerPlayer
- All Implemented Interfaces:
DataComponentGetter
,SyncedDataHolder
,Attackable
,EntityAccess
,UniquelyIdentifyable
,Nameable
,ScoreHolder
,Waypoint
,WaypointTransmitter
,IAttachmentHolder
,IEntityExtension
,ILivingEntityExtension
,IPlayerExtension
- Direct Known Subclasses:
FakePlayer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static final record
Nested classes/interfaces inherited from class net.minecraft.world.entity.player.Player
Player.BedSleepingProblem
Nested classes/interfaces inherited from class net.minecraft.world.entity.LivingEntity
LivingEntity.Fallsounds
Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReason
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
Nested classes/interfaces inherited from interface net.minecraft.world.waypoints.Waypoint
Waypoint.Icon
Nested classes/interfaces inherited from interface net.minecraft.world.waypoints.WaypointTransmitter
WaypointTransmitter.BlockConnection, WaypointTransmitter.ChunkConnection, WaypointTransmitter.Connection, WaypointTransmitter.EntityAzimuthConnection, WaypointTransmitter.EntityBlockConnection, WaypointTransmitter.EntityChunkConnection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PlayerAdvancements
private boolean
static final double
private Entity
The entity the player is currently spectating through.private boolean
private RemoteChatSession
private ChatVisiblity
private ChunkTrackingView
private final CommandSource
private int
private final ContainerListener
private final ContainerSynchronizer
private static final AttributeModifier
private static final AttributeModifier
private static final boolean
private static final boolean
private boolean
static final String
static final int
static final String
private final Set
<ThrownEnderpearl> private Vec3
private Vec3
static final double
private static final int
final ServerPlayerGameMode
private boolean
private boolean
private String
private long
private Input
private boolean
private Vec3
private int
private int
private int
private int
private float
the total health of the player, includes actual health and absorption health.private int
private SectionPos
Player section position as last updated by TicketManager, used by ChunkManagerprivate int
private int
private float
private Vec3
private int
private static final org.slf4j.Logger
private static final int
private static final int
final Object
private ParticleStatus
private BlockPos
private final ServerRecipeBook
private int
private ServerPlayer.RespawnConfig
boolean
private final MinecraftServer
private static final Component
private boolean
private Vec3
private final ServerStatsCounter
private Component
private Component
private Component
static final String
private final TextFilter
private boolean
private WardenSpawnTracker
private static final AttributeModifier
boolean
Fields inherited from class net.minecraft.world.entity.player.Player
bob, CLIENT_LOADED_TIMEOUT_TIME, clientLoadedTimeoutTimer, containerMenu, CRAFTING_SLOT_OFFSET, CROUCH_BB_HEIGHT, currentExplosionCause, currentImpulseImpactPos, DATA_PLAYER_MAIN_HAND, DATA_PLAYER_MODE_CUSTOMISATION, DATA_SHOULDER_LEFT, DATA_SHOULDER_RIGHT, DEFAULT_BLOCK_INTERACTION_RANGE, DEFAULT_ENTITY_INTERACTION_RANGE, DEFAULT_EYE_HEIGHT, DEFAULT_MAIN_HAND, DEFAULT_MODEL_CUSTOMIZATION, DEFAULT_VEHICLE_ATTACHMENT, defaultFlySpeed, enchantmentSeed, ENDER_SLOT_OFFSET, enderChestInventory, experienceLevel, experienceProgress, fishing, foodData, HELD_ITEM_SLOT, hurtDir, inventoryMenu, jumpTriggerTime, MAX_HEALTH, oBob, PERSISTED_NBT_TAG, SLEEP_DURATION, STANDING_DIMENSIONS, SWIMMING_BB_HEIGHT, SWIMMING_BB_WIDTH, takeXpDelay, totalExperience, WAKE_UP_DURATION, wasUnderwater, xCloak, xCloakO, yCloak, yCloakO, zCloak, zCloakO
Fields inherited from class net.minecraft.world.entity.LivingEntity
ARMOR_SLOT_OFFSET, attackAnim, attackStrengthTicker, autoSpinAttackDmg, autoSpinAttackItemStack, autoSpinAttackTicks, BASE_JUMP_POWER, BODY_ARMOR_OFFSET, brain, damageContainers, DATA_LIVING_ENTITY_FLAGS, dead, DEATH_DURATION, deathTime, DEFAULT_BABY_SCALE, DEFAULT_BASE_GRAVITY, elytraAnimationState, equipment, EQUIPMENT_SLOT_OFFSET, EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT, fallFlyTicks, hurtDuration, hurtTime, INPUT_FRICTION, interpolation, invulnerableDuration, jumping, lastHurt, lastHurtByPlayer, lastHurtByPlayerMemoryTime, lerpHeadSteps, lerpYHeadRot, LIVING_ENTITY_FLAG_IS_USING, LIVING_ENTITY_FLAG_OFF_HAND, LIVING_ENTITY_FLAG_SPIN_ATTACK, MIN_MOVEMENT_DISTANCE, noActionTime, oAttackAnim, PLAYER_HURT_EXPERIENCE_TIME, PLAYER_NOT_WEARING_DISGUISE_ITEM, PLAYER_NOT_WEARING_DISGUISE_ITEM_FOR_TARGET, removeArrowTime, removeStingerTime, SADDLE_OFFSET, SLEEPING_DIMENSIONS, SWING_DURATION, swinging, swingingArm, swingTime, TAG_ATTRIBUTES, TAG_BRAIN, TAG_DEATH_TIME, TAG_EQUIPMENT, TAG_FALL_FLYING, TAG_HEALTH, TAG_HURT_BY_TIMESTAMP, TAG_HURT_TIME, TAG_SLEEPING_POS, useItem, useItemRemaining, walkAnimation, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zza
Fields inherited from class net.minecraft.world.entity.Entity
BASE_SAFE_FALL_DISTANCE, BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, CONTENTS_SLOT_INDEX, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5, DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0, ENTITY_COUNTER, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, invulnerableTime, isInPowderSnow, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, MAX_MOVEMENTS_HANDELED_PER_TICK, minorHorizontalCollision, moveDist, noPhysics, portalProcess, random, stringUUID, stuckSpeedMultiplier, TAG_AIR, TAG_DATA, TAG_FALL_DISTANCE, TAG_FIRE, TAG_GLOWING, TAG_ID, TAG_INVULNERABLE, TAG_MOTION, TAG_NO_GRAVITY, TAG_ON_GROUND, TAG_PASSENGERS, TAG_PORTAL_COOLDOWN, TAG_POS, TAG_ROTATION, TAG_SILENT, TAG_UUID, tickCount, TOTAL_AIR_SUPPLY, uuid, verticalCollision, verticalCollisionBelow, wasEyeInWater, wasInPowderSnow, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
Fields inherited from interface net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAME
Fields inherited from interface net.minecraft.world.waypoints.Waypoint
MAX_RANGE, WAYPOINT_TRANSMIT_RANGE_HIDE_MODIFIER
Fields inherited from interface net.minecraft.world.waypoints.WaypointTransmitter
REALLY_FAR_DISTANCE
-
Constructor Summary
ConstructorsConstructorDescriptionServerPlayer
(MinecraftServer p_254143_, ServerLevel p_254435_, com.mojang.authlib.GameProfile p_253651_, ClientInformation p_301997_) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
private boolean
acceptsSystemMessages
(boolean pOverlay) protected void
addAdditionalSaveData
(ValueOutput pOutput) adjustSpawnLocation
(ServerLevel pLevel, BlockPos pPos) boolean
void
Attacks for the player the targeted entity with the currently equipped item.void
awardKillScore
(Entity pEntity, DamageSource pDamageSource) int
awardRecipes
(Collection<RecipeHolder<?>> pRecipes) void
awardRecipesByKey
(List<ResourceKey<Recipe<?>>> pRecipes) void
Adds a value to a statistic field.private boolean
bedBlocked
(BlockPos pPos, Direction pDirection) private boolean
bedInRange
(BlockPos pPos, Direction pDirection) boolean
broadcastToPlayer
(ServerPlayer pPlayer) private GameType
calculateGameModeForNewPlayer
(GameType pGameType) boolean
boolean
canHarmPlayer
(Player pOther) protected void
checkFallDamage
(double pY, boolean pOnGround, BlockState pState, BlockPos pPos) void
checkMovementStatistics
(double pDx, double pDy, double pDz) void
checkRidingStatistics
(double pDx, double pDy, double pDz) void
void
protected void
void
copyRespawnPosition
(ServerPlayer pPlayer) createCommonSpawnInfo
(ServerLevel pLevel) protected ItemCooldowns
void
Called when the entity is dealt a critical hit.void
deregisterEnderPearl
(ThrownEnderpearl pEnderPearl) private static boolean
didNotMove
(double pDx, double pDy, double pDz) void
die
(DamageSource pCause) Called when the mob's health reaches 0.void
void
displayClientMessage
(Component pChatComponent, boolean pActionBar) void
void
doTick()
boolean
drop
(boolean pDropStack) private static Optional
<ServerPlayer.RespawnPosAngle> findRespawnAndUseSpawnBlock
(ServerLevel pLevel, ServerPlayer.RespawnConfig pRespawnConfig, boolean pUseCharge) findRespawnPositionAndUseSpawnBlock
(boolean pUseCharge, TeleportTransition.PostTeleportTransition pPostTeleportTransition) void
forceSetRotation
(float pYRot, float pXRot) gameMode()
private int
getCoprime
(int pSpawnArea) protected float
getEnchantedDamage
(Entity pEntity, float pDamage, DamageSource pDamageSource) Returns the language last reported by the player as their local language.long
int
getStats()
int
void
giveExperienceLevels
(int pLevels) Add experience levels to this player.void
giveExperiencePoints
(int pXpPoints) void
private void
handleTeamKill
(ScoreHolder pScoreHolder, ScoreHolder pTeamMember, ObjectiveCriteria[] pCriteria) void
boolean
boolean
hurtServer
(ServerLevel pLevel, DamageSource pDamageSource, float pAmount) void
indicateDamage
(double pXDistance, double pZDistance) void
private void
initMenu
(AbstractContainerMenu pMenu) boolean
boolean
isInvulnerableTo
(ServerLevel pLevel, DamageSource pDamageSource) private boolean
private boolean
isReachableBedBlock
(BlockPos pPos) boolean
boolean
void
level()
private void
loadAndSpawnEnderPearl
(ValueInput p_422176_) void
loadAndSpawnEnderPearls
(ValueInput pInput) void
loadAndSpawnParentVehicle
(ValueInput pInput) void
loadGameTypes
(ValueInput pInput) void
lookAt
(EntityAnchorArgument.Anchor pFromAnchor, Entity pEntity, EntityAnchorArgument.Anchor pToAnchor) void
lookAt
(EntityAnchorArgument.Anchor pAnchor, Vec3 pTarget) void
boolean
mayInteract
(ServerLevel pLevel, BlockPos pPos) private void
private boolean
noCollisionNoLiquid
(ServerLevel pLevel, AABB pCollisionBox) protected void
onAttributeUpdated
(Holder<Attribute> pAttribute) protected void
onChangedBlock
(ServerLevel pLevel, BlockPos pPos) protected void
onEffectAdded
(MobEffectInstance pEffectInstance, Entity pEntity) protected void
onEffectsRemoved
(Collection<MobEffectInstance> pEffects) protected void
onEffectUpdated
(MobEffectInstance pEffectInstance, boolean pForced, Entity pEntity) void
onEnchantmentPerformed
(ItemStack pEnchantedItem, int pCost) void
void
onEquippedItemBroken
(Item pItem, EquipmentSlot pSlot) void
onExplosionHit
(Entity pEntity) void
onInsideBlock
(BlockState pState) void
onItemPickup
(ItemEntity pItemEntity) void
void
void
openCommandBlock
(CommandBlockEntity pCommandBlock) void
openDialog
(Holder<Dialog> pDialog) void
openHorseInventory
(AbstractHorse pHorse, Container pInventory) void
openItemGui
(ItemStack pStack, InteractionHand pHand) openMenu
(MenuProvider pMenu) openMenu
(MenuProvider pMenu, Consumer<RegistryFriendlyByteBuf> extraDataWriter) Request to open a GUI on the client, from the servervoid
openTextEdit
(SignBlockEntity pSignEntity, boolean pIsFrontText) static long
placeEnderPearlTicket
(ServerLevel pLevel, ChunkPos pPos) void
playNotifySound
(SoundEvent pSound, SoundSource pSource, float pVolume, float pPitch) protected void
protected void
protected void
readAdditionalSaveData
(ValueInput pInput) private static GameType
readPlayerMode
(ValueInput pInput, String pKey) void
Force the name displayed in the tab list to refresh, by firingPlayerEvent.TabListNameFormat
.long
registerAndUpdateEnderPearlTicket
(ThrownEnderpearl pEnderPearl) void
registerEnderPearl
(ThrownEnderpearl pEnderPearl) void
int
void
void
int
resetRecipes
(Collection<RecipeHolder<?>> pRecipes) void
void
void
restoreFrom
(ServerPlayer pThat, boolean pKeepEverything) void
rideTick()
private void
saveEnderPearls
(ValueOutput pOutput) private void
saveParentVehicle
(ValueOutput pOutput) void
sendChatMessage
(OutgoingChatMessage pMessage, boolean pFiltered, ChatType.Bound pBoundType) void
sendMerchantOffers
(int pContainerId, MerchantOffers pOffers, int pLevel, int pXp, boolean pShowProgress, boolean pCanRestock) void
sendServerStatus
(ServerStatus pServerStatus) void
sendSystemMessage
(Component pMesage) void
sendSystemMessage
(Component pMessage, boolean pOverlay) void
void
setChatSession
(RemoteChatSession pChatSession) void
setChunkTrackingView
(ChunkTrackingView pChunkTrackingView) void
setExperienceLevels
(int pLevel) void
setExperiencePoints
(int pExperiencePoints) boolean
setGameMode
(GameType pGameMode) void
setKnownMovement
(Vec3 pKnownMovement) void
setLastClientInput
(Input pLastClientInput) void
setLastSectionPos
(SectionPos pSectionPos) void
setRaidOmenPosition
(BlockPos pRaidOmenPosition) void
setRespawnPosition
(ServerPlayer.RespawnConfig pRespawnConfig, boolean pDisplayInChat) void
setServerLevel
(ServerLevel pLevel) void
setSpawnExtraParticlesOnFall
(boolean pSpawnExtraParticlesOnFall) void
setTabListFooter
(Component footer) Set the tab list footer while preserving the header.void
setTabListHeader
(Component header) Set the tab list header while preserving the footer.void
setTabListHeaderFooter
(Component header, Component footer) Set the tab list header and footer at once.boolean
shouldFilterMessageTo
(ServerPlayer pPlayer) void
void
snapTo
(double pX, double pY, double pZ) boolean
startRiding
(Entity pVehicle, boolean pForce) com.mojang.datafixers.util.Either
<Player.BedSleepingProblem, Unit> startSleepInBed
(BlockPos p_9115_) void
startSleeping
(BlockPos pPos) void
stopSleepInBed
(boolean pWakeImmediately, boolean pUpdateLevelForSleepingPlayers) private void
storeGameTypes
(ValueOutput pOutput) void
swing
(InteractionHand pHand) private void
void
Called when the entity picks up an item.teleport
(TeleportTransition pTeleportTransition) void
teleportRelative
(double pDx, double pDy, double pDz) void
teleportTo
(double pX, double pY, double pZ) Sets the position of the entity and updates the 'last' variablesboolean
teleportTo
(ServerLevel pLevel, double pX, double pY, double pZ, Set<Relative> pRelativeMovements, float pYaw, float pPitch, boolean pSetCamera) private void
void
tick()
protected void
void
void
private void
void
triggerRecipeCrafted
(RecipeHolder<?> pRecipe, List<ItemStack> pItems) protected void
void
updateOptions
(ClientInformation pClientInformation) private void
private void
updateScoreForCriteria
(ObjectiveCriteria pCriteria, int pPoints) protected void
updateUsingItem
(ItemStack pUsingItem) Methods inherited from class net.minecraft.world.entity.player.Player
actuallyHurt, addItem, aiStep, animateHurt, awardStat, awardStat, awardStat, blockActionRestricted, blockInteractionRange, blockUsingItem, canBeHitByProjectile, canBeSeenAsEnemy, canDropItems, canEat, canGlide, canInteractWithBlock, canInteractWithEntity, canInteractWithEntity, canPlayerFitWithinBlocksAndEntitiesWhen, canSimulateMovement, canSprint, canUseGameMasterBlocks, causeFallDamage, causeFoodExhaustion, createAttributes, createEquipment, debugInfo, defineSynchedData, destroyVanishingCursedItems, doAutoAttackOnTouch, doesEmitEquipEvent, doWaterSplashEffect, drop, dropEquipment, entityInteractionRange, freeAt, getAbilities, getAbsorptionAmount, getAttackStrengthScale, getBaseExperienceReward, getBlockSpeedFactor, getCooldowns, getCurrentItemAttackStrengthDelay, getDeathSound, getDefaultDimensions, getDestroySpeed, getDestroySpeed, getDimensionChangingDelay, getDismountPoses, getDisplayName, getEnchantmentSeed, getEnderChestInventory, getFallSounds, getFireImmuneTicks, getFlyingSpeed, getFoodData, getForcedPose, getGameProfile, getHurtDir, getHurtSound, getInventory, getLastDeathLocation, getLuck, getMainArm, getMaxHeadRotationRelativeToBody, getMovementEmission, getName, getPrefixes, getProjectile, getRopeHoldPosition, getScore, getScoreboard, getScoreboardName, getShoulderEntityLeft, getShoulderEntityRight, getSleepTimer, getSlot, getSoundSource, getSpeed, getSuffixes, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getWeaponItem, getXpNeededForNextLevel, handleCreativeModeItemDrop, handleEntityEvent, hasClientLoaded, hasContainerOpen, hasCorrectToolForDrops, hasCorrectToolForDrops, hasInfiniteMaterials, hasPermissions, hurtArmor, hurtHelmet, increaseScore, interactOn, internalSetAbsorptionAmount, isAffectedByFluids, isAlwaysExperienceDropper, isAlwaysTicking, isClientAuthoritative, isCreative, isEffectiveAi, isHurt, isIgnoringFallDamageFromCurrentImpulse, isImmobile, isLocalClientAuthoritative, isLocalPlayer, isModelPartShown, isPushedByFluid, isReducedDebugInfo, isScoping, isSecondaryUseActive, isSleepingLongEnough, isSpectator, isStayingOnGroundSurface, isSwimming, killedEntity, makeStuckInBlock, maybeBackOffFromEdge, mayBuild, mayUseItemAt, onAboveBubbleColumn, onClimbable, onInsideBubbleColumn, openJigsawBlock, openMinecartCommandBlock, openStructureBlock, openTestBlock, openTestInstanceBlock, playSound, playStepSound, preventsBlockDrops, refreshDisplayName, remove, removeEntitiesOnShoulder, resetAttackStrengthTicker, resetCurrentImpulseContext, respawn, setClientLoaded, setEntityOnShoulder, setForcedPose, setIgnoreFallDamageFromCurrentImpulse, setLastDeathLocation, setMainArm, setReducedDebugInfo, setRemainingFireTicks, setScore, setShoulderEntityLeft, setShoulderEntityRight, shouldBeSaved, shouldRotateWithMinecart, shouldShowName, startAutoSpinAttack, startFallFlying, stopSleeping, sweepAttack, tickClientLoadTimeout, travel, tryResetCurrentImpulseContext, tryToStartFallFlying, updateIsUnderwater, updatePlayerPose, updateSwimming, updateTutorialInventoryAction, wantsToStopRiding
Methods inherited from class net.minecraft.world.entity.LivingEntity
activeLocationDependentEnchantments, addEffect, addEffect, applyInput, applyItemBlocking, areAllEffectsAmbient, attackable, baseTick, blockedByItem, brainProvider, calculateEntityAnimation, calculateFallDamage, canAttack, canAttackType, canBeAffected, canBeSeenByAnyone, canBreatheUnderwater, canDispenserEquipIntoSlot, canEquipWithDispenser, canFreeze, canGlideUsing, canPickUpLoot, canStandOnFluid, canUsePortal, canUseSlot, checkAutoSpinAttack, clearSleepingPos, createLivingAttributes, createWitherRose, decreaseAirSupply, doHurtEquipment, doHurtTarget, doPush, dropAllDeathLoot, dropCustomDeathLoot, dropExperience, dropFromGiftLootTable, dropFromLootTable, dropFromLootTable, dropFromShearingLootTable, equipmentHasChanged, forceAddEffect, getActiveEffects, getActiveEffectsMap, getAgeScale, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributes, getAttributeValue, getBedOrientation, getBrain, getCombatTracker, getComfortableFallDistance, getCurrentSwingDuration, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDefaultGravity, getDimensions, getEffect, getEffectBlendFactor, getEffectiveGravity, getEquipmentSlotForItem, getEquipSound, getExperienceReward, getFallFlyingTicks, getFluidFallingAdjustedMovement, getHealth, getHitbox, getInterpolation, getItemBlockingWith, getItemBySlot, getItemHeldByArm, getItemInHand, getJumpBoostPower, getJumpPower, getJumpPower, getKillCredit, getKnockback, getLastAttacker, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtByPlayer, getLastHurtByPlayerMemoryTime, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getLootTableSeed, getMainHandItem, getMaxAbsorption, getMaxFallDistance, getMaxHealth, getNoActionTime, getOffhandItem, getPassengerRidingPosition, getPreciseBodyRotation, getRelativePortalPosition, getRiddenInput, getRiddenSpeed, getScale, getSecondsToDisableBlocking, getSleepingPos, getSlotForHand, getSoundVolume, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVisualRotationYInDegrees, getVoicePitch, getWaterSlowDown, getYHeadRot, goDownInWater, handleDamageEvent, hasEffect, hasItemInSlot, hasLandedInLiquid, hasLineOfSight, hasLineOfSight, heal, igniteForTicks, increaseAirSupply, isAffectedByPotions, isAlive, isAutoSpinAttack, isBaby, isBlocking, isCurrentlyGlowing, isDeadOrDying, isEquippableInSlot, isFallFlying, isHolding, isHolding, isInvertedHealAndHarm, isInWall, isJumping, isLookingAtMe, isPickable, isPushable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isTransmittingWaypoint, isUsingItem, isVisuallySwimming, jumpInLiquid, kill, knockback, lerpHeadRotationStep, lerpHeadTo, makeBrain, makePoofParticles, makeSound, makeWaypointConnectionWith, maxUpStep, onBelowWorld, onEquipItem, onRemoval, onSyncedDataUpdated, playBlockFallSound, playHurtSound, push, randomTeleport, recreateFromPacket, releaseUsingItem, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeFrost, resetForwardDirectionOfRelativePortalPosition, resolveMobResponsibleForDamage, resolvePlayerResponsibleForDamage, sanitizeScale, sendEffectToPassengers, serverAiStep, setAbsorptionAmount, setArrowCount, setDiscardFriction, setHealth, setItemInHand, setItemSlot, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setRecordPlayingNearby, setSleepingPos, setSpeed, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDiscardFriction, shouldDropExperience, shouldDropLoot, skipDropExperience, spawnItemParticles, startUsingItem, stopFallFlying, stopRiding, stopUsingItem, swing, tickDeath, tickEffects, tickHeadTurn, tickRidden, travelFlying, travelFlying, triggerOnDeathMobEffects, tryAddFrost, updateEffectVisibility, updateFallFlying, updateSwingTime, updateWalkAnimation, wasExperienceConsumed, waypointIcon, wouldNotSuffocateAtTargetPose
Methods inherited from class net.minecraft.world.entity.Entity
absSnapRotationTo, absSnapTo, absSnapTo, addDeltaMovement, addPassenger, addTag, applyComponentsFromItemStack, applyEffectsFromBlocks, applyEffectsFromBlocks, applyGravity, applyImplicitComponent, applyImplicitComponentIfPresent, applyImplicitComponents, blockPosition, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canCollideWith, canControlVehicle, canRide, canSpawnSprintParticle, canTeleport, canTrample, captureDrops, captureDrops, castComponentValue, checkBelowWorld, checkDespawn, checkFallDistanceAccumulation, checkSupportingBlock, chunkPosition, clearFire, clearFreeze, clearMovementThisTick, closerThan, closerThan, collideBoundingBox, collidedWithFluid, collidedWithShapeMovingFrom, considersEntityAsAlly, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStackForNameResolution, createHoverEvent, damageSources, dampensVibrations, deflection, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doCheckFallDamage, dropAllLeashConnections, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, fireImmune, fixupDimensions, fudgePositionAfterSizeChange, gameEvent, gameEvent, get, getAddEntityPacket, getAirSupply, getAttachments, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCapability, getCapability, getCollisionHorizontalEscapeVector, getControlledVehicle, getControllingPassenger, getCustomName, getDefaultPassengerAttachmentPoint, getDeltaMovement, getDirection, getDismountLocationForPassenger, getEncodeId, getEntityData, getEyeHeight, getEyeHeight, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getGravity, getHandHoldingItemAngle, getId, getInBlockState, getIndirectPassengers, getInputVector, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getLootTable, getMaxAirSupply, getMaxHeightFluidType, getMotionDirection, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengers, getPassengersAndSelf, getPercentFrozen, getPersistentData, getPickRadius, getPickResult, getPistonPushReaction, getPortalCooldown, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getQuadLeashHolderOffsets, getRandom, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRequiresPrecisePosition, getRootVehicle, getRotationVector, getSelfAndPassengers, getServer, getSharedFlag, getStringUUID, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getVehicleAttachmentPoint, getViewScale, getViewVector, getViewXRot, getX, getX, getXRot, getXRot, getY, getY, getYRot, getYRot, getZ, getZ, handleOnAboveBubbleColumn, handleOnInsideBubbleColumn, handlePortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPose, hurt, hurtClient, hurtOrSimulate, igniteForSeconds, ignoreExplosion, interact, interactAt, is, isAddedToLevel, isAffectedByBlocks, isAlliedTo, isAlliedTo, isAttackable, isColliding, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFlapping, isFlyingVehicle, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInClouds, isInFluidType, isInFluidType, isInLava, isInLiquid, isInterpolating, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableToBase, isInWater, isInWaterOrRain, isLocalInstanceAuthoritative, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isRemoved, isShiftKeyDown, isSilent, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isUnderWater, isVehicle, isVisuallyCrawling, lavaHurt, lavaIgnite, lerpMotion, lerpPositionAndRotationStep, limitPistonMovement, load, makeBoundingBox, makeBoundingBox, markHurt, mirror, move, moveOrInterpolateTo, moveRelative, moveTowardsClosestSpace, nextStep, notifyLeasheeRemoved, notifyLeashHolder, oldPosition, onAddedToLevel, onClientRemoval, onFlap, onGround, onPassengerTurned, onRemovedFromLevel, onSyncedDataUpdated, pick, placePortalTicket, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSwimSound, position, positionRider, positionRider, problemPath, processFlappingMovement, propagateFallToPassengers, push, push, reapplyPosition, refreshDimensions, registryAccess, removeAfterChangingDimensions, removeLatestMovementRecording, removePassenger, removeTag, repositionEntityAfterLoad, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, sendBubbleColumnParticles, setAirSupply, setAsInsidePortal, setBoundingBox, setComponent, setCustomName, setCustomNameVisible, setData, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setNoGravity, setOldPos, setOldPosAndRot, setOldPosAndRot, setOldRot, setOnGround, setOnGroundWithMovement, setOnGroundWithMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemoved, setRequiresPrecisePosition, setRot, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYRot, shearOffAllLeashConnections, shouldBlockExplode, shouldPlayLavaHurtSound, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, snapTo, snapTo, snapTo, snapTo, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startSeenByPlayer, stopSeenByPlayer, supportQuadLeashAsHolder, syncPacketPositionCodec, teleportSetPosition, teleportSpectators, thunderHit, toString, touchingUnloadedChunk, trackingPosition, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, waterSwimSound
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, removeData, serializeAttachments
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.core.component.DataComponentGetter
get, getOrDefault, getOrDefault, getTyped, has, has
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtension
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canTrample, captureDrops, captureDrops, copyAttachmentsFrom, getClassification, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getParts, getPersistentData, getSoundFromFluidType, hasCustomOutlineRendering, isAddedToLevel, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, onAddedToLevel, onRemovedFromLevel, revive, sendPairingData, shouldRiderSit
Methods inherited from interface net.neoforged.neoforge.common.extensions.ILivingEntityExtension
canDrownInFluidType, canSwimInFluidType, jumpInFluid, moveInFluid, onDamageTaken, self, sinkInFluid
Methods inherited from interface net.neoforged.neoforge.common.extensions.IPlayerExtension
isCloseEnough, isFakePlayer, mayFly, openMenu
Methods inherited from interface net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ- See Also:
-
NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y- See Also:
-
FLY_STAT_RECORDING_SPEED
private static final int FLY_STAT_RECORDING_SPEED- See Also:
-
BLOCK_INTERACTION_DISTANCE_VERIFICATION_BUFFER
public static final double BLOCK_INTERACTION_DISTANCE_VERIFICATION_BUFFER- See Also:
-
ENTITY_INTERACTION_DISTANCE_VERIFICATION_BUFFER
public static final double ENTITY_INTERACTION_DISTANCE_VERIFICATION_BUFFER- See Also:
-
ENDER_PEARL_TICKET_RADIUS
public static final int ENDER_PEARL_TICKET_RADIUS- See Also:
-
ENDER_PEARLS_TAG
- See Also:
-
ENDER_PEARL_DIMENSION_TAG
- See Also:
-
TAG_DIMENSION
- See Also:
-
CREATIVE_BLOCK_INTERACTION_RANGE_MODIFIER
-
CREATIVE_ENTITY_INTERACTION_RANGE_MODIFIER
-
SPAWN_SET_MESSAGE
-
WAYPOINT_TRANSMIT_RANGE_CROUCH_MODIFIER
-
DEFAULT_SEEN_CREDITS
private static final boolean DEFAULT_SEEN_CREDITS- See Also:
-
DEFAULT_SPAWN_EXTRA_PARTICLES_ON_FALL
private static final boolean DEFAULT_SPAWN_EXTRA_PARTICLES_ON_FALL- See Also:
-
connection
-
server
-
gameMode
-
advancements
-
stats
-
lastRecordedHealthAndAbsorption
private float lastRecordedHealthAndAbsorptionthe total health of the player, includes actual health and absorption health. Updated every tick. -
lastRecordedFoodLevel
private int lastRecordedFoodLevel -
lastRecordedAirLevel
private int lastRecordedAirLevel -
lastRecordedArmor
private int lastRecordedArmor -
lastRecordedLevel
private int lastRecordedLevel -
lastRecordedExperience
private int lastRecordedExperience -
lastSentHealth
private float lastSentHealth -
lastSentFood
private int lastSentFood -
lastFoodSaturationZero
private boolean lastFoodSaturationZero -
lastSentExp
private int lastSentExp -
chatVisibility
-
particleStatus
-
canChatColor
private boolean canChatColor -
lastActionTime
private long lastActionTime -
camera
The entity the player is currently spectating through. -
isChangingDimension
private boolean isChangingDimension -
seenCredits
public boolean seenCredits -
recipeBook
-
levitationStartPos
-
levitationStartTime
private int levitationStartTime -
disconnected
private boolean disconnected -
requestedViewDistance
private int requestedViewDistance -
language
-
startingToFallPosition
-
enteredNetherPosition
-
enteredLavaOnVehiclePosition
-
lastSectionPos
Player section position as last updated by TicketManager, used by ChunkManager -
chunkTrackingView
-
respawnConfig
-
textFilter
-
textFilteringEnabled
private boolean textFilteringEnabled -
allowsListing
private boolean allowsListing -
spawnExtraParticlesOnFall
private boolean spawnExtraParticlesOnFall -
wardenSpawnTracker
-
raidOmenPosition
-
lastKnownClientMovement
-
lastClientInput
-
enderPearls
-
containerSynchronizer
-
containerListener
-
chatSession
-
object
-
commandSource
-
containerCounter
private int containerCounter -
wonGame
public boolean wonGame -
tabListHeader
-
hasTabListName
private boolean hasTabListName -
tabListDisplayName
-
-
Constructor Details
-
ServerPlayer
public ServerPlayer(MinecraftServer p_254143_, ServerLevel p_254435_, com.mojang.authlib.GameProfile p_253651_, ClientInformation p_301997_)
-
-
Method Details
-
adjustSpawnLocation
- Overrides:
adjustSpawnLocation
in classEntity
-
noCollisionNoLiquid
-
getCoprime
private int getCoprime(int pSpawnArea) -
readAdditionalSaveData
- Overrides:
readAdditionalSaveData
in classPlayer
-
addAdditionalSaveData
- Overrides:
addAdditionalSaveData
in classPlayer
-
saveParentVehicle
-
loadAndSpawnParentVehicle
-
saveEnderPearls
-
loadAndSpawnEnderPearls
-
loadAndSpawnEnderPearl
-
setExperiencePoints
public void setExperiencePoints(int pExperiencePoints) -
setExperienceLevels
public void setExperienceLevels(int pLevel) -
giveExperienceLevels
public void giveExperienceLevels(int pLevels) Add experience levels to this player.- Overrides:
giveExperienceLevels
in classPlayer
-
onEnchantmentPerformed
- Overrides:
onEnchantmentPerformed
in classPlayer
-
initMenu
-
initInventoryMenu
public void initInventoryMenu() -
onEnterCombat
public void onEnterCombat()- Overrides:
onEnterCombat
in classLivingEntity
-
onLeaveCombat
public void onLeaveCombat()- Overrides:
onLeaveCombat
in classLivingEntity
-
onInsideBlock
- Overrides:
onInsideBlock
in classEntity
-
createItemCooldowns
- Overrides:
createItemCooldowns
in classPlayer
-
tick
public void tick() -
updatePlayerAttributes
private void updatePlayerAttributes() -
doTick
public void doTick() -
synchronizeSpecialItemUpdates
-
tickRegeneration
protected void tickRegeneration()- Overrides:
tickRegeneration
in classPlayer
-
resetFallDistance
public void resetFallDistance()- Overrides:
resetFallDistance
in classEntity
-
trackStartFallingPosition
public void trackStartFallingPosition() -
trackEnteredOrExitedLavaOnVehicle
public void trackEnteredOrExitedLavaOnVehicle() -
updateScoreForCriteria
-
die
Called when the mob's health reaches 0. -
tellNeutralMobsThatIDied
private void tellNeutralMobsThatIDied() -
awardKillScore
- Overrides:
awardKillScore
in classEntity
-
handleTeamKill
private void handleTeamKill(ScoreHolder pScoreHolder, ScoreHolder pTeamMember, ObjectiveCriteria[] pCriteria) -
hurtServer
- Overrides:
hurtServer
in classPlayer
-
canHarmPlayer
- Overrides:
canHarmPlayer
in classPlayer
-
isPvpAllowed
private boolean isPvpAllowed() -
findRespawnPositionAndUseSpawnBlock
public TeleportTransition findRespawnPositionAndUseSpawnBlock(boolean pUseCharge, TeleportTransition.PostTeleportTransition pPostTeleportTransition) -
isReceivingWaypoints
public boolean isReceivingWaypoints() -
onAttributeUpdated
- Overrides:
onAttributeUpdated
in classLivingEntity
-
findRespawnAndUseSpawnBlock
private static Optional<ServerPlayer.RespawnPosAngle> findRespawnAndUseSpawnBlock(ServerLevel pLevel, ServerPlayer.RespawnConfig pRespawnConfig, boolean pUseCharge) -
showEndCredits
public void showEndCredits() -
teleport
-
forceSetRotation
public void forceSetRotation(float pYRot, float pXRot) - Overrides:
forceSetRotation
in classEntity
-
triggerDimensionChangeTriggers
-
broadcastToPlayer
- Overrides:
broadcastToPlayer
in classEntity
-
take
Called when the entity picks up an item.- Overrides:
take
in classLivingEntity
-
startSleepInBed
public com.mojang.datafixers.util.Either<Player.BedSleepingProblem,Unit> startSleepInBed(BlockPos p_9115_) - Overrides:
startSleepInBed
in classPlayer
-
startSleeping
- Overrides:
startSleeping
in classLivingEntity
-
bedInRange
-
isReachableBedBlock
-
bedBlocked
-
stopSleepInBed
public void stopSleepInBed(boolean pWakeImmediately, boolean pUpdateLevelForSleepingPlayers) - Overrides:
stopSleepInBed
in classPlayer
-
isInvulnerableTo
- Overrides:
isInvulnerableTo
in classPlayer
-
onChangedBlock
- Overrides:
onChangedBlock
in classLivingEntity
-
checkFallDamage
- Overrides:
checkFallDamage
in classLivingEntity
-
onExplosionHit
- Overrides:
onExplosionHit
in classEntity
-
pushEntities
protected void pushEntities()- Overrides:
pushEntities
in classLivingEntity
-
openTextEdit
- Overrides:
openTextEdit
in classPlayer
-
openDialog
- Overrides:
openDialog
in classPlayer
-
nextContainerCounter
private void nextContainerCounter() -
openMenu
-
openMenu
public OptionalInt openMenu(@Nullable MenuProvider pMenu, @Nullable Consumer<RegistryFriendlyByteBuf> extraDataWriter) Description copied from interface:IPlayerExtension
Request to open a GUI on the client, from the serverRefer to
IMenuTypeExtension.create(IContainerFactory)
for creating aMenuType
that can consume the extra data sent to the client by this method.The maximum size for #extraDataWriter is 32600 bytes.
- Parameters:
pMenu
- A supplier of container properties including the registry name of the containerextraDataWriter
- Consumer to write any additional data the GUI needs. This data is written afterIMenuProviderExtension.writeClientSideData(AbstractContainerMenu, RegistryFriendlyByteBuf)
.- Returns:
- The window ID of the opened GUI, or empty if the GUI could not be opened
-
sendMerchantOffers
public void sendMerchantOffers(int pContainerId, MerchantOffers pOffers, int pLevel, int pXp, boolean pShowProgress, boolean pCanRestock) - Overrides:
sendMerchantOffers
in classPlayer
-
openHorseInventory
- Overrides:
openHorseInventory
in classPlayer
-
openItemGui
- Overrides:
openItemGui
in classPlayer
-
openCommandBlock
- Overrides:
openCommandBlock
in classPlayer
-
closeContainer
public void closeContainer()- Overrides:
closeContainer
in classPlayer
-
doCloseContainer
public void doCloseContainer()- Overrides:
doCloseContainer
in classPlayer
-
rideTick
public void rideTick() -
checkMovementStatistics
public void checkMovementStatistics(double pDx, double pDy, double pDz) -
checkRidingStatistics
public void checkRidingStatistics(double pDx, double pDy, double pDz) -
didNotMove
private static boolean didNotMove(double pDx, double pDy, double pDz) -
awardStat
Adds a value to a statistic field. -
resetStat
-
awardRecipes
- Overrides:
awardRecipes
in classPlayer
-
triggerRecipeCrafted
- Overrides:
triggerRecipeCrafted
in classPlayer
-
awardRecipesByKey
- Overrides:
awardRecipesByKey
in classPlayer
-
resetRecipes
- Overrides:
resetRecipes
in classPlayer
-
jumpFromGround
public void jumpFromGround()- Overrides:
jumpFromGround
in classLivingEntity
-
giveExperiencePoints
public void giveExperiencePoints(int pXpPoints) - Overrides:
giveExperiencePoints
in classPlayer
-
disconnect
public void disconnect() -
hasDisconnected
public boolean hasDisconnected() -
resetSentInfo
public void resetSentInfo() -
displayClientMessage
- Overrides:
displayClientMessage
in classPlayer
-
completeUsingItem
protected void completeUsingItem()- Overrides:
completeUsingItem
in classLivingEntity
-
lookAt
- Overrides:
lookAt
in classLivingEntity
-
lookAt
public void lookAt(EntityAnchorArgument.Anchor pFromAnchor, Entity pEntity, EntityAnchorArgument.Anchor pToAnchor) -
restoreFrom
-
onEffectAdded
- Overrides:
onEffectAdded
in classLivingEntity
-
onEffectUpdated
protected void onEffectUpdated(MobEffectInstance pEffectInstance, boolean pForced, @Nullable Entity pEntity) - Overrides:
onEffectUpdated
in classLivingEntity
-
onEffectsRemoved
- Overrides:
onEffectsRemoved
in classLivingEntity
-
teleportTo
public void teleportTo(double pX, double pY, double pZ) Sets the position of the entity and updates the 'last' variables- Overrides:
teleportTo
in classEntity
-
teleportRelative
public void teleportRelative(double pDx, double pDy, double pDz) - Overrides:
teleportRelative
in classEntity
-
teleportTo
public boolean teleportTo(ServerLevel pLevel, double pX, double pY, double pZ, Set<Relative> pRelativeMovements, float pYaw, float pPitch, boolean pSetCamera) - Overrides:
teleportTo
in classEntity
-
snapTo
public void snapTo(double pX, double pY, double pZ) -
crit
Called when the entity is dealt a critical hit. -
magicCrit
-
onUpdateAbilities
public void onUpdateAbilities()- Overrides:
onUpdateAbilities
in classPlayer
-
level
-
setGameMode
-
gameMode
-
commandSource
-
createCommandSourceStack
-
sendSystemMessage
-
sendSystemMessage
-
sendChatMessage
public void sendChatMessage(OutgoingChatMessage pMessage, boolean pFiltered, ChatType.Bound pBoundType) -
getIpAddress
-
updateOptions
-
clientInformation
-
canChatInColor
public boolean canChatInColor() -
getChatVisibility
-
acceptsSystemMessages
private boolean acceptsSystemMessages(boolean pOverlay) -
acceptsChatMessages
private boolean acceptsChatMessages() -
requestedViewDistance
public int requestedViewDistance() -
sendServerStatus
-
getPermissionLevel
public int getPermissionLevel()- Overrides:
getPermissionLevel
in classPlayer
-
resetLastActionTime
public void resetLastActionTime() -
getStats
-
getRecipeBook
-
updateInvisibilityStatus
protected void updateInvisibilityStatus()- Overrides:
updateInvisibilityStatus
in classLivingEntity
-
getCamera
-
setCamera
-
processPortalCooldown
protected void processPortalCooldown()- Overrides:
processPortalCooldown
in classEntity
-
attack
Attacks for the player the targeted entity with the currently equipped item. The equipped item has hitEntity called on it. Args: targetEntity -
getLastActionTime
public long getLastActionTime() -
getTabListDisplayName
-
getTabListOrder
public int getTabListOrder() -
swing
- Overrides:
swing
in classLivingEntity
-
isChangingDimension
public boolean isChangingDimension() -
hasChangedDimension
public void hasChangedDimension() -
getAdvancements
-
getRespawnConfig
-
copyRespawnPosition
-
setRespawnPosition
public void setRespawnPosition(@Nullable ServerPlayer.RespawnConfig pRespawnConfig, boolean pDisplayInChat) -
getLastSectionPos
-
setLastSectionPos
-
getChunkTrackingView
-
setChunkTrackingView
-
playNotifySound
- Overrides:
playNotifySound
in classPlayer
-
drop
- Overrides:
drop
in classLivingEntity
-
getLanguage
Returns the language last reported by the player as their local language. Defaults to en_us if the value is unknown. -
getTabListHeader
-
setTabListHeader
Set the tab list header while preserving the footer.- Parameters:
header
- the new header, orComponent.empty()
to clear
-
refreshTabListName
public void refreshTabListName()Force the name displayed in the tab list to refresh, by firingPlayerEvent.TabListNameFormat
. -
getTextFilter
-
setServerLevel
-
readPlayerMode
-
calculateGameModeForNewPlayer
-
loadGameTypes
-
storeGameTypes
-
isTextFilteringEnabled
public boolean isTextFilteringEnabled()- Overrides:
isTextFilteringEnabled
in classPlayer
-
shouldFilterMessageTo
-
mayInteract
- Overrides:
mayInteract
in classEntity
-
updateUsingItem
- Overrides:
updateUsingItem
in classLivingEntity
-
drop
public boolean drop(boolean pDropStack) - Parameters:
pDropStack
- Whether to drop the entire stack of items. Iffalse
, drops a single item.
-
handleExtraItemsCreatedOnUse
- Overrides:
handleExtraItemsCreatedOnUse
in classLivingEntity
-
allowsListing
public boolean allowsListing() -
getWardenSpawnTracker
- Overrides:
getWardenSpawnTracker
in classPlayer
-
setSpawnExtraParticlesOnFall
public void setSpawnExtraParticlesOnFall(boolean pSpawnExtraParticlesOnFall) -
onItemPickup
- Overrides:
onItemPickup
in classLivingEntity
-
setChatSession
-
getChatSession
-
indicateDamage
public void indicateDamage(double pXDistance, double pZDistance) - Overrides:
indicateDamage
in classLivingEntity
-
startRiding
- Overrides:
startRiding
in classEntity
-
removeVehicle
public void removeVehicle()- Overrides:
removeVehicle
in classPlayer
-
createCommonSpawnInfo
-
setRaidOmenPosition
-
clearRaidOmenPosition
public void clearRaidOmenPosition() -
getRaidOmenPosition
-
getKnownMovement
- Overrides:
getKnownMovement
in classEntity
-
setKnownMovement
-
getEnchantedDamage
- Overrides:
getEnchantedDamage
in classPlayer
-
onEquippedItemBroken
- Overrides:
onEquippedItemBroken
in classLivingEntity
-
getLastClientInput
-
setLastClientInput
-
getLastClientMoveIntent
-
registerEnderPearl
-
deregisterEnderPearl
-
getEnderPearls
-
registerAndUpdateEnderPearlTicket
-
placeEnderPearlTicket
-