Full protocol adaptation for Minecraft 1.21.5: - Protocol version mapping: 770 -> 1.21.5 - Packet palette: AddExperienceOrb removed (S2C), TestInstanceBlockStatus added (S2C), SetTestBlock and TestInstanceBlockAction added (C2S) - Entity metadata palette: 5 new serializer types (OptionalLivingEntityReference, CowVariant, WolfSoundVariant, PigVariant, ChickenVariant), OPTIONAL_UUID replaced by OPTIONAL_LIVING_ENTITY_REFERENCE - Item palette: 11 new items (Bush, FireflyBush, DryShortGrass, DryTallGrass, Wildflowers, LeafLitter, CactusFlower, TestBlock, TestInstanceBlock, BlueEgg, BrownEgg) - Entity palette: Potion split into SplashPotion and LingeringPotion - Block palette: 9 new blocks (bush, cactus_flower, firefly_bush, leaf_litter, short_dry_grass, tall_dry_grass, test_block, test_instance_block, wildflowers) - Structured components: 31 new components including tooltip_display, weapon, blocks_attacks, potion_duration_scale, provides_trim_material, provides_banner_patterns, break_sound, and 25 entity variant components; unbreakable changed from Bool to Unit; instrument changed to EitherHolder Made-with: Cursor |
||
|---|---|---|
| .. | ||
| diff_registries.py | ||
| gen_entity_metadata_palette.py | ||
| gen_item_palette.py | ||
| README.md | ||
MCC Version Adaptation Tools
Scripts for analyzing Minecraft version differences and generating MCC palette files.
Requires: Python 3.10+, decompiled MC server source in MinecraftOfficial/<version>-decompiled/.
Decompiling a new MC version
cd MinecraftOfficial
java -jar MinecraftDecompiler.jar --version 1.21.4 --side SERVER \
--decompile --output 1.21.4-remapped.jar --decompiled-output 1.21.4-decompiled
diff_registries.py — Compare registries between versions
Compares Items, EntityTypes, Blocks, DataComponents, and EntityDataSerializers between two MC versions. Reports whether each palette needs updating, lists added/removed entries, and shows ID shift statistics.
python3 tools/diff_registries.py 1.20.6 1.21.1
Output indicates for each registry:
- IDENTICAL → reuse existing palette
- PALETTE UPDATE NEEDED → create new palette file + update version routing
gen_item_palette.py — Generate ItemPalette C# file
Reads Items.java field declaration order to generate a complete ItemPaletteXXX.cs.
python3 tools/gen_item_palette.py 1.21.1 121
# → MinecraftClient/Inventory/ItemPalettes/ItemPalette121.cs
Also validates each item name against ItemType.cs and warns about missing enum values.
gen_entity_metadata_palette.py — Generate EntityMetadataPalette C# file
Reads EntityDataSerializers.java static block registration order to generate EntityMetadataPaletteXXX.cs.
python3 tools/gen_entity_metadata_palette.py 1.20.6 1206
# → MinecraftClient/Mapping/EntityMetadataPalettes/EntityMetadataPalette1206.cs
The script maps Java field names to MCC's EntityMetaDataType enum. If a new serializer type appears that isn't in the mapping table, it will warn you to update both the script's FIELD_TO_ENUM dict and MCC's EntityMetaDataType.cs enum.