Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 4, 2025

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_STRING constant and it must now be replaced with the dynamic method SharedConstants.getCurrentVersion().name().

Before (1.21.8 and earlier):

MinecraftDataGenerator.start(
    SharedConstants.VERSION_STRING,
    DGU.getCurrentlyRunningServer().getServerDirectory()
);

After (1.21.9):

MinecraftDataGenerator.start(
    SharedConstants.getCurrentVersion().name(),
    DGU.getCurrentlyRunningServer().getServerDirectory()
);

Files Modified

  • mc/1.21.9/src/main/java/dev/u9g/minecraftdatagenerator/mixin/ReadyMixin.java - Updated version string retrieval
  • mc/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

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 in generator code


💡 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.

@Copilot 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
@Copilot Copilot AI requested a review from extremeheat October 4, 2025 12:57
Copilot finished work on behalf of extremeheat October 4, 2025 12:57
@extremeheat extremeheat marked this pull request as ready for review October 4, 2025 13:24
@extremeheat extremeheat merged commit 18b208e into bump Oct 4, 2025
85 checks passed
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants