minecraft.wiki-mirror/wiki_backup/Player.dat format#Written Books.txt

58 lines
3 KiB
Text

{{lowercase title}}
{{redirect|player.dat|the file that stores player data in Pocket Edition v0.1.0 alpha|Bedrock Edition level format/v0.1.0 alpha#player.dat}}
{{exclusive|java}}
'''<player>.dat''' files are used by [[server]]s to store the state of individual players. The format is also used within [[Java Edition level format#level.dat format|level.dat]] files to store the state of the [[singleplayer]] player, which overrides any <player>.dat files with the same name as the singleplayer player. These files are in [[NBT format]].
== NBT structure ==
{{:Player/ED}}
== Item structure ==
{{Main|Data component format}}
Items are used both in the player's inventory and ender chest.
== Inventory slot numbers ==
In Minecraft Java version 1.20.1 equip slots have these numbers - Offhand 40, Head 39, Chest 38, Legs 37, Boots 36.
[[File:Items slot number.png|alt=This shows the numbers used to specify the slot in the inventory while editing with an NBT editor.]]
== History ==
{{Missing|section|history prior to 1.19|type=old}}
{{HistoryTable
|{{HistoryLine|java}}
|{{HistoryLine||1.7.10|Player data files are now named by UUID instead of by Username.{{check version|The 1.7.10 article does not mention this. Also, if 1.7.10, which pre-release?}}}}
|{{HistoryLine||1.8|dev=14w33a|Added <code>SelectedItem</code> for all items.}}
|{{HistoryLine||1.12|dev=17w13a|Added {{cd|d=and|ShoulderEntityLeft|ShoulderEntityRight}}, which contain entity data about the entity on the player's shoulders.
|Added {{cd|seenCredits}} to indicate whether the player has entered the exit portal at least once.
|Added {{cd|recipeBook}}, which contain various information about the recipes the player has unlocked.}}
|{{HistoryLine|||dev=pre1|Added <code>enteredNetherPosition</code> to players, for use with the <code>[[Advancements#minecraft:nether_travel|minecraft:nether_travel]]</code> advancement trigger.}}
|{{HistoryLine||1.16|dev=Pre-release 6|Added {{cd|previousPlayerGameType}} to store the previous game mode of the player.}}
|{{HistoryLine||1.19|dev=22w14a|Added {{cd|LastDeathLocation}}, together with the [[recovery compass]].}}
|{{HistoryLine||1.21|dev=Pre-release 4|Added {{cd|current_explosion_impact_pos}} and {{cd|ignore_fall_damage_from_current_explosion}} to store the [[wind charge]]'s fall damage reduction.}}
}}
== Trivia ==
* Pre-1.7.10 player data files were named as the player's username rather than their UUID, this meant if the server was running on Windows and the player had a reserved filename as a player name they would not have their player data saved. List of Reserved Windows Filenames:
** <code>AUX</code>
** <code>COM<n></code> where n is a digit from 1-9 (inclusive)
** <code>CON</code>
** <code>LPT<n></code> where n is a digit from 1-9 (inclusive)
** <code>NUL</code>
** <code>PRN</code>
== Navigation ==
{{Navbox Java Edition technical|general}}
[[Category:Development]]
[[de:Spielerdaten]]
[[fr:Format player.dat]]
[[ja:Player.datフォーマット]]
[[nl:Player.dat formaat]]
[[pt:Formato Player.dat]]
[[ru:Player.dat]]
[[zh:玩家数据格式]]