Class Player

All Implemented Interfaces:
CommandSource, Attackable, EntityAccess, Nameable, ICapabilityProvider, ICapabilityProviderImpl<Entity>, ICapabilitySerializable<CompoundTag>, IEntityExtension, ILivingEntityExtension, IPlayerExtension, INBTSerializable<CompoundTag>
Direct Known Subclasses:
AbstractClientPlayer, ServerPlayer

public abstract class Player extends LivingEntity implements IPlayerExtension
  • Field Details

    • PERSISTED_NBT_TAG

      public static final String PERSISTED_NBT_TAG
      See Also:
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • MAX_NAME_LENGTH

      public static final int MAX_NAME_LENGTH
      See Also:
    • DEFAULT_MAIN_HAND

      public static final HumanoidArm DEFAULT_MAIN_HAND
    • DEFAULT_MODEL_CUSTOMIZATION

      public static final int DEFAULT_MODEL_CUSTOMIZATION
      See Also:
    • MAX_HEALTH

      public static final int MAX_HEALTH
      See Also:
    • SLEEP_DURATION

      public static final int SLEEP_DURATION
      See Also:
    • WAKE_UP_DURATION

      public static final int WAKE_UP_DURATION
      See Also:
    • ENDER_SLOT_OFFSET

      public static final int ENDER_SLOT_OFFSET
      See Also:
    • CROUCH_BB_HEIGHT

      public static final float CROUCH_BB_HEIGHT
      See Also:
    • SWIMMING_BB_WIDTH

      public static final float SWIMMING_BB_WIDTH
      See Also:
    • SWIMMING_BB_HEIGHT

      public static final float SWIMMING_BB_HEIGHT
      See Also:
    • DEFAULT_EYE_HEIGHT

      public static final float DEFAULT_EYE_HEIGHT
      See Also:
    • STANDING_DIMENSIONS

      public static final EntityDimensions STANDING_DIMENSIONS
    • POSES

      private static final Map<Pose,EntityDimensions> POSES
    • FLY_ACHIEVEMENT_SPEED

      private static final int FLY_ACHIEVEMENT_SPEED
      See Also:
    • DATA_PLAYER_ABSORPTION_ID

      private static final EntityDataAccessor<Float> DATA_PLAYER_ABSORPTION_ID
    • DATA_SCORE_ID

      private static final EntityDataAccessor<Integer> DATA_SCORE_ID
    • DATA_PLAYER_MODE_CUSTOMISATION

      protected static final EntityDataAccessor<Byte> DATA_PLAYER_MODE_CUSTOMISATION
    • DATA_PLAYER_MAIN_HAND

      protected static final EntityDataAccessor<Byte> DATA_PLAYER_MAIN_HAND
    • DATA_SHOULDER_LEFT

      protected static final EntityDataAccessor<CompoundTag> DATA_SHOULDER_LEFT
    • DATA_SHOULDER_RIGHT

      protected static final EntityDataAccessor<CompoundTag> DATA_SHOULDER_RIGHT
    • timeEntitySatOnShoulder

      private long timeEntitySatOnShoulder
    • inventory

      private final Inventory inventory
    • enderChestInventory

      protected PlayerEnderChestContainer enderChestInventory
    • inventoryMenu

      public final InventoryMenu inventoryMenu
    • containerMenu

      public AbstractContainerMenu containerMenu
    • foodData

      protected FoodData foodData
    • jumpTriggerTime

      protected int jumpTriggerTime
    • oBob

      public float oBob
    • bob

      public float bob
    • takeXpDelay

      public int takeXpDelay
    • xCloakO

      public double xCloakO
    • yCloakO

      public double yCloakO
    • zCloakO

      public double zCloakO
    • xCloak

      public double xCloak
    • yCloak

      public double yCloak
    • zCloak

      public double zCloak
    • sleepCounter

      private int sleepCounter
    • wasUnderwater

      protected boolean wasUnderwater
    • abilities

      private final Abilities abilities
    • experienceLevel

      public int experienceLevel
    • totalExperience

      public int totalExperience
    • experienceProgress

      public float experienceProgress
    • enchantmentSeed

      protected int enchantmentSeed
    • defaultFlySpeed

      protected final float defaultFlySpeed
      See Also:
    • lastLevelUpTime

      private int lastLevelUpTime
    • gameProfile

      private final com.mojang.authlib.GameProfile gameProfile
    • reducedDebugInfo

      private boolean reducedDebugInfo
    • lastItemInMainHand

      private ItemStack lastItemInMainHand
    • cooldowns

      private final ItemCooldowns cooldowns
    • lastDeathLocation

      private Optional<GlobalPos> lastDeathLocation
    • fishing

      @Nullable public FishingHook fishing
    • hurtDir

      protected float hurtDir
    • prefixes

      private final Collection<MutableComponent> prefixes
    • suffixes

      private final Collection<MutableComponent> suffixes
    • forcedPose

      @Nullable private Pose forcedPose
    • displayname

      private Component displayname
    • playerMainHandler

      private final LazyOptional<IItemHandler> playerMainHandler
    • playerEquipmentHandler

      private final LazyOptional<IItemHandler> playerEquipmentHandler
    • playerJoinedHandler

      private final LazyOptional<IItemHandler> playerJoinedHandler
  • Constructor Details

    • Player

      public Player(Level p_250508_, BlockPos p_250289_, float p_251702_, com.mojang.authlib.GameProfile p_252153_)
  • Method Details