Class Player
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
net.minecraft.world.entity.LivingEntity
net.minecraft.world.entity.player.Player
- All Implemented Interfaces:
- CommandSource,- Attackable,- EntityAccess,- Nameable,- ScoreHolder,- IAttachmentHolder,- IEntityExtension,- ILivingEntityExtension,- IPlayerExtension,- INBTSerializable<CompoundTag>
- Direct Known Subclasses:
- AbstractClientPlayer,- ServerPlayer
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class net.minecraft.world.entity.LivingEntityLivingEntity.FallsoundsNested classes/interfaces inherited from class net.minecraft.world.entity.EntityEntity.MoveFunction, Entity.MovementEmission, Entity.RemovalReasonNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolderAttachmentHolder.AsField
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final Abilitiesfloatprivate final ItemCooldownsstatic final floatprivate static final EntityDataAccessor<Float>protected static final EntityDataAccessor<Byte>protected static final EntityDataAccessor<Byte>private static final EntityDataAccessor<Integer>protected static final EntityDataAccessor<CompoundTag>protected static final EntityDataAccessor<CompoundTag>static final floatstatic final HumanoidArmstatic final intprotected final floatprivate Componentprotected intstatic final intprotected PlayerEnderChestContainerintfloatprotected FoodDataprivate Poseprivate final com.mojang.authlib.GameProfileprotected floatprivate final Inventoryfinal InventoryMenuprotected intprivate ItemStackprivate intprivate static final org.slf4j.Loggerstatic final intstatic final intfloatstatic final Stringprivate static final Map<Pose,EntityDimensions> private final Collection<MutableComponent>private booleanstatic final intprivate intstatic final EntityDimensionsprivate final Collection<MutableComponent>static final floatstatic final floatintprivate longintstatic final intprotected booleandoubledoubledoubledoubledoubledoubleFields inherited from class net.minecraft.world.entity.LivingEntityanimStep, 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, lerpYHeadRot, lerpYRot, lerpZ, LIVING_ENTITY_FLAG_IS_USING, LIVING_ENTITY_FLAG_OFF_HAND, LIVING_ENTITY_FLAG_SPIN_ATTACK, 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, zzaFields inherited from class net.minecraft.world.entity.EntityBASE_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, zOldFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolderATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.commands.CommandSourceNULLFields inherited from interface net.minecraft.world.scores.ScoreHolderWILDCARD, WILDCARD_NAME
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidactuallyHurt(DamageSource p_36312_, float p_36313_) voidaddAdditionalSaveData(CompoundTag p_36265_) booleanprivate voidaddParticlesAroundSelf(ParticleOptions p_36209_) voidaiStep()voidanimateHurt(float p_265280_) voidintawardRecipes(Collection<RecipeHolder<?>> p_36213_) voidawardRecipesByKey(List<ResourceLocation> p_312922_) voidawardStat(ResourceLocation p_36221_) voidawardStat(ResourceLocation p_36223_, int p_36224_) voidvoidbooleanblockActionRestricted(Level p_36188_, BlockPos p_36189_, GameType p_36190_) protected voidblockUsingShield(LivingEntity p_36295_) booleanbooleanbooleancanEat(boolean p_36392_) booleancanHarmPlayer(Player p_36169_) protected booleancanPlayerFitWithinBlocksAndEntitiesWhen(Pose p_294172_) booleanbooleancanTakeItem(ItemStack p_36315_) booleanbooleancauseFallDamage(float p_150093_, float p_150094_, DamageSource p_150095_) voidcauseFoodExhaustion(float p_36400_) voidstatic AttributeSupplier.Builderprotected ItemCooldownsvoidprivate MutableComponentdecorateDisplayNameComponent(MutableComponent p_36219_) protected voidprotected voidvoiddie(DamageSource p_36152_) voiddisableShield(boolean p_36385_) voiddisplayClientMessage(Component p_36216_, boolean p_36217_) protected voiddoAutoAttackOnTouch(LivingEntity p_36355_) protected voidprotected booleandoesEmitEquipEvent(EquipmentSlot p_219741_) protected voidprotected voidfindRespawnPositionAndUseSpawnBlock(ServerLevel p_36131_, BlockPos p_36132_, float p_36133_, boolean p_36134_, boolean p_36135_) protected booleanfloatfloatgetAttackStrengthScale(float p_36404_) protected floatfloatprotected SoundEventfloatgetDestroySpeed(BlockState p_36282_) Deprecated.floatgetDigSpeed(BlockState p_36282_, BlockPos pos) intgetDimensions(Pose p_36166_) com.google.common.collect.ImmutableList<Pose>intintprotected intprotected floatcom.mojang.authlib.GameProfilefloatprotected SoundEventgetHurtSound(DamageSource p_36310_) getItemBySlot(EquipmentSlot p_36257_) floatgetLuck()protected floatprotected Entity.MovementEmissiongetName()static floatgetPickRange(boolean p_305924_) intgetProjectile(ItemStack p_36349_) getRopeHoldPosition(float p_36374_) intgetScore()intgetSlot(int p_150112_) floatgetSpeed()floatgetStandingEyeHeight(Pose p_36259_, EntityDimensions p_36260_) protected SoundEventprotected SoundEventprotected SoundEventintvoidgiveExperienceLevels(int p_36276_) voidgiveExperiencePoints(int p_36291_) voidhandleEntityEvent(byte p_36120_) booleanbooleanhasCorrectToolForDrops(BlockState p_36299_) booleanhurt(DamageSource p_36154_, float p_36155_) protected voidhurtArmor(DamageSource p_36251_, float p_36252_) protected voidhurtCurrentlyUsedShield(float p_36383_) protected voidhurtHelmet(DamageSource p_150103_, float p_150104_) voidincreaseScore(int p_36402_) interactOn(Entity p_36158_, InteractionHand p_36159_) protected voidinternalSetAbsorptionAmount(float p_296426_) private booleanbooleanprotected booleanbooleanabstract booleanbooleanisHurt()protected booleanbooleanisInvulnerableTo(DamageSource p_36249_) booleanbooleanisModelPartShown(PlayerModelPart p_36171_) booleanbooleanbooleanbooleanbooleanabstract booleanprotected booleanbooleanbooleanstatic booleanisValidUsername(String p_304464_) voidbooleankilledEntity(ServerLevel p_219735_, LivingEntity p_219736_) voidvoidmakeStuckInBlock(BlockState p_36196_, Vec3 p_36197_) protected Vec3maybeBackOffFromEdge(Vec3 p_36201_, MoverType p_36202_) booleanmayBuild()booleanmayUseItemAt(BlockPos p_36205_, Direction p_36206_, ItemStack p_36207_) private voidvoidonEnchantmentPerformed(ItemStack p_36172_, int p_36173_) protected booleanvoidvoidopenCommandBlock(CommandBlockEntity p_36191_) voidopenHorseInventory(AbstractHorse p_36167_, Container p_36168_) voidopenItemGui(ItemStack p_36174_, InteractionHand p_36175_) voidopenJigsawBlock(JigsawBlockEntity p_36192_) openMenu(MenuProvider p_36150_) voidopenMinecartCommandBlock(BaseCommandBlock p_36182_) voidopenStructureBlock(StructureBlockEntity p_36194_) voidopenTextEdit(SignBlockEntity p_36193_, boolean p_277837_) voidplayNotifySound(SoundEvent p_36140_, SoundSource p_36141_, float p_36142_, float p_36143_) private voidplayShoulderEntityAmbientSound(CompoundTag p_36368_) voidplaySound(SoundEvent p_36137_, float p_36138_, float p_36139_) protected voidplayStepSound(BlockPos p_282121_, BlockState p_282194_) voidreadAdditionalSaveData(CompoundTag p_36215_) voidForce the displayed name to refresh, by firingPlayerEvent.NameFormat, using the real player name as event parameter.voidremove(Entity.RemovalReason p_150097_) protected voidvoidvoidintresetRecipes(Collection<RecipeHolder<?>> p_36263_) voidvoidrespawn()private voidrespawnEntityOnShoulder(CompoundTag p_36371_) voidrideTick()protected floatridingOffset(Entity p_294614_) voidsendMerchantOffers(int p_36121_, MerchantOffers p_36122_, int p_36123_, int p_36124_, boolean p_36125_, boolean p_36126_) protected voidbooleansetEntityOnShoulder(CompoundTag p_36361_) voidsetForcedPose(Pose pose) Force a pose for the player.voidsetItemSlot(EquipmentSlot p_36161_, ItemStack p_36162_) voidsetLastDeathLocation(Optional<GlobalPos> p_219750_) voidsetMainArm(HumanoidArm p_36164_) voidsetReducedDebugInfo(boolean p_36394_) voidsetRemainingFireTicks(int p_36353_) voidsetScore(int p_36398_) protected voidsetShoulderEntityLeft(CompoundTag p_36363_) protected voidsetShoulderEntityRight(CompoundTag p_36365_) booleanprotected booleanshouldRemoveSoulSpeed(BlockState p_36262_) booleanvoidstartAutoSpinAttack(int p_204080_) voidcom.mojang.datafixers.util.Either<Player.BedSleepingProblem,Unit> startSleepInBed(BlockPos p_36203_) voidvoidstopSleepInBed(boolean p_36226_, boolean p_36227_) voidvoidvoidtick()private voidvoidvoidtriggerRecipeCrafted(RecipeHolder<?> p_301080_, List<ItemStack> p_283609_) booleanprivate voidprotected booleanprotected voidvoidvoidupdateTutorialInventoryAction(ItemStack p_150098_, ItemStack p_150099_, ClickAction p_150100_) protected booleanMethods inherited from class net.minecraft.world.entity.LivingEntityaddEffect, addEffect, areAllEffectsAmbient, attackable, baseTick, blockedByShield, brainProvider, broadcastBreakEvent, broadcastBreakEvent, calculateEntityAnimation, calculateFallDamage, canAttack, canAttack, canAttackType, canBeAffected, canBeSeenByAnyone, canBreatheUnderwater, canChangeDimensions, canDisableShield, canFreeze, canSpawnSoulSpeedParticle, canStandOnFluid, checkAutoSpinAttack, checkFallDamage, clearSleepingPos, completeUsingItem, createLivingAttributes, createWitherRose, 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, getHitbox, getItemInHand, getJumpBoostPower, getJumpPower, getKillCredit, getLastAttacker, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getLootTable, getLootTableSeed, getMainHandItem, getMaxAbsorption, getMaxHealth, getMobType, getMyRidingOffset, getNoActionTime, getOffhandItem, getPassengerRidingPosition, 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, indicateDamage, isAffectedByPotions, isAlive, isAutoSpinAttack, isBaby, isBlocking, isCurrentlyGlowing, isDamageSourceBlocked, isDeadOrDying, isFallFlying, isHolding, isHolding, isInvertedHealAndHarm, isInWall, isPickable, isPushable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, jumpInLiquid, kill, knockback, lerpHeadRotationStep, lerpHeadTo, lerpTargetX, lerpTargetXRot, lerpTargetY, lerpTargetYRot, lerpTargetZ, lerpTo, lookAt, makeBrain, maxUpStep, onBelowWorld, onChangedBlock, onClimbable, onEffectAdded, onEffectRemoved, onEffectUpdated, onEnterCombat, onEquipItem, onItemPickup, onLeaveCombat, onSyncedDataUpdated, playBlockFallSound, playHurtSound, push, pushEntities, randomTeleport, recreateFromPacket, releaseUsingItem, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeEffectsCuredBy, removeFrost, removeSoulSpeed, resetForwardDirectionOfRelativePortalPosition, sendEffectToPassengers, setAbsorptionAmount, setArrowCount, setDiscardFriction, setHealth, setItemInHand, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setRecordPlayingNearby, setSleepingPos, setSpeed, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDiscardFriction, shouldDropExperience, shouldDropLoot, shouldRiderFaceForward, skipDropExperience, spawnSoulSpeedParticle, startSleeping, startUsingItem, stopRiding, stopUsingItem, swing, swing, take, tickDeath, tickEffects, tickHeadTurn, tickRidden, triggerItemUseEffects, tryAddFrost, tryAddSoulSpeed, updateEffectVisibility, updateInvisibilityStatus, updateSwingTime, updateUsingItem, updateWalkAnimation, verifyEquippedItem, wasExperienceConsumed, wouldNotSuffocateAtTargetPoseMethods inherited from class net.minecraft.world.entity.EntityabsMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canCollideWith, canControlVehicle, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkBelowWorld, checkDespawn, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, fixupDimensions, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAllSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCapability, getCapability, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getControllingPassenger, getCustomName, getDeltaMovement, getDirection, getDismountLocationForPassenger, getEncodeId, getEntityData, getExitPortal, 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, getPassengerAttachmentPoint, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, 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, isInLiquid, 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, lerpPositionAndRotationStep, level, limitPistonMovement, load, makeBoundingBox, markHurt, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, onSyncedDataUpdated, pick, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, processPortalCooldown, push, reapplyPosition, refreshDimensions, removeAfterChangingDimensions, removePassenger, removeTag, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setData, 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, startRiding, startSeenByPlayer, stopSeenByPlayer, syncPacketPositionCodec, teleportRelative, teleportTo, teleportTo, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, waterSwimSoundMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolderareAttachmentsCompatible, deserializeAttachments, getData, hasAttachments, hasData, removeData, serializeAttachmentsMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.commands.CommandSourcealwaysAcceptsMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHoldergetData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtensioncanBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, deserializeNBT, getClassification, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getParts, getPersistentData, getPickedResult, getSoundFromFluidType, getStepHeight, hasCustomOutlineRendering, isAddedToWorld, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, onAddedToWorld, onRemovedFromWorld, revive, sendPairingData, serializeNBT, shouldRiderSitMethods inherited from interface net.neoforged.neoforge.common.extensions.ILivingEntityExtensioncanDrownInFluidType, canSwimInFluidType, jumpInFluid, moveInFluid, self, sinkInFluidMethods inherited from interface net.neoforged.neoforge.common.extensions.IPlayerExtensioncanReach, canReach, canReach, getBlockReach, getEntityReach, isCloseEnough, openMenu, openMenuMethods inherited from interface net.minecraft.world.scores.ScoreHoldergetFeedbackDisplayName
- 
Field Details- 
PERSISTED_NBT_TAG- See Also:
 
