Class Player

All Implemented Interfaces:
CommandSource, SyncedDataHolder, Attackable, EntityAccess, Nameable, ScoreHolder, IAttachmentHolder, 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
    • 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:
    • HELD_ITEM_SLOT

      public static final int HELD_ITEM_SLOT
      See Also:
    • CRAFTING_SLOT_OFFSET

      public static final int CRAFTING_SLOT_OFFSET
      See Also:
    • DEFAULT_BLOCK_INTERACTION_RANGE

      public static final float DEFAULT_BLOCK_INTERACTION_RANGE
      See Also:
    • DEFAULT_ENTITY_INTERACTION_RANGE

      public static final float DEFAULT_ENTITY_INTERACTION_RANGE
      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:
    • DEFAULT_VEHICLE_ATTACHMENT

      public static final Vec3 DEFAULT_VEHICLE_ATTACHMENT
    • STANDING_DIMENSIONS

      public static final EntityDimensions STANDING_DIMENSIONS
    • POSES

      private static final Map<Pose,EntityDimensions> POSES
    • 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

      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
    • currentImpulseImpactPos

      @Nullable public Vec3 currentImpulseImpactPos
    • currentExplosionCause

      @Nullable public Entity currentExplosionCause
    • ignoreFallDamageFromCurrentImpulse

      public boolean ignoreFallDamageFromCurrentImpulse
    • prefixes

      private final Collection<MutableComponent> prefixes
    • suffixes

      private final Collection<MutableComponent> suffixes
    • forcedPose

      @Nullable private Pose forcedPose
    • displayname

      private Component displayname
  • Constructor Details

    • Player

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