Updating to the Next Protocol Version¶
This guide outlines the general process for updating the Allay core to a new Minecraft Bedrock Edition protocol version. In practice, special cases may occur, so do not rely solely on this guide.
1. Update Endstone¶
Before updating Allay, you need to extract the latest data from BDS using Endstone DevTools. First, update Endstone to the latest version. Then, use it to export the following files:
block_palette.nbtblock_states.jsonblock_tags.jsonblock_types.jsoncreative_groups.jsoncreative_items.nbtitem_components.nbtitem_tags.jsonitems.jsonrecipes.json
2. Update Resource Files (data/resources)¶
Files obtained directly¶
| File | Source |
|---|---|
biome_definitions.json |
CloudburstMC/Data |
colormap/* |
Mojang/bedrock-samples |
Others (block_types.json, creative_items.nbt, etc.) |
Exported from Endstone |
Manually maintained files¶
| File | Notes |
|---|---|
block_tags_custom.json |
Update manually if IDs have changed |
item_tags_custom.json |
Same as above |
trim_data.json |
Rarely changes; can be updated using CloudburstMC/ProxyPass if needed |
3. Update Files in data/resources/unpacked¶
These are used in code generation and are not included in the final .jar:
| File | Source / Notes |
|---|---|
block_tags.json |
From Endstone |
block_states_raw.json |
Rename block_states.json from Endstone |
items_raw.json |
Rename items.json from Endstone |
block_palette.nbt |
From Endstone |
item_tags.json |
From Endstone |
block_property_types.json |
Generated by running BlockPropertyTypeDataFileGen |
biome_id_and_type.json |
Update manually (biomes rarely change) |
entity_id_map.json |
pmmp/BedrockData |
music_definitions.json |
Mojang/bedrock-samples |
sound_definitions.json |
Mojang/bedrock-samples |
4. Generate Derived Files¶
block_states.json¶
Generate using BlockStateDataProcessor, based on block_states_raw.json.
items.json¶
Generate using ItemDataProcessor, based on items_raw.json.
Language Files¶
- Copy original
.langfiles fromendstone/bedrock_server/resource_packs/vanilla/textstounpacked/lang_raw/vanilla. - Run
LangBuilderindata. - Then run
TrKeyGenincodegen.
5. Code Generation (codegen)¶
| Generator | When to Run |
|---|---|
SoundNameGen |
If music_definitions.json or sound_definitions.json changed |
CreativeItemGroupNameGen |
If creative_groups.json changed |
BiomeIdEnumGen |
If biome_id_and_type.json changed |
EntityIdEnumGen -> EntityClassGen |
If entity_id_map.json changed |
TagGen |
If item_tags.json, block_tags.json, or biome_definitions.json changed |
BlockIdEnumGen -> BlockPropertyTypeGen |
Always after block updates |
BlockClassGen |
Requires manual edits: – Delete old blocks – Update properties and logic – Check BlockTypeInitializer.java for errors– Add merged blocks in registerMergedBlocks() if needed |
ItemIdEnumGen -> ItemClassGen |
Similar to blocks: – Remove old items – Migrate logic if only names changed – Add merged items in registerMergedItems() if needed |
6. Update Dependencies and ProtocolInfo.java¶
Update to the latest versions of:
7. Update ProtocolInfo.java, NetworkData.java and MultiVersion.java¶
Update ProtocolInfo.java:
- ProtocolInfo.SUPPORTED_VERSIONS
- ProtocolInfo.FEATURE_VERSION
- ProtocolInfo.BLOCK_STATE_VERSION, ProtocolInfo.BLOCK_STATE_UPDATER, ProtocolInfo.ITEM_STATE_UPDATER
and ProtocolInfo.BLOCK_STATE_VERSION_NUM (if block state version changed)
Update NetworkData.java:
- NetworkData.encodeExperimentDataList()
Update MultiVersion.java
8. Test and Finalize¶
- Run
gradle testto ensure all tests pass. - Update the client and test connectivity with the server.
- Once verified, the update is considered complete.
Remember to record all changes in CHANGELOG.md.