- 
LOGGERprivate static final org.slf4j.Logger LOGGER
- 
MAX_NAME_LENGTHpublic static final int MAX_NAME_LENGTH- See Also:
 
- 
DEFAULT_MAIN_HAND
- 
DEFAULT_MODEL_CUSTOMIZATIONpublic static final int DEFAULT_MODEL_CUSTOMIZATION- See Also:
 
- 
MAX_HEALTHpublic static final int MAX_HEALTH- See Also:
 
- 
SLEEP_DURATIONpublic static final int SLEEP_DURATION- See Also:
 
- 
WAKE_UP_DURATIONpublic static final int WAKE_UP_DURATION- See Also:
 
- 
ENDER_SLOT_OFFSETpublic static final int ENDER_SLOT_OFFSET- See Also:
 
- 
CROUCH_BB_HEIGHTpublic static final float CROUCH_BB_HEIGHT- See Also:
 
- 
SWIMMING_BB_WIDTHpublic static final float SWIMMING_BB_WIDTH- See Also:
 
- 
SWIMMING_BB_HEIGHTpublic static final float SWIMMING_BB_HEIGHT- See Also:
 
- 
DEFAULT_EYE_HEIGHTpublic static final float DEFAULT_EYE_HEIGHT- See Also:
 
- 
STANDING_DIMENSIONS
- 
POSES
- 
DATA_PLAYER_ABSORPTION_ID
- 
DATA_SCORE_ID
- 
DATA_PLAYER_MODE_CUSTOMISATION
- 
DATA_PLAYER_MAIN_HAND
- 
DATA_SHOULDER_LEFT
- 
DATA_SHOULDER_RIGHT
- 
timeEntitySatOnShoulderprivate long timeEntitySatOnShoulder
- 
inventory
- 
enderChestInventory
- 
inventoryMenu
- 
containerMenu
- 
foodData
- 
jumpTriggerTimeprotected int jumpTriggerTime
- 
oBobpublic float oBob
- 
bobpublic float bob
- 
takeXpDelaypublic int takeXpDelay
- 
xCloakOpublic double xCloakO
- 
yCloakOpublic double yCloakO
- 
zCloakOpublic double zCloakO
- 
xCloakpublic double xCloak
- 
yCloakpublic double yCloak
- 
zCloakpublic double zCloak
- 
sleepCounterprivate int sleepCounter
- 
wasUnderwaterprotected boolean wasUnderwater
- 
abilities
- 
experienceLevelpublic int experienceLevel
- 
totalExperiencepublic int totalExperience
- 
experienceProgresspublic float experienceProgress
- 
enchantmentSeedprotected int enchantmentSeed
- 
defaultFlySpeedprotected final float defaultFlySpeed- See Also:
 
