Support Minecraft 1.21.9: Replace deprecated VERSION_STRING with getCurrentVersion().name()#59
Merged
extremeheat merged 2 commits intobumpfrom Oct 4, 2025
Conversation
…ersion().name() Co-authored-by: extremeheat <13713600+extremeheat@users.noreply.github.com>
Copilot
AI
changed the title
Please help support minecraft 1.21.9 here, a new update from 1.21.8. Auto opened PR:
@PrismarineJS/minecraft-data-generator/pull/58
You need to help update the bump branch to support 1.21.9, see the relevant mojang code for reference on what to change...
Support Minecraft 1.21.9: Replace deprecated VERSION_STRING with getCurrentVersion().name()
Oct 4, 2025
extremeheat
approved these changes
Oct 4, 2025
rom1504
pushed a commit
that referenced
this pull request
Oct 4, 2025
* Add version 1.21.9 * Support Minecraft 1.21.9: Replace deprecated VERSION_STRING with getCurrentVersion().name() (#59) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for Minecraft 1.21.9 by updating the data generator code to work with API changes introduced in this version.
Changes
API Update
In Minecraft 1.21.9, Mojang removed the deprecated
SharedConstants.VERSION_STRINGconstant and it must now be replaced with the dynamic methodSharedConstants.getCurrentVersion().name().Before (1.21.8 and earlier):
After (1.21.9):
Files Modified
mc/1.21.9/src/main/java/dev/u9g/minecraftdatagenerator/mixin/ReadyMixin.java- Updated version string retrievalmc/1.21.9/src/main/java/dev/u9g/minecraftdatagenerator/generators/EntitiesDataGenerator.java- Code formatting (spotless)mc/1.21.9/src/main/java/dev/u9g/minecraftdatagenerator/generators/RecipeDataGenerator.java- Import ordering (spotless)Testing
✅ Build passes:
./gradlew :mc:1.21.9:build✅ Data generation successful:
./gradlew :mc:1.21.9:runServer✅ All 16 expected data files generated correctly
✅ Server correctly identifies as Minecraft version 1.21.9
Generated data files include: blocks, items, entities, effects, enchantments, recipes, biomes, particles, sounds, materials, foods, instruments, language, tints, attributes, and blockCollisionShapes.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.