Player/ED

From Minecraft Wiki
Jump to: navigation, search
  • The root tag. In level.dat files, this tag is called "Player".
    • All tags from Entities except the id, CustomName, and CustomNameVisible tags.
    • All tags from Mobs except HandItems, ArmorItems, HandDropChances, ArmorDropChances, CanPickUpLoot, PersistenceRequired, and Leash.
    •  DataVersion: Version of the player NBT structure. Is increased with every new snapshot and release.
    •  playerGameType: The game mode of the player. 0 is Survival, 1 is Creative, 2 is Adventure and 3 is Spectator.
    •  previousPlayerGameType: The previous game mode of the player.
    •  Score: The Score displayed upon death.
    •  Dimension: A namespaced ID of the dimension the player is in. Used to store the players last known location along with Pos.
    •  SelectedItemSlot: The selected hotbar slot of the player.
    •  SelectedItem: Data of the item currently being held by the player, excluding the Slot tag.
    •  SpawnDimension: May not exist. The dimension of the player's bed or respawn anchor. These tags are only removed if the player attempts to respawn with no valid bed or respawn anchor to spawn at at these coordinates. They are unaffected by breaking a bed or respawn anchor at these coordinates, and are unaffected by the player's death.
    •  SpawnX: See below.
    •  SpawnY: May not exist. The coordinates of the player's bed or respawn anchor. These tags are only removed if the player attempts to respawn with no valid bed or respawn anchor to spawn at at these coordinates. They are unaffected by breaking a bed or respawn anchor at these coordinates, and are unaffected by the player's death.
    •  SpawnZ: See above.
    •  SpawnForced: 1 or 0 (true/false) - May not exist. True if the player should spawn at the above coordinates even if no bed can be found.
    •  SleepTimer: The number of ticks the player had been in bed. No effect.
    •  foodLevel: The value of the hunger bar; 20 is full. See Hunger.
    •  foodExhaustionLevel: See Hunger.
    •  foodSaturationLevel: See Hunger.
    •  foodTickTimer: See Hunger.
    •  XpLevel: The level shown on the XP bar.
    •  XpP: The progress/percent across the XP bar to the next level.
    •  XpTotal: The total amount of XP the player has collected over time; used for the Score upon death.
    •  XpSeed: The seed used for the next enchantment in enchantment tables.
    •  Inventory: Each compound tag in this list is an item in the player's inventory. (Note: when empty, list type may have unexpected value.)
    •  EnderItems: Each compound tag in this list is an item in the player's 27-slot ender chest inventory. (Note: when empty, list type may have unexpected value.)
      • An item in the inventory, includes the Slot tag - slots are numbered 0 to 26, inclusive.
    •  abilities: The abilities this player has.
      •  walkSpeed: The walking speed, always 0.1.
      •  flySpeed: The flying speed, always 0.05.
      •  mayfly: 1 or 0 (true/false) - true if the player can fly.
      •  flying: 1 or 0 (true/false) - true if the player is currently flying.
      •  invulnerable: 1 or 0 (true/false) - true if the player is immune to all damage and harmful effects except for void damage. (damage caused by the /kill command is void damage)
      •  mayBuild: 1 or 0 (true/false) - true if the player can place and destroy blocks.
      •  instabuild: 1 or 0 (true/false) - true if the player can instantly destroy blocks.
    •  enteredNetherPosition: Optional. The Overworld position from which the player entered the Nether, for use with the minecraft:nether_travel advancement trigger. The tag is set every time the player passes through a portal from the Overworld to the Nether. Passing through a portal back to the Overworld does not remove or update the tag. Entering the Nether without using a portal does not update the tag. If a portal is hacked into the End, using it to enter the Nether removes this tag.
      •  x: The X coordinate.
      •  y: The Y coordinate.
      •  z: The Z coordinate.
    •  RootVehicle: The root entity that the player is riding. Optional.
      •  Attach: The UUID of the entity the player is riding, stored as four ints.
      •  Entity: The NBT data of the root vehicle.
    •  ShoulderEntityLeft: The entity that is on the player's left shoulder. Always displays as a parrot.
    •  ShoulderEntityRight: The entity that is on the player's right shoulder. Always displays as a parrot.
    •  seenCredits: 1 or 0 (true/false) - true if the player has traveled to the Overworld via an End portal.
    •  recipeBook: Contains a JSON object detailing recipes the player has unlocked.