- 
lastLevelUpTimeprivate int lastLevelUpTime
- 
gameProfileprivate final com.mojang.authlib.GameProfile gameProfile
- 
reducedDebugInfoprivate boolean reducedDebugInfo
- 
lastItemInMainHand
- 
cooldowns
- 
lastDeathLocation
- 
fishing
- 
hurtDirprotected float hurtDir
- 
prefixes
- 
suffixes
- 
forcedPose
- 
displayname
 
- 
- 
Constructor Details- 
Player
 
- 
- 
Method Details- 
blockActionRestricted
- 
createAttributes
- 
defineSynchedDataprotected void defineSynchedData()- Overrides:
- defineSynchedDatain class- LivingEntity
 
- 
tickpublic void tick()- Overrides:
- tickin class- LivingEntity
 
- 
getMaxHeadRotationRelativeToBodyprotected float getMaxHeadRotationRelativeToBody()- Overrides:
- getMaxHeadRotationRelativeToBodyin class- LivingEntity
 
- 
isSecondaryUseActivepublic boolean isSecondaryUseActive()
- 
wantsToStopRidingprotected boolean wantsToStopRiding()
- 
isStayingOnGroundSurfaceprotected boolean isStayingOnGroundSurface()
- 
updateIsUnderwaterprotected boolean updateIsUnderwater()
- 
turtleHelmetTickprivate void turtleHelmetTick()
- 
createItemCooldowns
- 
moveCloakprivate void moveCloak()
- 
updatePlayerPoseprotected void updatePlayerPose()
- 
canPlayerFitWithinBlocksAndEntitiesWhen
- 
getPortalWaitTimepublic int getPortalWaitTime()- Overrides:
- getPortalWaitTimein class- Entity
 
