1
0
mirror of https://github.com/pmmp/BedrockData.git synced 2024-07-02 18:44:06 -03:00
BedrockData/README.md

56 lines
3.3 KiB
Markdown
Raw Normal View History

2018-06-12 14:40:06 -03:00
# BedrockData
Blobs of data generated from Minecraft: Bedrock Edition used by PocketMine-MP
2019-04-25 14:06:31 -03:00
2021-02-01 16:24:05 -03:00
## canonical_block_states.nbt
2020-12-23 17:43:52 -03:00
This file contains an ordered list of `TAG_Compound`s (in varint NBT format) representing the pre-agreed blockstates in MCPE.
The runtime ID of a state is the offset in the list that the state appears.
The contents of this file are extracted from the vanilla BDS using [`pmmp/mapping`](https://github.com/pmmp/mapping).
2019-04-25 14:06:31 -03:00
2021-02-01 16:24:05 -03:00
## block_id_map.json
2019-04-25 14:06:31 -03:00
This file contains a mapping of all block stringy IDs to legacy numeric IDs (which are still used internally, and still needed by third party developers for conversion and for items).
#### Note
Where a block's legacy ID is > 255, its item ID is `255 - legacyBlockId`. This means prismarine stairs = -2 and so on.
2021-02-01 16:24:05 -03:00
## r12_to_current_block_map.bin
2019-12-06 08:54:48 -03:00
This file contains a list of mappings from legacy pre-1.13 blockstates to states of the current version.
This data is obtained by plugging the legacy states into `BlockPalette` in the vanilla BDS using [`pmmp/mapping`](https://github.com/pmmp/mapping), and writing the resulting NBT state obtained.
#### Schema
The following structure is repeated until EOF. There is **no** length prefix, so you have to read to EOF to read all the mappings.
| type | description |
|------|-------------|
| unsigned varint32 | r12 block string ID length |
| byte[] | r12 block string ID |
| little-endian int16 | r12 block metadata |
| TAG_Compound (varint format) | current version NBT blockstate corresponding to the given r12 block |
2021-11-09 21:54:34 -03:00
An example of how to read this file using the PocketMine-MP core library can be seen on the [stable branch](https://github.com/pmmp/PocketMine-MP/blob/41f7c07703bf3f7ef2d9504bbdbdf74257e75d12/src/pocketmine/network/mcpe/convert/RuntimeBlockMapping.php#L71-L86) or on the [master branch](https://github.com/pmmp/PocketMine-MP/blob/73592349cd29d91b03c2703107db859115a92e2d/src/network/mcpe/convert/RuntimeBlockMapping.php#L70-L80).
2019-12-06 08:54:48 -03:00
2021-02-01 16:24:05 -03:00
## r16_to_current_block_map.json
2020-12-23 17:43:52 -03:00
This file contains mappings to translate pre-1.16.100 item IDs into post-1.16.100 item IDs.
It contains two structures:
- `simple`: these are 1:1 replacement IDs (e.g. `carrotonastick` was renamed to `carrot_on_a_stick`)
- `complex`: these are items that were previously metadata values on other items (e.g. `dye:4` is now represented by `lapis_lazuli`).
2021-02-01 16:24:05 -03:00
## item_id_map.json
2019-04-25 14:06:31 -03:00
This file contains a mapping of all item stringy IDs to legacy numeric IDs.
2021-02-01 16:24:05 -03:00
## banner_patterns.json
2019-04-25 14:06:31 -03:00
This file defines all the known banner pattern types and their crafting requirements.
2021-02-01 16:24:05 -03:00
## recipes.json
2019-04-25 14:06:31 -03:00
This file defines all crafting-table, furnace and chemistry recipes. This includes recipes for the smoker, cartography table etc.
2021-02-01 16:24:05 -03:00
## creativeitems.json
2019-04-25 14:06:31 -03:00
This file contains an ordered list of items which appear in the vanilla creative inventory with Education Edition and Experimental Gameplay enabled.
2019-12-06 08:54:48 -03:00
2021-02-01 16:24:05 -03:00
## biome_definitions.nbt
2019-12-06 08:54:48 -03:00
This file contains a network-format NBT blob containing biome definitions obtained from `BiomeDefinitionListPacket`.
2021-07-23 17:10:08 -03:00
## biome_id_map.json
This file contains a mapping of Minecraft string biome IDs to their legacy integer ID counterparts. While biome IDs aren't dynamic yet, it's expected they will become dynamic in the future.
2021-02-01 16:24:05 -03:00
## entity_identifiers.nbt
2019-12-06 08:54:48 -03:00
This file contains a network-format NBT blob containing entity identifier mappings obtained from `AvailableActorIdentifiersPacket`.