Skip to content

Player Format

Byte Order

level.dat is stored in Little Endian byte order.

Parsing level.dat

Header

NameSize (in bytes)Description
Version4The version used to save the file. Always 1.
Size4The size of the file subtracting the header. Always 80.

Player Data

NameSize (in bytes)Description
Pos X4The X coordinate of the players position.
Pos Y4The Y coordinate of the players position.
Pos Z4The Z coordinate of the players position.
Motion X4The players motion in the X direction.
Motion Y4The players motion in the Y direction.
Motion Z4The players motion in the Z direction.
Pitch4The players looking pitch.
Yaw4The players looking yaw.
Unknown4Maybe an unused Roll value[needs testing]
Fire2The number of ticks until the fire is put out. Negative values reflect how long the player can stand in fire before burning. Default -20.
Air2How much air the player has, in ticks. Fills to a maximum of 300 in air. Decreases while underwater.
Unknown4

Hotbar

Loop the next section 9 times until you have parsed all slots of the hotbar.

NameSize (in bytes)Description
Item Id4The ID of the item.

The 9th slot is always 0xFFFFFFFF representing the open inventory button with the 3 dots (•••).

Depending on the device some slots may not be shown in game but all 9 slots are still saved to the file. For example if in game only shows 3 item slots they will be stored as the first 3 items in the hotbar.

Contributors

The avatar of contributor named as BJTMastermind BJTMastermind

Changelog

Contributors



Documentation page was setup by DexrnZacAttack.