- 
getSwimSound- Overrides:
- getSwimSoundin class- Entity
 
- 
getSwimSplashSound- Overrides:
- getSwimSplashSoundin class- Entity
 
- 
getSwimHighSpeedSplashSound- Overrides:
- getSwimHighSpeedSplashSoundin class- Entity
 
- 
getDimensionChangingDelaypublic int getDimensionChangingDelay()- Overrides:
- getDimensionChangingDelayin class- Entity
 
- 
playSound
- 
playNotifySoundpublic void playNotifySound(SoundEvent p_36140_, SoundSource p_36141_, float p_36142_, float p_36143_) 
- 
getSoundSource- Overrides:
- getSoundSourcein class- Entity
 
- 
getFireImmuneTicksprotected int getFireImmuneTicks()- Overrides:
- getFireImmuneTicksin class- Entity
 
- 
handleEntityEventpublic void handleEntityEvent(byte p_36120_) - Overrides:
- handleEntityEventin class- LivingEntity
 
- 
addParticlesAroundSelf
- 
closeContainerpublic void closeContainer()
- 
doCloseContainerprotected void doCloseContainer()
- 
rideTickpublic void rideTick()- Overrides:
- rideTickin class- LivingEntity
 
- 
serverAiStepprotected void serverAiStep()- Overrides:
- serverAiStepin class- LivingEntity
 
