This document describes the process for updating BetterAltay to support a new Minecraft Bedrock release. Minecraft's network protocol changes frequently, so keeping the server compatible requires careful inspection and testing.
Start by reviewing the official protocol documentation and pick the branch for the target game version:
Because the official docs can sometimes be incomplete or contain mistakes, cross-check with additional sources:
Compare these repositories to determine which packets or fields were added, removed or modified.
Usually the file
BetterAltay/src/pocketmine/network/mcpe/protocol/ProtocolInfo.php
needs updating when the protocol changes.
- Bump the
CURRENT_PROTOCOLconstant to the new protocol version. - Update
MINECRAFT_VERSION_NETWORKto the correct game version string.
- New packet classes can be added under
src/pocketmine/network/mcpe/protocol/for packets introduced in the latest protocol. At a minimum, implement the new packets that are necessary for gameplay and client joinability. You are free to add others. - For modified packets, update
encodePayload()anddecodePayload()so the encoding/decoding matches the new spec. - Also update any other parts of the code that use these packets, to match the changes
- Adjust constants to fit the new version.
- Remove packets that no longer exist in the protocol to avoid confusion.
When Mojang introduces new content, several server-side data files must often be refreshed. The most important ones include:
-
runtime_item_states.json– Mainly contains item runtime IDs.Sources:
- Kaooot/bedrock-network-data – item_palette.json (renamed to
runtime_item_states.jsonand sorted by sort_item_palette.py) - CloudburstMC/Data or generated via ProxyPass – runtime_item_states.json (needs slight adjustments for BetterAltay)
- Kaooot/bedrock-network-data – item_palette.json (renamed to
-
canonical_block_states.nbt– Can be taken from pmmp/BedrockData or generated fromblock_palette.nbtfound in Kaooot/bedrock-network-data or CloudburstMC/Data, using this script. -
r12_to_current_block_map.bin– Available directly from pmmp/BedrockData. -
r16_to_current_item_map.json– Either updated manually or taken from pmmp/BedrockData. -
stripped_biome_definitions.json– Obtainable from CloudburstMC/Data or generated via ProxyPass. -
creative_items.json– Can be pulled from Kaooot/bedrock-network-data.
Test against the latest Bedrock client version:
- Start a BetterAltay server from your updated branch.
- Join with a stable client matching the target protocol.
- Test block breaking and whatever you need to playtest.
If the client disconnects or crashes, you will need to investigate packet mismatches or unexpected behavior to identify the issue.
- Expect surprises: Mojang sometimes changes the protocol without increasing the protocol version.
- While most updates are straightforward and can be handled using these instructions, some may require advanced protocol knowledge and the guide alone might not be sufficient.