Package net.minecraft.server.level
Class ServerPlayer
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<Entity>
net.minecraft.world.entity.Entity
net.minecraft.world.entity.LivingEntity
net.minecraft.world.entity.player.Player
net.minecraft.server.level.ServerPlayer
- All Implemented Interfaces:
CommandSource
,Attackable
,EntityAccess
,Nameable
,ICapabilityProvider
,ICapabilityProviderImpl<Entity>
,ICapabilitySerializable<CompoundTag>
,IForgeEntity
,IForgeLivingEntity
,IForgePlayer
,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
FakePlayer
-
Nested Class Summary
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.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final PlayerAdvancements
private boolean
private Entity
private boolean
private RemoteChatSession
private ChatVisiblity
int
private final ContainerListener
private final ContainerSynchronizer
private boolean
private Vec3
private Vec3
final ServerPlayerGameMode
private boolean
private boolean
private String
private long
private boolean
private int
private int
private int
private int
private float
private int
private SectionPos
private int
private int
private float
int
private Vec3
private int
private static final org.slf4j.Logger
private static final int
private static final int
private final ServerRecipeBook
private float
private ResourceKey<Level>
private boolean
private BlockPos
private boolean
final MinecraftServer
private int
private Vec3
private final ServerStatsCounter
private Component
private Component
private Component
private final TextFilter
private boolean
private WardenSpawnTracker
boolean
Fields inherited from class net.minecraft.world.entity.player.Player
bob, containerMenu, CROUCH_BB_HEIGHT, DATA_PLAYER_MAIN_HAND, DATA_PLAYER_MODE_CUSTOMISATION, DATA_SHOULDER_LEFT, DATA_SHOULDER_RIGHT, DEFAULT_EYE_HEIGHT, defaultFlySpeed, enchantmentSeed, ENDER_SLOT_OFFSET, enderChestInventory, experienceLevel, experienceProgress, fishing, foodData, hurtDir, inventoryMenu, jumpTriggerTime, MAX_HEALTH, MAX_NAME_LENGTH, 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
animStep, animStepO, ARMOR_SLOT_OFFSET, ARMOR_SLOTS, attackAnim, attackStrengthTicker, autoSpinAttackTicks, brain, DATA_LIVING_ENTITY_FLAGS, dead, DEATH_DURATION, deathScore, deathTime, DEFAULT_BASE_GRAVITY, EQUIPMENT_SLOT_OFFSET, EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT, fallFlyTicks, HAND_SLOTS, hurtDuration, hurtTime, invulnerableDuration, jumping, lastHurt, lastHurtByPlayer, lastHurtByPlayerTime, lerpHeadSteps, lerpSteps, lerpX, lerpXRot, lerpY, lerpYRot, lerpZ, LIVING_ENTITY_FLAG_IS_USING, LIVING_ENTITY_FLAG_OFF_HAND, LIVING_ENTITY_FLAG_SPIN_ATTACK, lyHeadRot, MIN_MOVEMENT_DISTANCE, noActionTime, oAttackAnim, oRun, PLAYER_HURT_EXPERIENCE_TIME, removeArrowTime, removeStingerTime, rotA, rotOffs, run, SLEEPING_DIMENSIONS, SWING_DURATION, swinging, swingingArm, swingTime, timeOffs, USE_ITEM_INTERVAL, useItem, useItemRemaining, walkAnimation, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zza
Fields inherited from class net.minecraft.world.entity.Entity
BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, BREATHING_DISTANCE_BELOW_EYES, 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, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, minorHorizontalCollision, moveDist, noCulling, noPhysics, PASSENGERS_TAG, portalEntrancePos, portalTime, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, verticalCollisionBelow, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld
Fields inherited from interface net.minecraft.commands.CommandSource
NULL
-
Constructor Summary
ConstructorDescriptionServerPlayer
(MinecraftServer p_254143_, ServerLevel p_254435_, com.mojang.authlib.GameProfile p_253651_) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
private boolean
acceptsSystemMessages
(boolean p_240568_) void
addAdditionalSaveData
(CompoundTag p_9197_) boolean
void
void
awardKillScore
(Entity p_9050_, int p_9051_, DamageSource p_9052_) int
awardRecipes
(Collection<Recipe<?>> p_9129_) void
awardRecipesByKey
(ResourceLocation[] p_9168_) void
private boolean
bedBlocked
(BlockPos p_9192_, Direction p_9193_) private boolean
bedInRange
(BlockPos p_9117_, Direction p_9118_) boolean
broadcastToPlayer
(ServerPlayer p_9014_) private GameType
calculateGameModeForNewPlayer
(GameType p_143424_) boolean
boolean
canHarmPlayer
(Player p_9064_) changeDimension
(ServerLevel p_9180_, ITeleporter teleporter) protected void
checkFallDamage
(double p_8976_, boolean p_8977_, BlockState p_8978_, BlockPos p_8979_) void
protected void
private void
createEndPlatform
(ServerLevel p_9007_, BlockPos p_9008_) protected ItemCooldowns
void
void
die
(DamageSource p_9035_) void
void
dismountTo
(double p_143389_, double p_143390_, double p_143391_) void
displayClientMessage
(Component p_9154_, boolean p_9155_) void
doCheckFallDamage
(double p_289676_, double p_289671_, double p_289665_, boolean p_289696_) void
void
doTick()
boolean
drop
(boolean p_182295_) protected PortalInfo
findDimensionEntryPoint
(ServerLevel p_8998_) private void
fudgeSpawnLocation
(ServerLevel p_9202_) private int
getCoprime
(int p_9238_) protected Optional<BlockUtil.FoundRectangle>
getExitPortal
(ServerLevel p_184131_, BlockPos p_184132_, boolean p_184133_, WorldBorder p_184134_) Returns the language last reported by the player as their local language.long
protected int
float
getStats()
void
giveExperienceLevels
(int p_9200_) void
giveExperiencePoints
(int p_9208_) private void
handleTeamKill
(String p_9125_, String p_9126_, ObjectiveCriteria[] p_9127_) void
boolean
boolean
hurt
(DamageSource p_9037_, float p_9038_) void
indicateDamage
(double p_270621_, double p_270478_) void
void
initMenu
(AbstractContainerMenu p_143400_) boolean
boolean
boolean
isInvulnerableTo
(DamageSource p_9182_) private boolean
private boolean
isReachableBedBlock
(BlockPos p_9223_) boolean
boolean
boolean
void
loadGameTypes
(CompoundTag p_143428_) void
lookAt
(EntityAnchorArgument.Anchor p_9108_, Entity p_9109_, EntityAnchorArgument.Anchor p_9110_) void
lookAt
(EntityAnchorArgument.Anchor p_9112_, Vec3 p_9113_) void
boolean
mayInteract
(Level p_143406_, BlockPos p_143407_) void
moveTo
(double p_9171_, double p_9172_, double p_9173_) void
protected void
onChangedBlock
(BlockPos p_9206_) protected void
onEffectAdded
(MobEffectInstance p_143393_, Entity p_143394_) protected void
onEffectRemoved
(MobEffectInstance p_9184_) protected void
onEffectUpdated
(MobEffectInstance p_143396_, boolean p_143397_, Entity p_143398_) void
onEnchantmentPerformed
(ItemStack p_9079_, int p_9080_) void
protected void
onInsideBlock
(BlockState p_9103_) void
onItemPickup
(ItemEntity p_215095_) void
void
void
openCommandBlock
(CommandBlockEntity p_9099_) void
openHorseInventory
(AbstractHorse p_9059_, Container p_9060_) void
openItemGui
(ItemStack p_9082_, InteractionHand p_9083_) openMenu
(MenuProvider p_9033_) void
openTextEdit
(SignBlockEntity p_277909_, boolean p_277495_) void
playNotifySound
(SoundEvent p_9019_, SoundSource p_9020_, float p_9021_, float p_9022_) protected void
void
readAdditionalSaveData
(CompoundTag p_9131_) private static GameType
readPlayerMode
(CompoundTag p_143414_, String p_143415_) void
Force the name displayed in the tab list to refresh, by firingPlayerEvent.TabListNameFormat
.void
void
int
resetRecipes
(Collection<Recipe<?>> p_9195_) void
void
void
restoreFrom
(ServerPlayer p_9016_, boolean p_9017_) void
sendChatMessage
(OutgoingChatMessage p_249852_, boolean p_250110_, ChatType.Bound p_252108_) void
sendMerchantOffers
(int p_8988_, MerchantOffers p_8989_, int p_8990_, int p_8991_, boolean p_8992_, boolean p_8993_) void
sendServerStatus
(ServerStatus p_215110_) void
sendSystemMessage
(Component p_215097_) void
sendSystemMessage
(Component p_240560_, boolean p_240545_) void
sendTexturePack
(String p_143409_, String p_143410_, boolean p_143411_, Component p_143412_) void
void
setChatSession
(RemoteChatSession p_254468_) void
setExperienceLevels
(int p_9175_) void
setExperiencePoints
(int p_8986_) boolean
setGameMode
(GameType p_143404_) void
setLastSectionPos
(SectionPos p_9120_) void
setPlayerInput
(float p_8981_, float p_8982_, boolean p_8983_, boolean p_8984_) void
setRespawnPosition
(ResourceKey<Level> p_9159_, BlockPos p_9160_, float p_9161_, boolean p_9162_, boolean p_9163_) void
setServerLevel
(ServerLevel p_284971_) 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 p_143422_) boolean
startRiding
(Entity p_277395_, boolean p_278062_) com.mojang.datafixers.util.Either<Player.BedSleepingProblem,
Unit> startSleepInBed
(BlockPos p_9115_) void
startSleeping
(BlockPos p_9190_) void
void
stopSleepInBed
(boolean p_9165_, boolean p_9166_) private void
storeGameTypes
(CompoundTag p_143431_) void
swing
(InteractionHand p_9031_) void
void
teleportRelative
(double p_251611_, double p_248861_, double p_252266_) void
teleportTo
(double p_8969_, double p_8970_, double p_8971_) void
teleportTo
(ServerLevel p_9000_, double p_9001_, double p_9002_, double p_9003_, float p_9004_, float p_9005_) boolean
teleportTo
(ServerLevel p_265564_, double p_265424_, double p_265680_, double p_265312_, Set<RelativeMovement> p_265192_, float p_265059_, float p_265266_) private void
void
tick()
void
trackChunk
(ChunkPos p_184136_, Packet<?> p_184137_) void
void
private void
void
triggerRecipeCrafted
(Recipe<?> p_283176_, List<ItemStack> p_282336_) void
untrackChunk
(ChunkPos p_9089_) protected void
void
private void
updateScoreForCriteria
(ObjectiveCriteria p_9105_, int p_9106_) protected void
updateUsingItem
(ItemStack p_143402_) Methods inherited from class net.minecraft.world.entity.player.Player
actuallyHurt, addItem, aiStep, animateHurt, awardStat, awardStat, awardStat, blockActionRestricted, blockUsingShield, canBeHitByProjectile, canBeSeenAsEnemy, canEat, canSprint, canTakeItem, canUseGameMasterBlocks, causeFallDamage, causeFoodExhaustion, checkMovementStatistics, createAttributes, defineSynchedData, destroyVanishingCursedItems, disableShield, doAutoAttackOnTouch, doesEmitEquipEvent, doWaterSplashEffect, drop, dropEquipment, eat, findRespawnPositionAndUseSpawnBlock, freeAt, getAbilities, getAbsorptionAmount, getArmorSlots, getAttackStrengthScale, getBlockSpeedFactor, getCapability, getCooldowns, getCurrentItemAttackStrengthDelay, getDeathSound, getDestroySpeed, getDigSpeed, getDimensionChangingDelay, getDimensions, getDismountPoses, getDisplayName, getEnchantmentSeed, getEnderChestInventory, getExperienceReward, getFallSounds, getFireImmuneTicks, getFlyingSpeed, getFoodData, getForcedPose, getGameProfile, getHandSlots, getHurtDir, getHurtSound, getInventory, getItemBySlot, getLastDeathLocation, getLuck, getMainArm, getMovementEmission, getMyRidingOffset, getName, getPortalWaitTime, getPrefixes, getProjectile, getRopeHoldPosition, getScore, getScoreboard, getScoreboardName, getShoulderEntityLeft, getShoulderEntityRight, getSleepTimer, getSlot, getSoundSource, getSpeed, getStandingEyeHeight, getSuffixes, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getXpNeededForNextLevel, handleEntityEvent, hasContainerOpen, hasCorrectToolForDrops, hurtArmor, hurtCurrentlyUsedShield, hurtHelmet, increaseScore, interactOn, isAffectedByFluids, isAlwaysExperienceDropper, isAlwaysTicking, isHurt, isImmobile, isLocalPlayer, isModelPartShown, isPushedByFluid, isReducedDebugInfo, isScoping, isSecondaryUseActive, isSleepingLongEnough, isStayingOnGroundSurface, isSwimming, jumpFromGround, killedEntity, makeStuckInBlock, maybeBackOffFromEdge, mayBuild, mayUseItemAt, onSoulSpeedBlock, openJigsawBlock, openMinecartCommandBlock, openStructureBlock, playSound, playStepSound, refreshDisplayName, remove, removeEntitiesOnShoulder, removeVehicle, resetAttackStrengthTicker, respawn, rideTick, serverAiStep, setAbsorptionAmount, setEntityOnShoulder, setForcedPose, setItemSlot, setLastDeathLocation, setMainArm, setReducedDebugInfo, setRemainingFireTicks, setScore, setShoulderEntityLeft, setShoulderEntityRight, shouldBeSaved, shouldRemoveSoulSpeed, shouldShowName, startAutoSpinAttack, startFallFlying, stopFallFlying, stopSleeping, sweepAttack, travel, tryToStartFallFlying, updateIsUnderwater, updatePlayerPose, updateSwimming, updateTutorialInventoryAction, wantsToStopRiding
Methods inherited from class net.minecraft.world.entity.LivingEntity
addEffect, addEffect, areAllEffectsAmbient, attackable, baseTick, blockedByShield, brainProvider, broadcastBreakEvent, broadcastBreakEvent, calculateEntityAnimation, calculateFallDamage, canAttack, canAttack, canAttackType, canBeAffected, canBeSeenByAnyone, canBreatheUnderwater, canChangeDimensions, canDisableShield, canFreeze, canSpawnSoulSpeedParticle, canStandOnFluid, checkAutoSpinAttack, clearSleepingPos, createLivingAttributes, createWitherRose, curePotionEffects, decreaseAirSupply, doHurtTarget, doPush, dropAllDeathLoot, dropCustomDeathLoot, dropExperience, dropFromLootTable, equipmentHasChanged, forceAddEffect, getActiveEffects, getActiveEffectsMap, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributeBaseValue, getAttributes, getAttributeValue, getAttributeValue, getBedOrientation, getBoundingBoxForCulling, getBrain, getCombatTracker, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDrinkingSound, getEatingSound, getEffect, getEquipmentSlotForItem, getEyeHeight, getFallFlyingTicks, getFluidFallingAdjustedMovement, getHealth, getItemInHand, getJumpBoostPower, getJumpPower, getKillCredit, getLastAttacker, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getLootTable, getLootTableSeed, getMainHandItem, getMaxHealth, getMeleeAttackReferencePosition, getMobType, getNoActionTime, getOffhandItem, getRandom, getRelativePortalPosition, getRiddenInput, getRiddenSpeed, getScale, getSleepingPos, getSoundVolume, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVisualRotationYInDegrees, getVoicePitch, getWaterSlowDown, getYHeadRot, goDownInWater, handleDamageEvent, handleRelativeFrictionAndCalculateMovement, hasEffect, hasItemInSlot, hasLineOfSight, heal, increaseAirSupply, invalidateCaps, isAffectedByPotions, isAlive, isAutoSpinAttack, isBaby, isBlocking, isCurrentlyGlowing, isDamageSourceBlocked, isDeadOrDying, isFallFlying, isHolding, isHolding, isInvertedHealAndHarm, isInWall, isPickable, isPushable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, jumpInLiquid, kill, knockback, lerpHeadTo, lerpTo, makeBrain, maxUpStep, onBelowWorld, onClimbable, onEquipItem, onSyncedDataUpdated, playBlockFallSound, playHurtSound, push, pushEntities, randomTeleport, recreateFromPacket, releaseUsingItem, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeFrost, removeSoulSpeed, resetForwardDirectionOfRelativePortalPosition, reviveCaps, sendEffectToPassengers, setArrowCount, setDiscardFriction, setHealth, setItemInHand, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setRecordPlayingNearby, setSleepingPos, setSpeed, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDiscardFriction, shouldDropExperience, shouldDropLoot, shouldRiderFaceForward, skipDropExperience, spawnSoulSpeedParticle, startUsingItem, stopUsingItem, swing, tickDeath, tickEffects, tickHeadTurn, tickRidden, triggerItemUseEffects, tryAddFrost, tryAddSoulSpeed, updateEffectVisibility, updateSwingTime, updateWalkAnimation, verifyEquippedItem, wasExperienceConsumed
Methods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, blockPosition, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canCollideWith, canEnterPose, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, checkBelowWorld, checkDespawn, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, discard, dismountsUnderwater, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, fireImmune, fixupDimensions, gameEvent, gameEvent, getAirSupply, getAllSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForPose, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionsForge, getDirection, getDismountLocationForPassenger, getEncodeId, getEntityData, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getHandHoldingItemAngle, getId, getIndirectPassengers, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMaxHeightFluidType, getMotionDirection, getNameTagOffsetY, getOnPos, getOnPos, getOnPosLegacy, getPassengers, getPassengersAndSelf, getPassengersRidingOffset, getPercentFrozen, getPersistentData, getPickRadius, getPickResult, getPistonPushReaction, getPortalCooldown, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRotationVector, getSelfAndPassengers, getServer, getSharedFlag, getStringUUID, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getX, getX, getXRot, getY, getY, getYRot, getZ, getZ, handleInsidePortal, handleNetherPortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, ignoreExplosion, interact, interactAt, is, isAddedToWorld, isAlliedTo, isAlliedTo, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isRemoved, isShiftKeyDown, isSilent, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isUnderWater, isVehicle, isVisuallyCrawling, lavaHurt, lerpMotion, level, limitPistonMovement, load, makeBoundingBox, markHurt, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onFlap, onGround, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, onSyncedDataUpdated, pick, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, push, reapplyPosition, refreshDimensions, removeAfterChangingDimensions, removePassenger, removeTag, repositionEntityAfterLoad, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setMaxUpStep, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithKnownMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemoved, setRot, setSecondsOnFire, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYRot, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startSeenByPlayer, stopSeenByPlayer, syncPacketPositionCodec, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, waterSwimSound
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCaps
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.commands.CommandSource
alwaysAccepts
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, deserializeNBT, getClassification, getEyeHeightForge, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getParts, getPersistentData, getPickedResult, getSoundFromFluidType, getStepHeight, hasCustomOutlineRendering, isAddedToWorld, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, onAddedToWorld, onRemovedFromWorld, revive, serializeNBT, shouldRiderSit, shouldUpdateFluidWhileBoating
Methods inherited from interface net.minecraftforge.common.extensions.IForgeLivingEntity
canDrownInFluidType, canSwimInFluidType, jumpInFluid, moveInFluid, self, sinkInFluid
Methods inherited from interface net.minecraftforge.common.extensions.IForgePlayer
canReach, canReach, canReach, getBlockReach, getEntityReach, isCloseEnough
-
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:
-
connection
-
server
-
gameMode
-
advancements
-
stats
-
lastRecordedHealthAndAbsorption
private float lastRecordedHealthAndAbsorption -
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 -
spawnInvulnerableTime
private int spawnInvulnerableTime -
chatVisibility
-
canChatColor
private boolean canChatColor -
lastActionTime
private long lastActionTime -
camera
-
isChangingDimension
private boolean isChangingDimension -
seenCredits
private boolean seenCredits -
recipeBook
-
levitationStartPos
-
levitationStartTime
private int levitationStartTime -
disconnected
private boolean disconnected -
startingToFallPosition
-
enteredNetherPosition
-
enteredLavaOnVehiclePosition
-
lastSectionPos
-
respawnDimension
-
respawnPosition
-
respawnForced
private boolean respawnForced -
respawnAngle
private float respawnAngle -
textFilter
-
textFilteringEnabled
private boolean textFilteringEnabled -
allowsListing
private boolean allowsListing -
wardenSpawnTracker
-
containerSynchronizer
-
containerListener
-
chatSession
-
containerCounter
public int containerCounter -
latency
public int latency -
wonGame
public boolean wonGame -
language
-
tabListHeader
-
hasTabListName
private boolean hasTabListName -
tabListDisplayName
-
-
Constructor Details
-
ServerPlayer
public ServerPlayer(MinecraftServer p_254143_, ServerLevel p_254435_, com.mojang.authlib.GameProfile p_253651_)
-
-
Method Details
-
fudgeSpawnLocation
-
getCoprime
private int getCoprime(int p_9238_) -
readAdditionalSaveData
- Overrides:
readAdditionalSaveData
in classPlayer
-
addAdditionalSaveData
- Overrides:
addAdditionalSaveData
in classPlayer
-
setExperiencePoints
public void setExperiencePoints(int p_8986_) -
setExperienceLevels
public void setExperienceLevels(int p_9175_) -
giveExperienceLevels
public void giveExperienceLevels(int p_9200_) - 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() -
doTick
public void doTick() -
resetFallDistance
public void resetFallDistance()- Overrides:
resetFallDistance
in classEntity
-
trackStartFallingPosition
public void trackStartFallingPosition() -
trackEnteredOrExitedLavaOnVehicle
public void trackEnteredOrExitedLavaOnVehicle() -
updateScoreForCriteria
-
die
-
tellNeutralMobsThatIDied
private void tellNeutralMobsThatIDied() -
awardKillScore
- Overrides:
awardKillScore
in classEntity
-
handleTeamKill
-
hurt
-
canHarmPlayer
- Overrides:
canHarmPlayer
in classPlayer
-
isPvpAllowed
private boolean isPvpAllowed() -
findDimensionEntryPoint
- Overrides:
findDimensionEntryPoint
in classEntity
-
changeDimension
- Overrides:
changeDimension
in classEntity
-
createEndPlatform
-
getExitPortal
protected Optional<BlockUtil.FoundRectangle> getExitPortal(ServerLevel p_184131_, BlockPos p_184132_, boolean p_184133_, WorldBorder p_184134_) - Overrides:
getExitPortal
in classEntity
-
triggerDimensionChangeTriggers
-
broadcastToPlayer
- Overrides:
broadcastToPlayer
in classEntity
-
take
- 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 p_9165_, boolean p_9166_) - Overrides:
stopSleepInBed
in classPlayer
-
dismountTo
public void dismountTo(double p_143389_, double p_143390_, double p_143391_) - Overrides:
dismountTo
in classEntity
-
isInvulnerableTo
- Overrides:
isInvulnerableTo
in classPlayer
-
checkFallDamage
protected void checkFallDamage(double p_8976_, boolean p_8977_, BlockState p_8978_, BlockPos p_8979_) - Overrides:
checkFallDamage
in classLivingEntity
-
onChangedBlock
- Overrides:
onChangedBlock
in classLivingEntity
-
doCheckFallDamage
public void doCheckFallDamage(double p_289676_, double p_289671_, double p_289665_, boolean p_289696_) -
openTextEdit
- Overrides:
openTextEdit
in classPlayer
-
nextContainerCounter
public void nextContainerCounter() -
openMenu
-
sendMerchantOffers
public void sendMerchantOffers(int p_8988_, MerchantOffers p_8989_, int p_8990_, int p_8991_, boolean p_8992_, boolean p_8993_) - 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
-
setPlayerInput
public void setPlayerInput(float p_8981_, float p_8982_, boolean p_8983_, boolean p_8984_) -
awardStat
-
resetStat
-
awardRecipes
- Overrides:
awardRecipes
in classPlayer
-
triggerRecipeCrafted
- Overrides:
triggerRecipeCrafted
in classPlayer
-
awardRecipesByKey
- Overrides:
awardRecipesByKey
in classPlayer
-
resetRecipes
- Overrides:
resetRecipes
in classPlayer
-
giveExperiencePoints
public void giveExperiencePoints(int p_9208_) - 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 p_9108_, Entity p_9109_, EntityAnchorArgument.Anchor p_9110_) -
restoreFrom
-
onEffectAdded
- Overrides:
onEffectAdded
in classLivingEntity
-
onEffectUpdated
protected void onEffectUpdated(MobEffectInstance p_143396_, boolean p_143397_, @Nullable Entity p_143398_) - Overrides:
onEffectUpdated
in classLivingEntity
-
onEffectRemoved
- Overrides:
onEffectRemoved
in classLivingEntity
-
teleportTo
public void teleportTo(double p_8969_, double p_8970_, double p_8971_) - Overrides:
teleportTo
in classEntity
-
teleportRelative
public void teleportRelative(double p_251611_, double p_248861_, double p_252266_) - Overrides:
teleportRelative
in classEntity
-
teleportTo
public boolean teleportTo(ServerLevel p_265564_, double p_265424_, double p_265680_, double p_265312_, Set<RelativeMovement> p_265192_, float p_265059_, float p_265266_) - Overrides:
teleportTo
in classEntity
-
moveTo
public void moveTo(double p_9171_, double p_9172_, double p_9173_) -
crit
-
magicCrit
-
onUpdateAbilities
public void onUpdateAbilities()- Overrides:
onUpdateAbilities
in classPlayer
-
serverLevel
-
setGameMode
-
isSpectator
public boolean isSpectator()- Specified by:
isSpectator
in classPlayer
-
isCreative
public boolean isCreative()- Specified by:
isCreative
in classPlayer
-
sendSystemMessage
- Specified by:
sendSystemMessage
in interfaceCommandSource
- Overrides:
sendSystemMessage
in classEntity
-
sendSystemMessage
-
sendChatMessage
public void sendChatMessage(OutgoingChatMessage p_249852_, boolean p_250110_, ChatType.Bound p_252108_) -
getIpAddress
-
updateOptions
-
canChatInColor
public boolean canChatInColor() -
getChatVisibility
-
acceptsSystemMessages
private boolean acceptsSystemMessages(boolean p_240568_) -
acceptsChatMessages
private boolean acceptsChatMessages() -
sendTexturePack
-
sendServerStatus
-
getPermissionLevel
protected int getPermissionLevel()- Overrides:
getPermissionLevel
in classEntity
-
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
-
getLastActionTime
public long getLastActionTime() -
getTabListDisplayName
-
swing
- Overrides:
swing
in classLivingEntity
-
isChangingDimension
public boolean isChangingDimension() -
hasChangedDimension
public void hasChangedDimension() -
getAdvancements
-
teleportTo
public void teleportTo(ServerLevel p_9000_, double p_9001_, double p_9002_, double p_9003_, float p_9004_, float p_9005_) -
getRespawnPosition
-
getRespawnAngle
public float getRespawnAngle() -
getRespawnDimension
-
isRespawnForced
public boolean isRespawnForced() -
setRespawnPosition
public void setRespawnPosition(ResourceKey<Level> p_9159_, @Nullable BlockPos p_9160_, float p_9161_, boolean p_9162_, boolean p_9163_) -
trackChunk
-
untrackChunk
-
getLastSectionPos
-
setLastSectionPos
-
playNotifySound
- Overrides:
playNotifySound
in classPlayer
-
getAddEntityPacket
- Overrides:
getAddEntityPacket
in classEntity
-
drop
-
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 p_182295_) -
allowsListing
public boolean allowsListing() -
getWardenSpawnTracker
- Overrides:
getWardenSpawnTracker
in classPlayer
-
onItemPickup
- Overrides:
onItemPickup
in classLivingEntity
-
setChatSession
-
getChatSession
-
indicateDamage
public void indicateDamage(double p_270621_, double p_270478_) - Overrides:
indicateDamage
in classLivingEntity
-
startRiding
- Overrides:
startRiding
in classEntity
-
stopRiding
public void stopRiding()- Overrides:
stopRiding
in classLivingEntity
-