- 
aiSteppublic void aiStep()- Overrides:
- aiStepin class- LivingEntity
 
- 
playShoulderEntityAmbientSound
- 
touch
- 
getScorepublic int getScore()
- 
setScorepublic void setScore(int p_36398_) 
- 
increaseScorepublic void increaseScore(int p_36402_) 
- 
startAutoSpinAttackpublic void startAutoSpinAttack(int p_204080_) 
- 
die- Overrides:
- diein class- LivingEntity
 
- 
dropEquipmentprotected void dropEquipment()- Overrides:
- dropEquipmentin class- LivingEntity
 
- 
destroyVanishingCursedItemsprotected void destroyVanishingCursedItems()
- 
getHurtSound- Overrides:
- getHurtSoundin class- LivingEntity
 
- 
getDeathSound- Overrides:
- getDeathSoundin class- LivingEntity
 
- 
drop
- 
drop
- 
getDestroySpeedDeprecated.
- 
getDigSpeed
- 
hasCorrectToolForDrops
- 
readAdditionalSaveData- Overrides:
- readAdditionalSaveDatain class- LivingEntity
 
- 
addAdditionalSaveData- Overrides:
- addAdditionalSaveDatain class- LivingEntity
 
- 
isInvulnerableTo- Overrides:
- isInvulnerableToin class- Entity
 
