Minecraft:Bedrock Edition level format/v0.1.0 alpha: Difference between revisions
From SAS Gaming Wiki
More actions
Fix template calls: add MC/ prefix |
Sync: updated from Minecraft |
||
| Line 1: | Line 1: | ||
This is the specification for the [[Minecraft:Bedrock Edition level format|level format]] in [[Minecraft:Pocket Edition v0.1.0 alpha]] up to Pocket Edition v0.2.0 alpha where the format was changed to NBT instead of raw binary. | This is the specification for the [[Minecraft:Bedrock Edition level format|level format]] in [[Minecraft:Pocket Edition v0.1.0 alpha]] up to [[Minecraft:Pocket Edition v0.2.0 alpha]] where the format was changed to [[Minecraft:NBT format|NBT]] instead of raw binary. | ||
==level.dat== | ==level.dat== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
| Line 28: | Line 28: | ||
| Estimated world size | | Estimated world size | ||
| 8 | | 8 | ||
| A big-endian 64 bit integer representing the world size in bits{{ | | A big-endian 64 bit integer representing the world size in bits{{verify}} | ||
|- | |- | ||
| Last Played | | Last Played | ||
| 4 | | 4 | ||
| A big-endian 32 bit unix timestamp indicating when the level was last saved, will overflow and become negative at '''03:14:08 UTC on 19 January 2038''' due to the year 2038 problem and will overflow every ~136 years after that. | | A big-endian 32 bit unix timestamp indicating when the level was last saved, will overflow and become negative at '''03:14:08 UTC on 19 January 2038''' due to [[Minecraft:wikipedia:Year 2038 problem|the year 2038 problem]] and will overflow every ~136 years after that. | ||
|- | |- | ||
| Length of World Name in Bytes | | Length of World Name in Bytes | ||
| Line 40: | Line 40: | ||
| World Name | | World Name | ||
| Variable | | Variable | ||
| A CP437 encoded string<ref group="note">This is due to the font texture found in the assets folder of the apk, future versions may render non-ASCII characters differently</ref> | | A [[Minecraft:wikipedia:Code_page_437|CP437]] encoded string<ref group="note">This is due to the font texture found in the assets folder of the apk, future versions may render non-ASCII characters differently</ref> | ||
|} | |} | ||
| Line 85: | Line 85: | ||
| A little-endian 32 bit float representing the player's yaw in degrees | | A little-endian 32 bit float representing the player's yaw in degrees | ||
|- | |- | ||
| | | Fall Distance | ||
| 4 | | 4 | ||
| A little-endian 32 bit float | | A little-endian 32 bit float | ||
| Line 95: | Line 95: | ||
| Air | | Air | ||
| 2 | | 2 | ||
| A little-endian signed short representing how much air the player has, in ticks. Fills to a maximum of 300 in air. Decreases while underwater.{{ | | A little-endian signed short representing how much air the player has, in ticks. Fills to a maximum of 300 in air. Decreases while underwater.{{verify}} | ||
|- | |||
| On Ground{{verify}} | |||
| 1 | |||
| A byte, with 0 meaning the player is not on the ground and 1 meaning they are. | |||
|- | |- | ||
| Unknown | | Unknown | ||
| | | 3 | ||
| | | The first two bytes of this unknown data have actual data in them, so this is not unused. | ||
|- | |- | ||
| Hotbar | | Hotbar | ||
| 36 | | 36 | ||
| 9 slots that take up 4 bytes each, the first two bytes is the item ID<ref group="note">Every items from Pocket Edition [[Minecraft:Pocket Edition v0.1.0 alpha|0.1.0]] to 0.1.3 has an ID only takes up 1 byte with the exception of [[Minecraft:Camera]], which takes 2 bytes (c8 01).</ref>. The other two bytes have unknown use and are always 0x00. The last slot is always saved as 0xFF for every byte, it's known to be a hotbar slot as the <code>minecraftpe</code> library loops through 9 hotbar slots. | | 9 slots that take up 4 bytes each, the first two bytes is the item ID<ref group="note">Every items from Pocket Edition [[Minecraft:Pocket Edition v0.1.0 alpha|0.1.0]] to [[Minecraft:Pocket Edition v0.1.3 alpha|0.1.3]] has an ID only takes up 1 byte with the exception of [[Minecraft:Camera]], which takes 2 bytes (c8 01).</ref>. The other two bytes have unknown use and are always 0x00. The last slot is always saved as 0xFF for every byte, it's known to be a hotbar slot as the <code>minecraftpe</code> library loops through 9 hotbar slots. | ||
|} | |} | ||
== Notes == | == Notes == | ||
{{notelist}} | {{notelist}} | ||
[[Category:Development]] | [[Category:Development]] | ||
pt:Formato de nível da Edição Bedrock/v0.1.0 alpha | [[Minecraft:pt:Formato de nível da Edição Bedrock/v0.1.0 alpha]] | ||
Latest revision as of 11:03, 8 October 2026
This is the specification for the level format in Minecraft:Pocket Edition v0.1.0 alpha up to Minecraft:Pocket Edition v0.2.0 alpha where the format was changed to NBT instead of raw binary.
level.dat
| Data | Length (Bytes) | Description |
|---|---|---|
| Header | 8 | A little-endian 32 bit integer used to identify the version of the tool used to save the file, always 1 followed by a little-endian 32 bit integer that marks the size of the file subtract the header. |
| Seed | 4 | A big-endian 32 bit signed integer |
| Spawn X | 4 | A big-endian 32 bit signed integer |
| Spawn Y | 4 | A big-endian 32 bit signed integer |
| Spawn Z | 4 | A big-endian 32 bit signed integer |
| Estimated world size | 8 | A big-endian 64 bit integer representing the world size in bitsTemplate:Verify |
| Last Played | 4 | A big-endian 32 bit unix timestamp indicating when the level was last saved, will overflow and become negative at 03:14:08 UTC on 19 January 2038 due to the year 2038 problem and will overflow every ~136 years after that. |
| Length of World Name in Bytes | 2 | A big-endian unsigned 16 bit integer |
| World Name | Variable | A CP437 encoded string<ref group="note">This is due to the font texture found in the assets folder of the apk, future versions may render non-ASCII characters differently</ref> |
player.dat
| Data | Length (Bytes) | Description |
|---|---|---|
| Header | 8 | A little-endian 32 bit integer used to identify the version of the tool used to save the file, always 1 followed by a little-endian 32 bit integer that marks the size of the file subtract the header, always 80. |
| Pos X | 4 | A little-endian 32 bit float |
| Pos Y | 4 | A little-endian 32 bit float |
| Pos Z | 4 | A little-endian 32 bit float |
| Motion X | 4 | A little-endian 32 bit float |
| Motion Y | 4 | A little-endian 32 bit float |
| Motion Z | 4 | A little-endian 32 bit float |
| Pitch | 4 | A little-endian 32 bit float, an error in the code causes this value to be read incorrectly |
| Yaw | 4 | A little-endian 32 bit float representing the player's yaw in degrees |
| Fall Distance | 4 | A little-endian 32 bit float |
| Fire | 2 | A little-endian signed short representing the number of ticks until the fire is put out. Negative values reflect how long the player can stand in fire before burning. Default value: -20 |
| Air | 2 | A little-endian signed short representing how much air the player has, in ticks. Fills to a maximum of 300 in air. Decreases while underwater.Template:Verify |
| On GroundTemplate:Verify | 1 | A byte, with 0 meaning the player is not on the ground and 1 meaning they are. |
| Unknown | 3 | The first two bytes of this unknown data have actual data in them, so this is not unused. |
| Hotbar | 36 | 9 slots that take up 4 bytes each, the first two bytes is the item ID<ref group="note">Every items from Pocket Edition 0.1.0 to 0.1.3 has an ID only takes up 1 byte with the exception of Minecraft:Camera, which takes 2 bytes (c8 01).</ref>. The other two bytes have unknown use and are always 0x00. The last slot is always saved as 0xFF for every byte, it's known to be a hotbar slot as the minecraftpe library loops through 9 hotbar slots.
|
Notes
Template:Notelist Minecraft:pt:Formato de nível da Edição Bedrock/v0.1.0 alpha