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,EntityAccess,Nameable,ICapabilityProvider,ICapabilitySerializable<CompoundTag>,IForgeEntity,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
FakePlayer
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.player.Player
Player.BedSleepingProblemNested classes/interfaces inherited from class net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReason -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PlayerAdvancementsprivate Entityprivate booleanprivate ChatVisiblityintprivate ContainerListenerprivate ContainerSynchronizerprivate booleanprivate Vec3private booleanprivate booleanprivate Stringprivate longprivate booleanprivate intprivate intprivate intprivate intprivate floatprivate intprivate SectionPosprivate intprivate intprivate floatintprivate Vec3private intprivate static org.apache.logging.log4j.Loggerprivate static intprivate static intprivate ServerRecipeBookprivate floatprivate ResourceKey<Level>private booleanprivate BlockPosprivate booleanprivate intprivate ServerStatsCounterprivate Componentprivate TextFilterprivate booleanbooleanFields 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, inventoryMenu, jumpTriggerTime, MAX_HEALTH, MAX_NAME_LENGTH, oBob, PERSISTED_NBT_TAG, SLEEP_DURATION, STANDING_DIMENSIONS, SWIMMING_BB_HEIGHT, SWIMMING_BB_WIDTH, takeXpDelay, totalExperience, UUID_PREFIX_OFFLINE_PLAYER, WAKE_UP_DURATION, wasUnderwater, xCloak, xCloakO, yCloak, yCloakO, zCloak, zCloakOFields inherited from class net.minecraft.world.entity.LivingEntity
animationPosition, animationSpeed, animationSpeedOld, 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, flyingSpeed, HAND_SLOTS, hurtDir, 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, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zzaFields 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, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, fluidOnEyes, flyDist, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, level, MAX_ENTITY_TAG_COUNT, maxUpStep, moveDist, noCulling, noPhysics, onGround, PASSENGERS_TAG, portalEntrancePos, portalTime, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOldFields inherited from interface net.minecraft.commands.CommandSource
NULL -
Constructor Summary
ConstructorsConstructorDescriptionServerPlayer(MinecraftServer p_143384_, ServerLevel p_143385_, com.mojang.authlib.GameProfile p_143386_) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanacceptsChat(ChatType p_143417_)voidaddAdditionalSaveData(CompoundTag p_9197_)voidvoidawardKillScore(Entity p_9050_, int p_9051_, DamageSource p_9052_)intawardRecipes(Collection<Recipe<?>> p_9129_)voidawardRecipesByKey(ResourceLocation[] p_9168_)voidprivate booleanbedBlocked(BlockPos p_9192_, Direction p_9193_)private booleanbedInRange(BlockPos p_9117_, Direction p_9118_)private voidbroadcast(BlockEntity p_9097_)booleanbroadcastToPlayer(ServerPlayer p_9014_)private GameTypecalculateGameModeForNewPlayer(GameType p_143424_)booleanbooleancanHarmPlayer(Player p_9064_)changeDimension(ServerLevel p_9180_, ITeleporter teleporter)protected voidcheckFallDamage(double p_8976_, boolean p_8977_, BlockState p_8978_, BlockPos p_8979_)voidprotected voidprivate voidcreateEndPlatform(ServerLevel p_9007_, BlockPos p_9008_)protected ItemCooldownsvoidvoiddie(DamageSource p_9035_)voidvoiddismountTo(double p_143389_, double p_143390_, double p_143391_)voiddisplayClientMessage(Component p_9154_, boolean p_9155_)voiddoCheckFallDamage(double p_8973_, boolean p_8974_)voidvoiddoTick()booleandrop(boolean p_182295_)protected PortalInfofindDimensionEntryPoint(ServerLevel p_8998_)private voidfudgeSpawnLocation(ServerLevel p_9202_)Packet<?>private intgetCoprime(int p_9238_)protected Optional<BlockUtil.FoundRectangle>getExitPortal(ServerLevel p_9010_, BlockPos p_9011_, boolean p_9012_)Returns the language last reported by the player as their local language.longgetLevel()protected intfloatgetStats()voidgiveExperienceLevels(int p_9200_)voidgiveExperiencePoints(int p_9208_)private voidhandleTeamKill(String p_9125_, String p_9126_, ObjectiveCriteria[] p_9127_)voidbooleanbooleanhurt(DamageSource p_9037_, float p_9038_)voidvoidinitMenu(AbstractContainerMenu p_143400_)booleanbooleanbooleanisInvulnerableTo(DamageSource p_9182_)private booleanprivate booleanisReachableBedBlock(BlockPos p_9223_)booleanbooleanbooleanvoidloadGameTypes(CompoundTag p_143428_)voidlookAt(EntityAnchorArgument.Anchor p_9108_, Entity p_9109_, EntityAnchorArgument.Anchor p_9110_)voidlookAt(EntityAnchorArgument.Anchor p_9112_, Vec3 p_9113_)voidbooleanmayInteract(Level p_143406_, BlockPos p_143407_)voidmoveTo(double p_9171_, double p_9172_, double p_9173_)voidprotected voidonChangedBlock(BlockPos p_9206_)protected voidonEffectAdded(MobEffectInstance p_143393_, Entity p_143394_)protected voidonEffectRemoved(MobEffectInstance p_9184_)protected voidonEffectUpdated(MobEffectInstance p_143396_, boolean p_143397_, Entity p_143398_)voidonEnchantmentPerformed(ItemStack p_9079_, int p_9080_)voidprotected voidonInsideBlock(BlockState p_9103_)voidvoidvoidopenCommandBlock(CommandBlockEntity p_9099_)voidopenHorseInventory(AbstractHorse p_9059_, Container p_9060_)voidopenItemGui(ItemStack p_9082_, InteractionHand p_9083_)openMenu(MenuProvider p_9033_)voidopenTextEdit(SignBlockEntity p_9101_)voidplayNotifySound(SoundEvent p_9019_, SoundSource p_9020_, float p_9021_, float p_9022_)protected voidvoidreadAdditionalSaveData(CompoundTag p_9131_)private static GameTypereadPlayerMode(CompoundTag p_143414_, String p_143415_)voidForce the name displayed in the tab list to refresh, by firingPlayerEvent.TabListNameFormat.voidintresetRecipes(Collection<Recipe<?>> p_9195_)voidvoidvoidrestoreFrom(ServerPlayer p_9016_, boolean p_9017_)voidsendMerchantOffers(int p_8988_, MerchantOffers p_8989_, int p_8990_, int p_8991_, boolean p_8992_, boolean p_8993_)voidsendMessage(Component p_9144_, UUID p_9145_)voidsendMessage(Component p_9147_, ChatType p_9148_, UUID p_9149_)voidsendTexturePack(String p_143409_, String p_143410_, boolean p_143411_, Component p_143412_)voidvoidsetExperienceLevels(int p_9175_)voidsetExperiencePoints(int p_8986_)booleansetGameMode(GameType p_143404_)voidsetLastSectionPos(SectionPos p_9120_)voidsetLevel(ServerLevel p_143426_)voidsetPlayerInput(float p_8981_, float p_8982_, boolean p_8983_, boolean p_8984_)voidsetRespawnPosition(ResourceKey<Level> p_9159_, BlockPos p_9160_, float p_9161_, boolean p_9162_, boolean p_9163_)booleanshouldFilterMessageTo(ServerPlayer p_143422_)booleanstartRiding(Entity p_9054_, boolean p_9055_)com.mojang.datafixers.util.Either<Player.BedSleepingProblem,Unit>startSleepInBed(BlockPos p_9115_)voidstartSleeping(BlockPos p_9190_)voidvoidstopSleepInBed(boolean p_9165_, boolean p_9166_)private voidstoreGameTypes(CompoundTag p_143431_)voidswing(InteractionHand p_9031_)voidvoidteleportTo(double p_8969_, double p_8970_, double p_8971_)voidteleportTo(ServerLevel p_9000_, double p_9001_, double p_9002_, double p_9003_, float p_9004_, float p_9005_)private voidvoidtick()voidtrackChunk(ChunkPos p_9091_, Packet<?> p_9092_, Packet<?> p_9093_)private voidtriggerDimensionChangeTriggers(ServerLevel p_9210_)voiduntrackChunk(ChunkPos p_9089_)protected voidvoidprivate voidupdateScoreForCriteria(ObjectiveCriteria p_9105_, int p_9106_)protected voidupdateUsingItem(ItemStack p_143402_)Methods inherited from class net.minecraft.world.entity.player.Player
actuallyHurt, addItem, aiStep, awardStat, awardStat, awardStat, blockActionRestricted, blockUsingShield, canBeSeenAsEnemy, canEat, canTakeItem, canUseGameMasterBlocks, causeFallDamage, causeFoodExhaustion, checkMovementStatistics, createAttributes, createPlayerUUID, createPlayerUUID, defineSynchedData, destroyVanishingCursedItems, disableShield, doAutoAttackOnTouch, doWaterSplashEffect, drop, dropEquipment, eat, findRespawnPositionAndUseSpawnBlock, freeAt, getAbilities, getAbsorptionAmount, getArmorSlots, getAttackStrengthScale, getBlockSpeedFactor, getCapability, getCooldowns, getCurrentItemAttackStrengthDelay, getDeathSound, getDestroySpeed, getDigSpeed, getDimensionChangingDelay, getDimensions, getDismountPoses, getDisplayName, getEnchantmentSeed, getEnderChestInventory, getExperienceReward, getFallDamageSound, getFireImmuneTicks, getFoodData, getForcedPose, getGameProfile, getHandSlots, getHurtSound, getInventory, getItemBySlot, 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, hasCorrectToolForDrops, hurtArmor, hurtCurrentlyUsedShield, hurtHelmet, increaseScore, interactOn, isAffectedByFluids, isAlwaysExperienceDropper, isAlwaysTicking, isHurt, isImmobile, isLocalPlayer, isModelPartShown, isPushedByFluid, isReducedDebugInfo, isScoping, isSecondaryUseActive, isSleepingLongEnough, isStayingOnGroundSurface, isSwimming, jumpFromGround, killed, makeStuckInBlock, maybeBackOffFromEdge, mayBuild, mayUseItemAt, onSoulSpeedBlock, openJigsawBlock, openMinecartCommandBlock, openStructureBlock, playSound, refreshDisplayName, remove, removeEntitiesOnShoulder, removeVehicle, resetAttackStrengthTicker, respawn, rideTick, serverAiStep, setAbsorptionAmount, setEntityOnShoulder, setForcedPose, setItemSlot, setMainArm, setReducedDebugInfo, setRemainingFireTicks, setScore, setShoulderEntityLeft, setShoulderEntityRight, shouldBeSaved, shouldRemoveSoulSpeed, shouldShowName, startFallFlying, stopFallFlying, stopSleeping, sweepAttack, travel, tryToStartFallFlying, updateIsUnderwater, updatePlayerPose, updateSwimming, updateTutorialInventoryAction, wantsToStopRidingMethods inherited from class net.minecraft.world.entity.LivingEntity
addEffect, addEffect, animateHurt, areAllEffectsAmbient, attackable, baseTick, blockedByShield, brainProvider, broadcastBreakEvent, broadcastBreakEvent, calculateEntityAnimation, calculateFallDamage, canAttack, canAttack, canAttackType, canBeAffected, canBeSeenByAnyone, canBreatheUnderwater, canFreeze, canSpawnSoulSpeedParticle, canStandOnFluid, checkAutoSpinAttack, clearSleepingPos, createLivingAttributes, createLootContext, createWitherRose, curePotionEffects, decreaseAirSupply, doHurtTarget, doPush, dropAllDeathLoot, dropCustomDeathLoot, dropExperience, dropFromLootTable, equipEventAndSound, forceAddEffect, getActiveEffects, getActiveEffectsMap, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributes, getAttributeValue, getBedOrientation, getBoundingBoxForCulling, getBrain, getCombatTracker, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDrinkingSound, getEatingSound, getEffect, getEquipmentSlotForItem, getEyeHeight, getFallFlyingTicks, getFluidFallingAdjustedMovement, getHealth, getItemInHand, getJumpBoostPower, 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, hasLineOfSight, heal, increaseAirSupply, invalidateCaps, isAffectedByPotions, isAlive, isAutoSpinAttack, isBaby, isBlocking, isCurrentlyGlowing, isDamageSourceBlocked, 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, playHurtSound, push, pushEntities, randomTeleport, recreateFromPacket, releaseUsingItem, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeFrost, removeSoulSpeed, resetForwardDirectionOfRelativePortalPosition, reviveCaps, rideableUnderWater, setArrowCount, setDiscardFriction, setHealth, setItemInHand, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setOnGround, setRecordPlayingNearby, setSleepingPos, setSpeed, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDiscardFriction, shouldDropExperience, shouldDropLoot, shouldRiderFaceForward, spawnSoulSpeedParticle, startAutoSpinAttack, startUsingItem, stopUsingItem, swing, tickDeath, tickEffects, tickHeadTurn, triggerItemUseEffects, tryAddFrost, tryAddSoulSpeed, updateEffectVisibility, updateSwingTime, verifyEquippedItemMethods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, blockPosition, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canChangeDimensions, canCollideWith, canEnterPose, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, checkDespawn, checkInsideBlocks, checkOutOfWorld, chunkPosition, clearFire, closerThan, collideBoundingBox, collideBoundingBoxHeuristically, collideBoundingBoxLegacy, copyPosition, createCommandSourceStack, createHoverEvent, discard, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, ejectPassengers, equals, eyeBlockPosition, fillCrashReportCategory, fireImmune, gameEvent, gameEvent, gameEvent, gameEvent, getAirSupply, getAllSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForPose, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControllingPassenger, getCustomName, getDeltaMovement, getDirection, getDismountLocationForPassenger, getEncodeId, getEntityData, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getForward, getGameEventListenerRegistrar, getId, getIndirectPassengers, getLeashOffset, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMotionDirection, getOnPos, getPacketCoordinates, getPassengers, getPassengersAndSelf, getPassengersRidingOffset, getPercentFrozen, getPersistentData, getPickRadius, getPickResult, getPistonPushReaction, getPose, getPosition, 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, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, ignoreExplosion, interact, interactAt, is, isAddedToWorld, isAlliedTo, isAlliedTo, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFlapping, isFree, isFullyFrozen, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isRemoved, isShiftKeyDown, isSilent, isSprinting, isSteppingCarefully, isSuppressingBounce, isUnderWater, isVehicle, isVisuallyCrawling, lavaHurt, lerpMotion, limitPistonMovement, load, makeBoundingBox, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, occludesVibrations, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onFlap, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, pick, playEntityOnFireExtinguishedSound, playerTouch, playStepSound, playSwimSound, position, positionRider, processFlappingMovement, push, reapplyPosition, recreateFromPacket, refreshDimensions, removeAfterChangingDimensions, removePassenger, removeTag, repositionEntityAfterLoad, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevelCallback, setNoGravity, setOldPosAndRot, setPacketCoordinates, setPacketCoordinates, 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, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushingMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCapsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.commands.CommandSource
alwaysAcceptsMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ- See Also:
- Constant Field Values
-
NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y- See Also:
- Constant Field Values
-
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 -
enteredNetherPosition
-
lastSectionPos
-
respawnDimension
-
respawnPosition
-
respawnForced
private boolean respawnForced -
respawnAngle
private float respawnAngle -
textFilter
-
textFilteringEnabled
private boolean textFilteringEnabled -
containerSynchronizer
-
containerListener
-
containerCounter
public int containerCounter -
latency
public int latency -
wonGame
public boolean wonGame -
language
-
hasTabListName
private boolean hasTabListName -
tabListDisplayName
-
-
Constructor Details
-
ServerPlayer
public ServerPlayer(MinecraftServer p_143384_, ServerLevel p_143385_, com.mojang.authlib.GameProfile p_143386_)
-
-
Method Details
-
fudgeSpawnLocation
-
getCoprime
private int getCoprime(int p_9238_) -
readAdditionalSaveData
- Overrides:
readAdditionalSaveDatain classPlayer
-
addAdditionalSaveData
- Overrides:
addAdditionalSaveDatain classPlayer
-
setExperiencePoints
public void setExperiencePoints(int p_8986_) -
setExperienceLevels
public void setExperienceLevels(int p_9175_) -
giveExperienceLevels
public void giveExperienceLevels(int p_9200_)- Overrides:
giveExperienceLevelsin classPlayer
-
onEnchantmentPerformed
- Overrides:
onEnchantmentPerformedin classPlayer
-
initMenu
-
initInventoryMenu
public void initInventoryMenu() -
onEnterCombat
public void onEnterCombat()- Overrides:
onEnterCombatin classLivingEntity
-
onLeaveCombat
public void onLeaveCombat()- Overrides:
onLeaveCombatin classLivingEntity
-
onInsideBlock
- Overrides:
onInsideBlockin classEntity
-
createItemCooldowns
- Overrides:
createItemCooldownsin classPlayer
-
tick
public void tick() -
doTick
public void doTick() -
updateScoreForCriteria
-
die
-
tellNeutralMobsThatIDied
private void tellNeutralMobsThatIDied() -
awardKillScore
- Overrides:
awardKillScorein classEntity
-
handleTeamKill
-
hurt
-
canHarmPlayer
- Overrides:
canHarmPlayerin classPlayer
-
isPvpAllowed
private boolean isPvpAllowed() -
findDimensionEntryPoint
- Overrides:
findDimensionEntryPointin classEntity
-
changeDimension
- Overrides:
changeDimensionin classEntity
-
createEndPlatform
-
getExitPortal
protected Optional<BlockUtil.FoundRectangle> getExitPortal(ServerLevel p_9010_, BlockPos p_9011_, boolean p_9012_)- Overrides:
getExitPortalin classEntity
-
triggerDimensionChangeTriggers
-
broadcastToPlayer
- Overrides:
broadcastToPlayerin classEntity
-
broadcast
-
take
- Overrides:
takein classLivingEntity
-
startSleepInBed
public com.mojang.datafixers.util.Either<Player.BedSleepingProblem,Unit> startSleepInBed(BlockPos p_9115_)- Overrides:
startSleepInBedin classPlayer
-
startSleeping
- Overrides:
startSleepingin classLivingEntity
-
bedInRange
-
isReachableBedBlock
-
bedBlocked
-
stopSleepInBed
public void stopSleepInBed(boolean p_9165_, boolean p_9166_)- Overrides:
stopSleepInBedin classPlayer
-
startRiding
- Overrides:
startRidingin classEntity
-
stopRiding
public void stopRiding()- Overrides:
stopRidingin classLivingEntity
-
dismountTo
public void dismountTo(double p_143389_, double p_143390_, double p_143391_)- Overrides:
dismountToin classEntity
-
isInvulnerableTo
- Overrides:
isInvulnerableToin classPlayer
-
checkFallDamage
protected void checkFallDamage(double p_8976_, boolean p_8977_, BlockState p_8978_, BlockPos p_8979_)- Overrides:
checkFallDamagein classLivingEntity
-
onChangedBlock
- Overrides:
onChangedBlockin classLivingEntity
-
doCheckFallDamage
public void doCheckFallDamage(double p_8973_, boolean p_8974_) -
openTextEdit
- Overrides:
openTextEditin 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:
sendMerchantOffersin classPlayer
-
openHorseInventory
- Overrides:
openHorseInventoryin classPlayer
-
openItemGui
- Overrides:
openItemGuiin classPlayer
-
openCommandBlock
- Overrides:
openCommandBlockin classPlayer
-
closeContainer
public void closeContainer()- Overrides:
closeContainerin classPlayer
-
doCloseContainer
public void doCloseContainer() -
setPlayerInput
public void setPlayerInput(float p_8981_, float p_8982_, boolean p_8983_, boolean p_8984_) -
awardStat
-
resetStat
-
awardRecipes
- Overrides:
awardRecipesin classPlayer
-
awardRecipesByKey
- Overrides:
awardRecipesByKeyin classPlayer
-
resetRecipes
- Overrides:
resetRecipesin classPlayer
-
giveExperiencePoints
public void giveExperiencePoints(int p_9208_)- Overrides:
giveExperiencePointsin classPlayer
-
disconnect
public void disconnect() -
hasDisconnected
public boolean hasDisconnected() -
resetSentInfo
public void resetSentInfo() -
displayClientMessage
- Overrides:
displayClientMessagein classPlayer
-
completeUsingItem
protected void completeUsingItem()- Overrides:
completeUsingItemin classLivingEntity
-
lookAt
- Overrides:
lookAtin classLivingEntity
-
lookAt
public void lookAt(EntityAnchorArgument.Anchor p_9108_, Entity p_9109_, EntityAnchorArgument.Anchor p_9110_) -
restoreFrom
-
onEffectAdded
- Overrides:
onEffectAddedin classLivingEntity
-
onEffectUpdated
protected void onEffectUpdated(MobEffectInstance p_143396_, boolean p_143397_, @Nullable Entity p_143398_)- Overrides:
onEffectUpdatedin classLivingEntity
-
onEffectRemoved
- Overrides:
onEffectRemovedin classLivingEntity
-
teleportTo
public void teleportTo(double p_8969_, double p_8970_, double p_8971_)- Overrides:
teleportToin classEntity
-
moveTo
public void moveTo(double p_9171_, double p_9172_, double p_9173_) -
crit
-
magicCrit
-
onUpdateAbilities
public void onUpdateAbilities()- Overrides:
onUpdateAbilitiesin classPlayer
-
getLevel
-
setGameMode
-
isSpectator
public boolean isSpectator()- Specified by:
isSpectatorin classPlayer
-
isCreative
public boolean isCreative()- Specified by:
isCreativein classPlayer
-
sendMessage
- Specified by:
sendMessagein interfaceCommandSource- Overrides:
sendMessagein classEntity
-
sendMessage
-
getIpAddress
-
updateOptions
-
canChatInColor
public boolean canChatInColor() -
getChatVisibility
-
acceptsChat
-
sendTexturePack
-
getPermissionLevel
protected int getPermissionLevel()- Overrides:
getPermissionLevelin classEntity
-
resetLastActionTime
public void resetLastActionTime() -
getStats
-
getRecipeBook
-
updateInvisibilityStatus
protected void updateInvisibilityStatus()- Overrides:
updateInvisibilityStatusin classLivingEntity
-
getCamera
-
setCamera
-
processPortalCooldown
protected void processPortalCooldown()- Overrides:
processPortalCooldownin classEntity
-
attack
-
getLastActionTime
public long getLastActionTime() -
getTabListDisplayName
-
swing
- Overrides:
swingin 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:
playNotifySoundin classPlayer
-
getAddEntityPacket
- Overrides:
getAddEntityPacketin classLivingEntity
-
drop
-
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
-
setLevel
-
readPlayerMode
@Nullable private static GameType readPlayerMode(@Nullable CompoundTag p_143414_, String p_143415_) -
calculateGameModeForNewPlayer
-
loadGameTypes
-
storeGameTypes
-
isTextFilteringEnabled
public boolean isTextFilteringEnabled() -
shouldFilterMessageTo
-
mayInteract
- Overrides:
mayInteractin classEntity
-
updateUsingItem
- Overrides:
updateUsingItemin classLivingEntity
-
drop
public boolean drop(boolean p_182295_)
-