- 
hurt- Overrides:
- hurtin class- LivingEntity
 
- 
blockUsingShield- Overrides:
- blockUsingShieldin class- LivingEntity
 
- 
canBeSeenAsEnemypublic boolean canBeSeenAsEnemy()- Overrides:
- canBeSeenAsEnemyin class- LivingEntity
 
- 
canHarmPlayer
- 
hurtArmor- Overrides:
- hurtArmorin class- LivingEntity
 
- 
hurtHelmet- Overrides:
- hurtHelmetin class- LivingEntity
 
- 
hurtCurrentlyUsedShieldprotected void hurtCurrentlyUsedShield(float p_36383_) - Overrides:
- hurtCurrentlyUsedShieldin class- LivingEntity
 
- 
actuallyHurt- Overrides:
- actuallyHurtin class- LivingEntity
 
- 
onSoulSpeedBlockprotected boolean onSoulSpeedBlock()- Overrides:
- onSoulSpeedBlockin class- LivingEntity
 
- 
isTextFilteringEnabledpublic boolean isTextFilteringEnabled()
- 
openTextEdit
- 
openMinecartCommandBlock
- 
openCommandBlock
- 
openStructureBlock
- 
openJigsawBlock
- 
openHorseInventory
- 
openMenu
- 
sendMerchantOfferspublic void sendMerchantOffers(int p_36121_, MerchantOffers p_36122_, int p_36123_, int p_36124_, boolean p_36125_, boolean p_36126_) 
- 
openItemGui
- 
interactOn
- 
ridingOffset- Overrides:
- ridingOffsetin class- Entity
 
- 
removeVehiclepublic void removeVehicle()- Overrides:
- removeVehiclein class- Entity
 
- 
isImmobileprotected boolean isImmobile()- Overrides:
- isImmobilein class- LivingEntity
 
- 
isAffectedByFluidspublic boolean isAffectedByFluids()- Overrides:
- isAffectedByFluidsin class- LivingEntity
 
- 
maybeBackOffFromEdge- Overrides:
- maybeBackOffFromEdgein class- Entity
 
- 
isAboveGroundprivate boolean isAboveGround()
- 
attack
- 
doAutoAttackOnTouch- Overrides:
- doAutoAttackOnTouchin class- LivingEntity
 
- 
disableShieldpublic void disableShield(boolean p_36385_) 
- 
crit
- 
magicCrit
- 
sweepAttackpublic void sweepAttack()
- 
respawnpublic void respawn()
- 
remove- Overrides:
- removein class- LivingEntity
 
- 
isLocalPlayerpublic boolean isLocalPlayer()
- 
getGameProfilepublic com.mojang.authlib.GameProfile getGameProfile()
- 
getInventory
- 
getAbilities
- 
updateTutorialInventoryActionpublic void updateTutorialInventoryAction(ItemStack p_150098_, ItemStack p_150099_, ClickAction p_150100_) 
- 
hasContainerOpenpublic boolean hasContainerOpen()
- 
startSleepInBedpublic com.mojang.datafixers.util.Either<Player.BedSleepingProblem,Unit> startSleepInBed(BlockPos p_36203_) 
- 
stopSleepInBedpublic void stopSleepInBed(boolean p_36226_, boolean p_36227_) 
- 
stopSleepingpublic void stopSleeping()- Overrides:
- stopSleepingin class- LivingEntity
 
