-
-
Notifications
You must be signed in to change notification settings - Fork 20
feat: add support for Minecraft 1.21.11 #198
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
feat: add support for Minecraft 1.21.11 #198
Conversation
- Update Minecraft version to 1.21.11 in gradle.properties - Update dependencies: Fabric API 0.140.2, NeoForge 21.11.13-beta, Fabric Loader 0.18.4 - Update Architectury Loom to 1.13-SNAPSHOT (required for 1.21.11) - Bump mod version to 17.0.0 - Add changelog for 17.0.0 Minecraft 1.21.11 API changes (straightforward fixes): - Replace ResourceLocation with Identifier (class renamed in 1.21.11) - Update Util import from net.minecraft.Util to net.minecraft.util.Util - Replace Options.graphicsMode() with graphicsPreset() - Replace ResourceKey.location() with identifier() - Update access widener to use Identifier instead of ResourceLocation Remaining work: - DebugScreenEntryList API changes (toggleF3Visible, isF3Visible, setF3Visible) - Level.getMoonBrightness() replacement
Fix all remaining Minecraft 1.21.11 API changes to complete mod compatibility. DebugScreenEntryList method renames (9 files): - toggleF3Visible() → toggleDebugOverlay() - isF3Visible() → isOverlayVisible() - setF3Visible() → setOverlayVisible() Files updated: - common/ModConfigScreen.java - common/DebugMixin.java - common/KeyboardMixin.java - common/DebugOptionMixin.java - common/ScoreboardMixin.java - fabric/FabricDebugMixin.java - neoforge/NeoForgeDebugMixin.java Environment Attributes system (LocationModule.java): - Replaced Level.getMoonBrightness() with new Environment Attributes API - Added imports: EnvironmentAttributes, MoonPhase, DimensionType - Moon brightness now calculated via MoonPhase and MOON_BRIGHTNESS_PER_PHASE array Checkstyle compliance: - Fixed import ordering in DebugMixin.java, Utils.java, LocationModule.java - Made moonPhase variable final Build status: ✅ SUCCESS (all modules compile and pass checkstyle)
|
I tested this on my local setup and it didn't crash. I don't use all of the features though, and didn't test it extensively. I figured that since I got a working build, it might be helpful, even if you can't use it directly. |
|
Compiles for me. Tested and is working. |
|
There seems to be a bug where if you have your "Toggle Overlay" and "Debug Modifier Key" set to be the same thing (both F3, like it is by default) it holds down the debug modifier key. This makes it so if you press A it will reload chunks and not make you move to the left until you press F3 again. This should probably be fixed before it's pulled. This was tested on the fabric (Fabric 0.18.4) build on an empty instance besides Fabric API (0.140.2+1.21.11) (without it the text didn't render even though it's not listed as a dependency on modrinth. weird.) |
…tectury/1.21.11 # Conflicts: # common/src/main/java/me/cominixo/betterf3/mixin/KeyboardMixin.java # common/src/main/java/me/cominixo/betterf3/modules/LocationModule.java # docs/changelogs/17.0.0.md # gradle.properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates BetterF3 to support Minecraft version 1.21.11, adapting to significant API changes introduced in that version. The update includes dependency version bumps and fixes for breaking API changes, particularly around resource identifiers, utility class relocations, and a new Environment Attributes system that replaced the old moon brightness API.
Key changes:
- Migrated from deprecated
getMoonBrightness()to the newEnvironmentAttributes.MOON_PHASEsystem - Updated moon brightness calculation to use
DimensionType.MOON_BRIGHTNESS_PER_PHASE - Refactored local difficulty calculation logic to work outside the ServerLevel-specific context
- Bumped mod version from 16.0.3 to 17.0.0
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/changelogs/17.0.0.md | Changelog entry documenting 1.21.11 support |
| common/src/main/java/me/cominixo/betterf3/modules/LocationModule.java | Updated to use new Minecraft 1.21.11 APIs for moon phase and environment attributes; refactored local difficulty calculation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
common/src/main/java/me/cominixo/betterf3/modules/LocationModule.java
Outdated
Show resolved
Hide resolved
common/src/main/java/me/cominixo/betterf3/modules/LocationModule.java
Outdated
Show resolved
Hide resolved
I'm seeing this issue too. I'll need to look into it more before merging this PR. I also should have updated the Fabric API dependency since the 1.21.11 change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Changes
Version Updates
Minecraft 1.21.11 API Changes Fixed
Straightforward API Changes:
Complex API Changes:
Files Modified: 18 files across common, fabric, and neoforge modules
Test Plan
Notes
This update supports Minecraft 1.21.11, which is historically significant as:
The mod maintains backwards compatibility with 1.21.10 while adding full 1.21.11 support.
🤖 Generated with Claude Code