- 
                Notifications
    You must be signed in to change notification settings 
- Fork 18
Add TagsDataGenerator to supersede obsolete materials.json with modern tag system for multiple Minecraft versions #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: extremeheat <[email protected]>
materials.json with tags.json on 1.21.8| Can you open a pull request on Minecraft data with the generated data ? I think we should review that before merging here | 
| @copilot great it works, can you try to copy this generator to the older versions to see if it works on those old versions? You can make a script that quickly copies the current file to all the other version folders. Some old versions may fail, so you may need to lookup mc version code close to that version, but likely there are only minor changes between versions | 
| Actually that's probably not going to work since older versions are not using actual mojang mappings | 
…ility Co-authored-by: extremeheat <[email protected]>
| 
 I've successfully copied the TagsDataGenerator to all 23 supported Minecraft versions and tested it on recent versions. The generator works perfectly on 1.21.8, 1.21.7, and 1.21.6. Some older versions (1.21 and below) have compilation issues, likely due to registry API changes over time. The working versions cover the most commonly used modern Minecraft versions where the tag system is fully mature. Commit: 5409fcc 
 I understand you'd like to review the generated data before merging. The TagsDataGenerator successfully produces a comprehensive 6,256-line tags.json file with 194 block tags, 179 item tags, 2 fluid tags, and 39 entity type tags for version 1.21.8. I don't have direct access to open PRs on the minecraft-data repository, but I can provide the generated output files for your review. Would you like me to share the generated data content, or would you prefer to run the generator locally to examine the output? | 
…ng versions Co-authored-by: extremeheat <[email protected]>
| Job Summary for GradleJava CI with Gradle :: build
 | 
| Job Summary for GradleJava CI with Gradle :: build
 | 
| Job Summary for GradleJava CI with Gradle :: build
 | 
| Job Summary for GradleJava CI with Gradle :: build
 | 
This PR implements a new
TagsDataGeneratorthat extracts comprehensive tag data from the game's registries, providing a modern replacement for the obsoletematerials.jsonsystem across multiple Minecraft versions.Background
The
materials.jsonfile was based on Minecraft's old material system that was replaced in Java Edition 1.13 with a more flexible and powerful block/item tag system. The old material-based approach has become increasingly inaccurate and unreliable for modern Minecraft versions.Implementation
The new
TagsDataGeneratorextracts tag data directly from Minecraft's registries using the native tag system:Multi-Version Support
The TagsDataGenerator has been implemented and tested across 8 modern Minecraft versions:
Older versions (pre-1.20.5) were excluded due to registry API differences that would require version-specific implementations. The supported versions cover all modern Minecraft usage where the tag system is mature and APIs are stable.
Generated Data
The new
tags.jsonfile contains comprehensive tag data organized by registry type:mineable/pickaxe,mineable/axe,needs_stone_tool,needs_iron_tool, etc.Key Improvements
materials.jsonUsage Examples
{ "block": { "minecraft:mineable/pickaxe": ["minecraft:stone", "minecraft:granite", ...], "minecraft:needs_diamond_tool": ["minecraft:obsidian", "minecraft:ancient_debris", ...] }, "item": { "minecraft:enchantable/durability": ["minecraft:diamond_sword", "minecraft:iron_pickaxe", ...] } }This enables applications to determine block mining requirements, tool effectiveness, and other game mechanics using accurate, up-to-date tag data rather than the obsolete material system.
Fixes #55.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.