- 
findRespawnPositionAndUseSpawnBlockpublic static Optional<Vec3> findRespawnPositionAndUseSpawnBlock(ServerLevel p_36131_, BlockPos p_36132_, float p_36133_, boolean p_36134_, boolean p_36135_) 
- 
isSleepingLongEnoughpublic boolean isSleepingLongEnough()
- 
getSleepTimerpublic int getSleepTimer()
- 
displayClientMessage
- 
awardStat
- 
awardStat
- 
awardStat
- 
awardStat
- 
resetStat
- 
awardRecipes
- 
triggerRecipeCrafted
- 
awardRecipesByKey
- 
resetRecipes
- 
jumpFromGroundpublic void jumpFromGround()- Overrides:
- jumpFromGroundin class- LivingEntity
 
- 
travel- Overrides:
- travelin class- LivingEntity
 
- 
updateSwimmingpublic void updateSwimming()- Overrides:
- updateSwimmingin class- Entity
 
- 
freeAt
- 
getSpeedpublic float getSpeed()- Overrides:
- getSpeedin class- LivingEntity
 
- 
causeFallDamage- Overrides:
- causeFallDamagein class- LivingEntity
 
- 
tryToStartFallFlyingpublic boolean tryToStartFallFlying()
- 
startFallFlyingpublic void startFallFlying()
- 
stopFallFlyingpublic void stopFallFlying()
- 
doWaterSplashEffectprotected void doWaterSplashEffect()- Overrides:
- doWaterSplashEffectin class- Entity
 
- 
playStepSound- Overrides:
- playStepSoundin class- Entity
 
- 
getFallSounds- Overrides:
- getFallSoundsin class- LivingEntity
 
- 
killedEntity- Overrides:
- killedEntityin class- Entity
 
- 
makeStuckInBlock- Overrides:
- makeStuckInBlockin class- Entity
 
- 
giveExperiencePointspublic void giveExperiencePoints(int p_36291_) 
- 
getEnchantmentSeedpublic int getEnchantmentSeed()
- 
onEnchantmentPerformed
- 
giveExperienceLevelspublic void giveExperienceLevels(int p_36276_) 
- 
getXpNeededForNextLevelpublic int getXpNeededForNextLevel()
- 
causeFoodExhaustionpublic void causeFoodExhaustion(float p_36400_) 
- 
getWardenSpawnTracker
- 
getFoodData
- 
canEatpublic boolean canEat(boolean p_36392_) 
- 
isHurtpublic boolean isHurt()
- 
mayBuildpublic boolean mayBuild()
- 
mayUseItemAt
- 
getExperienceRewardpublic int getExperienceReward()- Overrides:
- getExperienceRewardin class- LivingEntity
 
- 
isAlwaysExperienceDropperprotected boolean isAlwaysExperienceDropper()- Overrides:
- isAlwaysExperienceDropperin class- LivingEntity
 
- 
shouldShowNamepublic boolean shouldShowName()- Overrides:
- shouldShowNamein class- LivingEntity
 
- 
getMovementEmission- Overrides:
- getMovementEmissionin class- Entity
 
- 
onUpdateAbilitiespublic void onUpdateAbilities()
- 
getName
- 
getEnderChestInventory
- 
getItemBySlot- Specified by:
- getItemBySlotin class- LivingEntity
 
- 
doesEmitEquipEvent- Overrides:
- doesEmitEquipEventin class- LivingEntity
 
- 
setItemSlot- Specified by:
- setItemSlotin class- LivingEntity
 
- 
addItem
- 
getHandSlots- Overrides:
- getHandSlotsin class- Entity
 
- 
getArmorSlots- Specified by:
- getArmorSlotsin class- LivingEntity
 
- 
setEntityOnShoulder
- 
removeEntitiesOnShoulderprotected void removeEntitiesOnShoulder()
- 
respawnEntityOnShoulder
- 
isSpectatorpublic abstract boolean isSpectator()- Overrides:
- isSpectatorin class- Entity
 
- 
canBeHitByProjectilepublic boolean canBeHitByProjectile()- Overrides:
- canBeHitByProjectilein class- Entity
 
- 
isSwimmingpublic boolean isSwimming()- Overrides:
- isSwimmingin class- Entity
 
- 
isCreativepublic abstract boolean isCreative()
- 
isPushedByFluidpublic boolean isPushedByFluid()- Overrides:
- isPushedByFluidin class- Entity
 
- 
getScoreboard
- 
getDisplayName- Specified by:
- getDisplayNamein interface- Nameable
- Specified by:
- getDisplayNamein interface- ScoreHolder
- Overrides:
- getDisplayNamein class- Entity
 
