Package net.minecraft.entity.player
Class ServerPlayerEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<Entity>
-
- net.minecraft.entity.Entity
-
- net.minecraft.entity.LivingEntity
-
- net.minecraft.entity.player.PlayerEntity
-
- net.minecraft.entity.player.ServerPlayerEntity
-
- All Implemented Interfaces:
ICommandSource
,IContainerListener
,INameable
,ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeEntity
,INBTSerializable<CompoundNBT>
- Direct Known Subclasses:
FakePlayer
public class ServerPlayerEntity extends PlayerEntity implements IContainerListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.entity.player.PlayerEntity
PlayerEntity.SleepResult
-
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.IMoveCallback
-
-
Field Summary
-
Fields inherited from class net.minecraft.entity.player.PlayerEntity
abilities, bob, containerMenu, DATA_PLAYER_MAIN_HAND, DATA_PLAYER_MODE_CUSTOMISATION, DATA_SHOULDER_LEFT, DATA_SHOULDER_RIGHT, defaultFlySpeed, enchantmentSeed, enderChestInventory, experienceLevel, experienceProgress, fishing, foodData, inventory, inventoryMenu, jumpTriggerTime, oBob, PERSISTED_NBT_TAG, STANDING_DIMENSIONS, takeXpDelay, totalExperience, wasUnderwater, xCloak, xCloakO, yCloak, yCloakO, zCloak, zCloakO
-
Fields inherited from class net.minecraft.entity.LivingEntity
animationPosition, animationSpeed, animationSpeedOld, animStep, animStepO, attackAnim, attackStrengthTicker, autoSpinAttackTicks, brain, DATA_LIVING_ENTITY_FLAGS, dead, deathScore, deathTime, fallFlyTicks, flyingSpeed, hurtDir, hurtDuration, hurtTime, invulnerableDuration, jumping, lastHurt, lastHurtByPlayer, lastHurtByPlayerTime, lerpHeadSteps, lerpSteps, lerpX, lerpXRot, lerpY, lerpYRot, lerpZ, lyHeadRot, noActionTime, oAttackAnim, oRun, removeArrowTime, removeStingerTime, rotA, rotOffs, run, SLEEPING_DIMENSIONS, swinging, swingingArm, swingTime, timeOffs, useItem, useItemRemaining, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zza
-
Fields inherited from class net.minecraft.entity.Entity
blocksBuilding, boardingCooldown, DATA_POSE, DATA_SHARED_FLAGS_ID, ENTITY_COUNTER, entityData, fallDistance, firstTick, fluidHeight, fluidOnEyes, forcedLoading, glowing, hasImpulse, horizontalCollision, hurtMarked, inChunk, invulnerableTime, isInsidePortal, level, maxUpStep, moveDist, noCulling, noPhysics, onGround, portalEntrancePos, portalTime, pushthrough, random, removed, stringUUID, stuckSpeedMultiplier, tickCount, uuid, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasTouchingWater, xChunk, xo, xOld, xRot, xRotO, yChunk, yo, yOld, yRot, yRotO, zChunk, zo, zOld
-
Fields inherited from interface net.minecraft.command.ICommandSource
NULL
-
-
Constructor Summary
Constructors Constructor Description ServerPlayerEntity(MinecraftServer p_i45285_1_, ServerWorld p_i45285_2_, com.mojang.authlib.GameProfile p_i45285_3_, PlayerInteractionManager p_i45285_4_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAdditionalSaveData(CompoundNBT p_213281_1_)
void
attack(Entity p_71059_1_)
void
awardKillScore(Entity p_191956_1_, int p_191956_2_, DamageSource p_191956_3_)
int
awardRecipes(java.util.Collection<IRecipe<?>> p_195065_1_)
void
awardRecipesByKey(ResourceLocation[] p_193102_1_)
void
awardStat(Stat<?> p_71064_1_, int p_71064_2_)
private boolean
bedBlocked(BlockPos p_241156_1_, Direction p_241156_2_)
private boolean
bedInRange(BlockPos p_241147_1_, Direction p_241147_2_)
private void
broadcast(TileEntity p_147097_1_)
void
broadcastCarriedItem()
boolean
broadcastToPlayer(ServerPlayerEntity p_174827_1_)
void
cancelRemoveEntity(Entity p_184848_1_)
boolean
canHarmPlayer(PlayerEntity p_96122_1_)
Entity
changeDimension(ServerWorld p_241206_1_, ITeleporter teleporter)
protected void
checkFallDamage(double p_184231_1_, boolean p_184231_3_, BlockState p_184231_4_, BlockPos p_184231_5_)
void
closeContainer()
protected void
completeUsingItem()
private void
createEndPlatform(ServerWorld p_242110_1_, BlockPos p_242110_2_)
protected CooldownTracker
createItemCooldowns()
void
crit(Entity p_71009_1_)
void
die(DamageSource p_70645_1_)
void
disconnect()
void
displayClientMessage(ITextComponent p_146105_1_, boolean p_146105_2_)
void
doCheckFallDamage(double p_71122_1_, boolean p_71122_3_)
void
doCloseContainer()
void
doTick()
ItemEntity
drop(ItemStack p_146097_1_, boolean p_146097_2_, boolean p_146097_3_)
protected PortalInfo
findDimensionEntryPoint(ServerWorld p_241829_1_)
private void
fudgeSpawnLocation(ServerWorld p_205734_1_)
IPacket<?>
getAddEntityPacket()
PlayerAdvancements
getAdvancements()
Entity
getCamera()
ChatVisibility
getChatVisibility()
private int
getCoprime(int p_205735_1_)
protected java.util.Optional<TeleportationRepositioner.Result>
getExitPortal(ServerWorld p_241830_1_, BlockPos p_241830_2_, boolean p_241830_3_)
java.lang.String
getIpAddress()
java.lang.String
getLanguage()
Returns the language last reported by the player as their local language.long
getLastActionTime()
SectionPos
getLastSectionPos()
ServerWorld
getLevel()
protected int
getPermissionLevel()
ServerRecipeBook
getRecipeBook()
float
getRespawnAngle()
RegistryKey<World>
getRespawnDimension()
BlockPos
getRespawnPosition()
ServerStatisticsManager
getStats()
ITextComponent
getTabListDisplayName()
IChatFilter
getTextFilter()
void
giveExperienceLevels(int p_82242_1_)
void
giveExperiencePoints(int p_195068_1_)
private void
handleTeamKill(java.lang.String p_195398_1_, java.lang.String p_195398_2_, ScoreCriteria[] p_195398_3_)
void
hasChangedDimension()
boolean
hasDisconnected()
boolean
hurt(DamageSource p_70097_1_, float p_70097_2_)
void
initMenu()
boolean
isChangingDimension()
boolean
isCreative()
boolean
isInvulnerableTo(DamageSource p_180431_1_)
private boolean
isPvpAllowed()
private boolean
isReachableBedBlock(BlockPos p_241158_1_)
boolean
isRespawnForced()
boolean
isSpectator()
void
lookAt(EntityAnchorArgument.Type p_200618_1_, Entity p_200618_2_, EntityAnchorArgument.Type p_200618_3_)
void
lookAt(EntityAnchorArgument.Type p_200602_1_, Vector3d p_200602_2_)
void
magicCrit(Entity p_71047_1_)
void
moveTo(double p_225653_1_, double p_225653_3_, double p_225653_5_)
void
nextContainerCounter()
protected void
onChangedBlock(BlockPos p_184594_1_)
protected void
onEffectAdded(EffectInstance p_70670_1_)
protected void
onEffectRemoved(EffectInstance p_70688_1_)
protected void
onEffectUpdated(EffectInstance p_70695_1_, boolean p_70695_2_)
void
onEnchantmentPerformed(ItemStack p_192024_1_, int p_192024_2_)
void
onEnterCombat()
protected void
onInsideBlock(BlockState p_191955_1_)
void
onLeaveCombat()
void
onUpdateAbilities()
void
openCommandBlock(CommandBlockTileEntity p_184824_1_)
void
openHorseInventory(AbstractHorseEntity p_184826_1_, IInventory p_184826_2_)
void
openItemGui(ItemStack p_184814_1_, Hand p_184814_2_)
java.util.OptionalInt
openMenu(INamedContainerProvider p_213829_1_)
void
openTextEdit(SignTileEntity p_175141_1_)
void
playNotifySound(SoundEvent p_213823_1_, SoundCategory p_213823_2_, float p_213823_3_, float p_213823_4_)
protected void
processPortalCooldown()
void
readAdditionalSaveData(CompoundNBT p_70037_1_)
void
refreshContainer(Container p_71120_1_)
void
refreshContainer(Container p_71110_1_, NonNullList<ItemStack> p_71110_2_)
void
refreshTabListName()
Force the name displayed in the tab list to refresh, by firingPlayerEvent.TabListNameFormat
.void
resetLastActionTime()
int
resetRecipes(java.util.Collection<IRecipe<?>> p_195069_1_)
void
resetSentInfo()
void
resetStat(Stat<?> p_175145_1_)
void
restoreFrom(ServerPlayerEntity p_193104_1_, boolean p_193104_2_)
void
sendMerchantOffers(int p_213818_1_, MerchantOffers p_213818_2_, int p_213818_3_, int p_213818_4_, boolean p_213818_5_, boolean p_213818_6_)
void
sendMessage(ITextComponent p_145747_1_, java.util.UUID p_145747_2_)
void
sendMessage(ITextComponent p_241151_1_, ChatType p_241151_2_, java.util.UUID p_241151_3_)
void
sendRemoveEntity(Entity p_152339_1_)
void
sendTexturePack(java.lang.String p_175397_1_, java.lang.String p_175397_2_)
void
setCamera(Entity p_175399_1_)
void
setContainerData(Container p_71112_1_, int p_71112_2_, int p_71112_3_)
void
setExperienceLevels(int p_195399_1_)
void
setExperiencePoints(int p_195394_1_)
void
setGameMode(GameType p_71033_1_)
void
setLastSectionPos(SectionPos p_213850_1_)
void
setPlayerInput(float p_110430_1_, float p_110430_2_, boolean p_110430_3_, boolean p_110430_4_)
void
setRespawnPosition(RegistryKey<World> p_242111_1_, BlockPos p_242111_2_, float p_242111_3_, boolean p_242111_4_, boolean p_242111_5_)
void
slotChanged(Container p_71111_1_, int p_71111_2_, ItemStack p_71111_3_)
boolean
startRiding(Entity p_184205_1_, boolean p_184205_2_)
com.mojang.datafixers.util.Either<PlayerEntity.SleepResult,Unit>
startSleepInBed(BlockPos p_213819_1_)
void
startSleeping(BlockPos p_213342_1_)
void
stopRiding()
void
stopSleepInBed(boolean p_225652_1_, boolean p_225652_2_)
void
swing(Hand p_184609_1_)
void
take(Entity p_71001_1_, int p_71001_2_)
void
teleportTo(double p_70634_1_, double p_70634_3_, double p_70634_5_)
void
teleportTo(ServerWorld p_200619_1_, double p_200619_2_, double p_200619_4_, double p_200619_6_, float p_200619_8_, float p_200619_9_)
private void
tellNeutralMobsThatIDied()
void
tick()
void
trackChunk(ChunkPos p_213844_1_, IPacket<?> p_213844_2_, IPacket<?> p_213844_3_)
private void
triggerDimensionChangeTriggers(ServerWorld p_213846_1_)
void
untrackChunk(ChunkPos p_213845_1_)
protected void
updateInvisibilityStatus()
void
updateOptions(CClientSettingsPacket p_147100_1_)
private void
updateScoreForCriteria(ScoreCriteria p_184849_1_, int p_184849_2_)
-
Methods inherited from class net.minecraft.entity.player.PlayerEntity
actuallyHurt, addItem, aiStep, awardStat, awardStat, awardStat, blockActionRestricted, blockUsingShield, canEat, canTakeItem, canUseGameMasterBlocks, causeFallDamage, causeFoodExhaustion, checkMovementStatistics, createAttributes, createPlayerUUID, createPlayerUUID, defineSynchedData, destroyVanishingCursedItems, disableShield, doAutoAttackOnTouch, doWaterSplashEffect, drop, drop, dropEquipment, eat, findRespawnPositionAndUseSpawnBlock, freeAt, getAbsorptionAmount, getArmorSlots, getAttackStrengthScale, getBlockSpeedFactor, getCapability, getCooldowns, getCurrentItemAttackStrengthDelay, getDeathSound, getDestroySpeed, getDigSpeed, getDimensionChangingDelay, getDimensions, getDismountPoses, getDisplayName, getEnchantmentSeed, getEnderChestInventory, getExperienceReward, getFallDamageSound, getFireImmuneTicks, getFoodData, getForcedPose, getGameProfile, getHandSlots, getHurtSound, getItemBySlot, getLuck, getMainArm, getMyRidingOffset, getName, getPortalWaitTime, getPrefixes, getProjectile, getRopeHoldPosition, getScore, getScoreboard, getScoreboardName, getShoulderEntityLeft, getShoulderEntityRight, getSleepTimer, getSoundSource, getSpeed, getStandingEyeHeight, getSuffixes, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getXpNeededForNextLevel, handleEntityEvent, hasCorrectToolForDrops, hurtArmor, hurtCurrentlyUsedShield, increaseScore, interactOn, isAffectedByFluids, isAlwaysExperienceDropper, isHurt, isImmobile, isLocalPlayer, isModelPartShown, isMovementNoisy, isPushedByFluid, isReducedDebugInfo, isSecondaryUseActive, isSleepingLongEnough, isStayingOnGroundSurface, isSwimming, jumpFromGround, killed, makeStuckInBlock, maybeBackOffFromEdge, mayBuild, mayUseItemAt, onSoulSpeedBlock, openJigsawBlock, openMinecartCommandBlock, openStructureBlock, playSound, refreshDisplayName, remove, removeEntitiesOnShoulder, removeVehicle, resetAttackStrengthTicker, resetPos, respawn, rideTick, serverAiStep, setAbsorptionAmount, setEntityOnShoulder, setForcedPose, setItemSlot, setMainArm, setReducedDebugInfo, setRemainingFireTicks, setScore, setShoulderEntityLeft, setShoulderEntityRight, setSlot, shouldRemoveSoulSpeed, shouldShowName, startFallFlying, stopFallFlying, stopSleeping, sweepAttack, travel, tryToStartFallFlying, updateIsUnderwater, updatePlayerPose, updateSwimming, wantsToStopRiding
-
Methods inherited from class net.minecraft.entity.LivingEntity
addEffect, animateHurt, areAllEffectsAmbient, attackable, baseTick, blockedByShield, brainProvider, broadcastBreakEvent, broadcastBreakEvent, calculateEntityAnimation, calculateFallDamage, canAttack, canAttack, canAttackType, canBeAffected, canBreatheUnderwater, canSee, canSpawnSoulSpeedParticle, canStandOnFluid, checkAutoSpinAttack, clearSleepingPos, createLivingAttributes, createLootContext, createWitherRose, curePotionEffects, decreaseAirSupply, doHurtTarget, doPush, dropAllDeathLoot, dropCustomDeathLoot, dropExperience, dropFromLootTable, forceAddEffect, getActiveEffects, getActiveEffectsMap, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributes, getAttributeValue, getBedOrientation, getBoundingBoxForCulling, getBrain, getCombatTracker, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDrinkingSound, getEatingSound, getEffect, getEyeHeight, getFallFlyingTicks, getFeetBlockState, getFluidFallingAdjustedMovement, getHealth, getItemInHand, getJumpPower, getKillCredit, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getLootTable, getMainHandItem, getMaxHealth, getMobType, getNoActionTime, getOffhandItem, getRandom, getRelativePortalPosition, getScale, getSleepingPos, getSoundVolume, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVoicePitch, getWaterSlowDown, getYHeadRot, goDownInWater, handleRelativeFrictionAndCalculateMovement, hasEffect, hasItemInSlot, heal, increaseAirSupply, invalidateCaps, isAffectedByPotions, isAlive, isAutoSpinAttack, isBaby, isBlocking, isDeadOrDying, isEffectiveAi, isFallFlying, isHolding, isHolding, isInvertedHealAndHarm, isInWall, isPickable, isPushable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, jumpInLiquid, kill, knockback, lerpHeadTo, lerpTo, makeBrain, markHurt, onClimbable, onItemPickup, onSyncedDataUpdated, outOfWorld, playBlockFallSound, playEquipSound, playHurtSound, push, pushEntities, randomTeleport, releaseUsingItem, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeSoulSpeed, resetForwardDirectionOfRelativePortalPosition, rideableUnderWater, setArrowCount, setHealth, setItemInHand, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setOnGround, setRecordPlayingNearby, setSleepingPos, setSpeed, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDropExperience, shouldDropLoot, shouldRiderFaceForward, spawnSoulSpeedParticle, startAutoSpinAttack, startUsingItem, stopUsingItem, swing, tickDeath, tickEffects, tickHeadTurn, triggerItemUseEffects, tryAddSoulSpeed, updateEffectVisibility, updateSwingTime
-
Methods inherited from class net.minecraft.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, blockPosition, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canChangeDimensions, canCollideWith, canEnterPose, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, checkAndResetForcedChunkAdditionFlag, checkAndResetUpdateChunkPos, checkDespawn, checkInsideBlocks, clearFire, closerThan, collideBoundingBox, collideBoundingBoxHeuristically, collideBoundingBoxLegacy, copyPosition, createCommandSourceStack, createHoverEvent, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, ejectPassengers, equals, fillCrashReportCategory, fireImmune, getAirSupply, getAllSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBoundingBox, getBoundingBoxForPose, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControllingPassenger, getCustomName, getDeltaMovement, getDirection, getDismountLocationForPassenger, getEncodeId, getEntityData, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyeY, getFluidHeight, getFluidJumpThreshold, getForward, getHorizontalDistanceSqr, getId, getIndirectPassengers, getLeashOffset, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMotionDirection, getOnPos, getPacketCoordinates, getPassengers, getPassengersRidingOffset, getPersistentData, getPickRadius, getPistonPushReaction, getPose, getPosition, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRootVehicle, getRotationVector, getSelfAndPassengers, getServer, getSharedFlag, getStringUUID, getTags, getTeam, getTeamColor, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getX, getX, getY, getY, getZ, getZ, handleInsidePortal, handleNetherPortal, hasCustomName, hashCode, hasIndirectPassenger, hasOnePlayerPassenger, hasPassenger, hasPassenger, hasPermissions, ignoreExplosion, interact, interactAt, is, isAddedToWorld, isAlliedTo, isAlliedTo, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFree, isGlowing, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isShiftKeyDown, isSilent, isSprinting, isSteppingCarefully, isSuppressingBounce, isUnderWater, isVehicle, isVisuallyCrawling, lavaHurt, lerpMotion, limitPistonMovement, load, makeFlySound, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, pick, playerTouch, playFlySound, playStepSound, playSwimSound, position, positionRider, push, reapplyPosition, refreshDimensions, remove, removeAfterChangingDimensions, removePassenger, removeTag, repositionEntityAfterLoad, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowing, setId, setInvisible, setInvulnerable, setLevel, setLocationFromBoundingbox, setNoGravity, setPacketCoordinates, setPacketCoordinates, setPortalCooldown, setPos, setPosAndOldPos, setPose, setPosRaw, setRot, setSecondsOnFire, setSharedFlag, setShiftKeyDown, setSilent, setSwimming, setUUID, setViewScale, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startSeenByPlayer, stopSeenByPlayer, teleportToWithTicket, thunderHit, toString, turn, unRide, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCaps
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getDimensionsForge, getEntity, getEyeHeightForge, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
connection
public ServerPlayNetHandler connection
-
server
public final MinecraftServer server
-
gameMode
public final PlayerInteractionManager gameMode
-
entitiesToRemove
private final java.util.List<java.lang.Integer> entitiesToRemove
-
advancements
private final PlayerAdvancements advancements
-
stats
private final ServerStatisticsManager 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
private ChatVisibility chatVisibility
-
canChatColor
private boolean canChatColor
-
lastActionTime
private long lastActionTime
-
camera
private Entity camera
-
isChangingDimension
private boolean isChangingDimension
-
seenCredits
private boolean seenCredits
-
recipeBook
private final ServerRecipeBook recipeBook
-
levitationStartPos
private Vector3d levitationStartPos
-
levitationStartTime
private int levitationStartTime
-
disconnected
private boolean disconnected
-
enteredNetherPosition
@Nullable private Vector3d enteredNetherPosition
-
lastSectionPos
private SectionPos lastSectionPos
-
respawnDimension
private RegistryKey<World> respawnDimension
-
respawnPosition
@Nullable private BlockPos respawnPosition
-
respawnForced
private boolean respawnForced
-
respawnAngle
private float respawnAngle
-
textFilter
@Nullable private final IChatFilter textFilter
-
containerCounter
public int containerCounter
-
ignoreSlotUpdateHack
public boolean ignoreSlotUpdateHack
-
latency
public int latency
-
wonGame
public boolean wonGame
-
language
private java.lang.String language
-
hasTabListName
private boolean hasTabListName
-
tabListDisplayName
private ITextComponent tabListDisplayName
-
-
Constructor Detail
-
ServerPlayerEntity
public ServerPlayerEntity(MinecraftServer p_i45285_1_, ServerWorld p_i45285_2_, com.mojang.authlib.GameProfile p_i45285_3_, PlayerInteractionManager p_i45285_4_)
-
-
Method Detail
-
fudgeSpawnLocation
private void fudgeSpawnLocation(ServerWorld p_205734_1_)
-
getCoprime
private int getCoprime(int p_205735_1_)
-
readAdditionalSaveData
public void readAdditionalSaveData(CompoundNBT p_70037_1_)
- Overrides:
readAdditionalSaveData
in classPlayerEntity
-
addAdditionalSaveData
public void addAdditionalSaveData(CompoundNBT p_213281_1_)
- Overrides:
addAdditionalSaveData
in classPlayerEntity
-
setExperiencePoints
public void setExperiencePoints(int p_195394_1_)
-
setExperienceLevels
public void setExperienceLevels(int p_195399_1_)
-
giveExperienceLevels
public void giveExperienceLevels(int p_82242_1_)
- Overrides:
giveExperienceLevels
in classPlayerEntity
-
onEnchantmentPerformed
public void onEnchantmentPerformed(ItemStack p_192024_1_, int p_192024_2_)
- Overrides:
onEnchantmentPerformed
in classPlayerEntity
-
initMenu
public void initMenu()
-
onEnterCombat
public void onEnterCombat()
- Overrides:
onEnterCombat
in classLivingEntity
-
onLeaveCombat
public void onLeaveCombat()
- Overrides:
onLeaveCombat
in classLivingEntity
-
onInsideBlock
protected void onInsideBlock(BlockState p_191955_1_)
- Overrides:
onInsideBlock
in classEntity
-
createItemCooldowns
protected CooldownTracker createItemCooldowns()
- Overrides:
createItemCooldowns
in classPlayerEntity
-
tick
public void tick()
- Overrides:
tick
in classPlayerEntity
-
doTick
public void doTick()
-
updateScoreForCriteria
private void updateScoreForCriteria(ScoreCriteria p_184849_1_, int p_184849_2_)
-
die
public void die(DamageSource p_70645_1_)
- Overrides:
die
in classPlayerEntity
-
tellNeutralMobsThatIDied
private void tellNeutralMobsThatIDied()
-
awardKillScore
public void awardKillScore(Entity p_191956_1_, int p_191956_2_, DamageSource p_191956_3_)
- Overrides:
awardKillScore
in classEntity
-
handleTeamKill
private void handleTeamKill(java.lang.String p_195398_1_, java.lang.String p_195398_2_, ScoreCriteria[] p_195398_3_)
-
hurt
public boolean hurt(DamageSource p_70097_1_, float p_70097_2_)
- Overrides:
hurt
in classPlayerEntity
-
canHarmPlayer
public boolean canHarmPlayer(PlayerEntity p_96122_1_)
- Overrides:
canHarmPlayer
in classPlayerEntity
-
isPvpAllowed
private boolean isPvpAllowed()
-
findDimensionEntryPoint
@Nullable protected PortalInfo findDimensionEntryPoint(ServerWorld p_241829_1_)
- Overrides:
findDimensionEntryPoint
in classEntity
-
changeDimension
@Nullable public Entity changeDimension(ServerWorld p_241206_1_, ITeleporter teleporter)
- Overrides:
changeDimension
in classEntity
-
createEndPlatform
private void createEndPlatform(ServerWorld p_242110_1_, BlockPos p_242110_2_)
-
getExitPortal
protected java.util.Optional<TeleportationRepositioner.Result> getExitPortal(ServerWorld p_241830_1_, BlockPos p_241830_2_, boolean p_241830_3_)
- Overrides:
getExitPortal
in classEntity
-
triggerDimensionChangeTriggers
private void triggerDimensionChangeTriggers(ServerWorld p_213846_1_)
-
broadcastToPlayer
public boolean broadcastToPlayer(ServerPlayerEntity p_174827_1_)
- Overrides:
broadcastToPlayer
in classEntity
-
broadcast
private void broadcast(TileEntity p_147097_1_)
-
take
public void take(Entity p_71001_1_, int p_71001_2_)
- Overrides:
take
in classLivingEntity
-
startSleepInBed
public com.mojang.datafixers.util.Either<PlayerEntity.SleepResult,Unit> startSleepInBed(BlockPos p_213819_1_)
- Overrides:
startSleepInBed
in classPlayerEntity
-
startSleeping
public void startSleeping(BlockPos p_213342_1_)
- Overrides:
startSleeping
in classLivingEntity
-
isReachableBedBlock
private boolean isReachableBedBlock(BlockPos p_241158_1_)
-
stopSleepInBed
public void stopSleepInBed(boolean p_225652_1_, boolean p_225652_2_)
- Overrides:
stopSleepInBed
in classPlayerEntity
-
startRiding
public boolean startRiding(Entity p_184205_1_, boolean p_184205_2_)
- Overrides:
startRiding
in classEntity
-
stopRiding
public void stopRiding()
- Overrides:
stopRiding
in classLivingEntity
-
isInvulnerableTo
public boolean isInvulnerableTo(DamageSource p_180431_1_)
- Overrides:
isInvulnerableTo
in classPlayerEntity
-
checkFallDamage
protected void checkFallDamage(double p_184231_1_, boolean p_184231_3_, BlockState p_184231_4_, BlockPos p_184231_5_)
- Overrides:
checkFallDamage
in classLivingEntity
-
onChangedBlock
protected void onChangedBlock(BlockPos p_184594_1_)
- Overrides:
onChangedBlock
in classLivingEntity
-
doCheckFallDamage
public void doCheckFallDamage(double p_71122_1_, boolean p_71122_3_)
-
openTextEdit
public void openTextEdit(SignTileEntity p_175141_1_)
- Overrides:
openTextEdit
in classPlayerEntity
-
nextContainerCounter
public void nextContainerCounter()
-
openMenu
public java.util.OptionalInt openMenu(@Nullable INamedContainerProvider p_213829_1_)
- Overrides:
openMenu
in classPlayerEntity
-
sendMerchantOffers
public void sendMerchantOffers(int p_213818_1_, MerchantOffers p_213818_2_, int p_213818_3_, int p_213818_4_, boolean p_213818_5_, boolean p_213818_6_)
- Overrides:
sendMerchantOffers
in classPlayerEntity
-
openHorseInventory
public void openHorseInventory(AbstractHorseEntity p_184826_1_, IInventory p_184826_2_)
- Overrides:
openHorseInventory
in classPlayerEntity
-
openItemGui
public void openItemGui(ItemStack p_184814_1_, Hand p_184814_2_)
- Overrides:
openItemGui
in classPlayerEntity
-
openCommandBlock
public void openCommandBlock(CommandBlockTileEntity p_184824_1_)
- Overrides:
openCommandBlock
in classPlayerEntity
-
slotChanged
public void slotChanged(Container p_71111_1_, int p_71111_2_, ItemStack p_71111_3_)
- Specified by:
slotChanged
in interfaceIContainerListener
-
refreshContainer
public void refreshContainer(Container p_71120_1_)
-
refreshContainer
public void refreshContainer(Container p_71110_1_, NonNullList<ItemStack> p_71110_2_)
- Specified by:
refreshContainer
in interfaceIContainerListener
-
setContainerData
public void setContainerData(Container p_71112_1_, int p_71112_2_, int p_71112_3_)
- Specified by:
setContainerData
in interfaceIContainerListener
-
closeContainer
public void closeContainer()
- Overrides:
closeContainer
in classPlayerEntity
-
broadcastCarriedItem
public void broadcastCarriedItem()
-
doCloseContainer
public void doCloseContainer()
-
setPlayerInput
public void setPlayerInput(float p_110430_1_, float p_110430_2_, boolean p_110430_3_, boolean p_110430_4_)
-
awardStat
public void awardStat(Stat<?> p_71064_1_, int p_71064_2_)
- Overrides:
awardStat
in classPlayerEntity
-
resetStat
public void resetStat(Stat<?> p_175145_1_)
- Overrides:
resetStat
in classPlayerEntity
-
awardRecipes
public int awardRecipes(java.util.Collection<IRecipe<?>> p_195065_1_)
- Overrides:
awardRecipes
in classPlayerEntity
-
awardRecipesByKey
public void awardRecipesByKey(ResourceLocation[] p_193102_1_)
- Overrides:
awardRecipesByKey
in classPlayerEntity
-
resetRecipes
public int resetRecipes(java.util.Collection<IRecipe<?>> p_195069_1_)
- Overrides:
resetRecipes
in classPlayerEntity
-
giveExperiencePoints
public void giveExperiencePoints(int p_195068_1_)
- Overrides:
giveExperiencePoints
in classPlayerEntity
-
disconnect
public void disconnect()
-
hasDisconnected
public boolean hasDisconnected()
-
resetSentInfo
public void resetSentInfo()
-
displayClientMessage
public void displayClientMessage(ITextComponent p_146105_1_, boolean p_146105_2_)
- Overrides:
displayClientMessage
in classPlayerEntity
-
completeUsingItem
protected void completeUsingItem()
- Overrides:
completeUsingItem
in classLivingEntity
-
lookAt
public void lookAt(EntityAnchorArgument.Type p_200602_1_, Vector3d p_200602_2_)
- Overrides:
lookAt
in classLivingEntity
-
lookAt
public void lookAt(EntityAnchorArgument.Type p_200618_1_, Entity p_200618_2_, EntityAnchorArgument.Type p_200618_3_)
-
restoreFrom
public void restoreFrom(ServerPlayerEntity p_193104_1_, boolean p_193104_2_)
-
onEffectAdded
protected void onEffectAdded(EffectInstance p_70670_1_)
- Overrides:
onEffectAdded
in classLivingEntity
-
onEffectUpdated
protected void onEffectUpdated(EffectInstance p_70695_1_, boolean p_70695_2_)
- Overrides:
onEffectUpdated
in classLivingEntity
-
onEffectRemoved
protected void onEffectRemoved(EffectInstance p_70688_1_)
- Overrides:
onEffectRemoved
in classLivingEntity
-
teleportTo
public void teleportTo(double p_70634_1_, double p_70634_3_, double p_70634_5_)
- Overrides:
teleportTo
in classEntity
-
moveTo
public void moveTo(double p_225653_1_, double p_225653_3_, double p_225653_5_)
-
crit
public void crit(Entity p_71009_1_)
- Overrides:
crit
in classPlayerEntity
-
magicCrit
public void magicCrit(Entity p_71047_1_)
- Overrides:
magicCrit
in classPlayerEntity
-
onUpdateAbilities
public void onUpdateAbilities()
- Overrides:
onUpdateAbilities
in classPlayerEntity
-
getLevel
public ServerWorld getLevel()
-
setGameMode
public void setGameMode(GameType p_71033_1_)
- Overrides:
setGameMode
in classPlayerEntity
-
isSpectator
public boolean isSpectator()
- Specified by:
isSpectator
in classPlayerEntity
-
isCreative
public boolean isCreative()
- Specified by:
isCreative
in classPlayerEntity
-
sendMessage
public void sendMessage(ITextComponent p_145747_1_, java.util.UUID p_145747_2_)
- Specified by:
sendMessage
in interfaceICommandSource
- Overrides:
sendMessage
in classEntity
-
sendMessage
public void sendMessage(ITextComponent p_241151_1_, ChatType p_241151_2_, java.util.UUID p_241151_3_)
-
getIpAddress
public java.lang.String getIpAddress()
-
updateOptions
public void updateOptions(CClientSettingsPacket p_147100_1_)
-
getChatVisibility
public ChatVisibility getChatVisibility()
-
sendTexturePack
public void sendTexturePack(java.lang.String p_175397_1_, java.lang.String p_175397_2_)
-
getPermissionLevel
protected int getPermissionLevel()
- Overrides:
getPermissionLevel
in classEntity
-
resetLastActionTime
public void resetLastActionTime()
-
getStats
public ServerStatisticsManager getStats()
-
getRecipeBook
public ServerRecipeBook getRecipeBook()
-
sendRemoveEntity
public void sendRemoveEntity(Entity p_152339_1_)
-
cancelRemoveEntity
public void cancelRemoveEntity(Entity p_184848_1_)
-
updateInvisibilityStatus
protected void updateInvisibilityStatus()
- Overrides:
updateInvisibilityStatus
in classLivingEntity
-
getCamera
public Entity getCamera()
-
setCamera
public void setCamera(Entity p_175399_1_)
-
processPortalCooldown
protected void processPortalCooldown()
- Overrides:
processPortalCooldown
in classEntity
-
attack
public void attack(Entity p_71059_1_)
- Overrides:
attack
in classPlayerEntity
-
getLastActionTime
public long getLastActionTime()
-
getTabListDisplayName
@Nullable public ITextComponent getTabListDisplayName()
-
swing
public void swing(Hand p_184609_1_)
- Overrides:
swing
in classLivingEntity
-
isChangingDimension
public boolean isChangingDimension()
-
hasChangedDimension
public void hasChangedDimension()
-
getAdvancements
public PlayerAdvancements getAdvancements()
-
teleportTo
public void teleportTo(ServerWorld p_200619_1_, double p_200619_2_, double p_200619_4_, double p_200619_6_, float p_200619_8_, float p_200619_9_)
-
getRespawnPosition
@Nullable public BlockPos getRespawnPosition()
-
getRespawnAngle
public float getRespawnAngle()
-
getRespawnDimension
public RegistryKey<World> getRespawnDimension()
-
isRespawnForced
public boolean isRespawnForced()
-
setRespawnPosition
public void setRespawnPosition(RegistryKey<World> p_242111_1_, @Nullable BlockPos p_242111_2_, float p_242111_3_, boolean p_242111_4_, boolean p_242111_5_)
-
trackChunk
public void trackChunk(ChunkPos p_213844_1_, IPacket<?> p_213844_2_, IPacket<?> p_213844_3_)
-
untrackChunk
public void untrackChunk(ChunkPos p_213845_1_)
-
getLastSectionPos
public SectionPos getLastSectionPos()
-
setLastSectionPos
public void setLastSectionPos(SectionPos p_213850_1_)
-
playNotifySound
public void playNotifySound(SoundEvent p_213823_1_, SoundCategory p_213823_2_, float p_213823_3_, float p_213823_4_)
- Overrides:
playNotifySound
in classPlayerEntity
-
getAddEntityPacket
public IPacket<?> getAddEntityPacket()
- Overrides:
getAddEntityPacket
in classLivingEntity
-
drop
public ItemEntity drop(ItemStack p_146097_1_, boolean p_146097_2_, boolean p_146097_3_)
- Overrides:
drop
in classPlayerEntity
-
getLanguage
public java.lang.String getLanguage()
Returns the language last reported by the player as their local language. Defaults to en_us if the value is unknown.
-
refreshTabListName
public void refreshTabListName()
Force the name displayed in the tab list to refresh, by firingPlayerEvent.TabListNameFormat
.
-
getTextFilter
@Nullable public IChatFilter getTextFilter()
-
-