| Server data reports | `java -DbundlerMainClass=net.minecraft.data.Main -jar server.jar --reports` | **Yes** |
**Important since MC 1.21.9**: Some items and blocks are registered outside `Items.java`/`Blocks.java` field declarations (via block registration callbacks). In these cases, the decompiled source undercounts entries. **Always use server data reports** for item and block palettes when available.
## 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.
The `--registry` flag enables cross-validation: compares the count and set of entries found in decompiled Java source against the server's authoritative registry. Any mismatches indicate that palette generation must use server data instead of Java source.
Validates each item name against `ItemType.cs` and warns about missing enum values. Add missing values to `ItemType.cs` in alphabetical order before compiling.
Generates a complete block palette with block state ID ranges from the server's `blocks.json`. Validates against `Material.cs` and warns about missing enum values.
Reads `EntityDataSerializers.java` static block registration order. 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:
1. The script's `FIELD_TO_ENUM` dict
2. MCC's `EntityMetaDataType.cs` enum
3.`DataTypes.cs` ReadNextMetadata() read logic
## Recommended workflow
1. Generate server reports (Step 0)
2. Run `diff_registries.py --registry` to identify changes and validate source completeness
3. For each registry needing update:
- Items: `gen_item_palette.py --from-registry`
- Blocks: `gen_block_palette.py`
- Entities: `gen_entity_palette.py`
- Metadata: `gen_entity_metadata_palette.py`
4. Add any missing enum values to `ItemType.cs`, `Material.cs`, `EntityType.cs`, `EntityMetaDataType.cs`