- 
decorateDisplayNameComponent
- 
getScoreboardName- Specified by:
- getScoreboardNamein interface- ScoreHolder
- Overrides:
- getScoreboardNamein class- Entity
 
- 
getStandingEyeHeight- Overrides:
- getStandingEyeHeightin class- LivingEntity
 
- 
internalSetAbsorptionAmountprotected void internalSetAbsorptionAmount(float p_296426_) - Overrides:
- internalSetAbsorptionAmountin class- LivingEntity
 
- 
getAbsorptionAmountpublic float getAbsorptionAmount()- Overrides:
- getAbsorptionAmountin class- LivingEntity
 
- 
isModelPartShown
- 
getSlot- Overrides:
- getSlotin class- LivingEntity
 
- 
isReducedDebugInfopublic boolean isReducedDebugInfo()
- 
setReducedDebugInfopublic void setReducedDebugInfo(boolean p_36394_) 
- 
setRemainingFireTickspublic void setRemainingFireTicks(int p_36353_) - Overrides:
- setRemainingFireTicksin class- Entity
 
- 
getMainArm- Specified by:
- getMainArmin class- LivingEntity
 
- 
setMainArm
- 
getShoulderEntityLeft
- 
setShoulderEntityLeft
- 
getShoulderEntityRight
- 
setShoulderEntityRight
- 
getCurrentItemAttackStrengthDelaypublic float getCurrentItemAttackStrengthDelay()
- 
getAttackStrengthScalepublic float getAttackStrengthScale(float p_36404_) 
- 
resetAttackStrengthTickerpublic void resetAttackStrengthTicker()
- 
getCooldowns
- 
getBlockSpeedFactorprotected float getBlockSpeedFactor()- Overrides:
- getBlockSpeedFactorin class- LivingEntity
 
- 
getLuckpublic float getLuck()
- 
canUseGameMasterBlockspublic boolean canUseGameMasterBlocks()
- 
canTakeItem- Overrides:
- canTakeItemin class- LivingEntity
 
- 
getDimensions- Overrides:
- getDimensionsin class- LivingEntity
 
- 
getDismountPoses- Overrides:
- getDismountPosesin class- LivingEntity
 
- 
getProjectile- Overrides:
- getProjectilein class- LivingEntity
 
- 
eat- Overrides:
- eatin class- LivingEntity
 
- 
shouldRemoveSoulSpeed- Overrides:
- shouldRemoveSoulSpeedin class- LivingEntity
 
- 
getRopeHoldPosition- Overrides:
- getRopeHoldPositionin class- Entity
 
- 
isAlwaysTickingpublic boolean isAlwaysTicking()- Specified by:
- isAlwaysTickingin interface- EntityAccess
- Overrides:
- isAlwaysTickingin class- Entity
 
- 
isScopingpublic boolean isScoping()
- 
shouldBeSavedpublic boolean shouldBeSaved()- Specified by:
- shouldBeSavedin interface- EntityAccess
- Overrides:
- shouldBeSavedin class- Entity
 
- 
getLastDeathLocation
- 
setLastDeathLocation
- 
getHurtDirpublic float getHurtDir()- Overrides:
- getHurtDirin class- LivingEntity
 
- 
animateHurtpublic void animateHurt(float p_265280_) - Overrides:
- animateHurtin class- LivingEntity
 
- 
canSprintpublic boolean canSprint()
- 
getFlyingSpeedprotected float getFlyingSpeed()- Overrides:
- getFlyingSpeedin class- LivingEntity
 
- 
isValidUsername
- 
getPickRangepublic static float getPickRange(boolean p_305924_) 
- 
getPrefixes
- 
getSuffixes
- 
refreshDisplayNamepublic void refreshDisplayName()Force the displayed name to refresh, by firingPlayerEvent.NameFormat, using the real player name as event parameter.
- 
setForcedPoseForce a pose for the player. If set, the vanilla pose determination and clearance check is skipped. Make sure the pose is clear yourself (e.g. in PlayerTick). This has to be set just once, do not set it every tick. Make sure to clear (null) the pose if not required anymore and only use if necessary.
- 
getForcedPose- Returns:
- The forced pose if set, null otherwise
 
 
-