Skip to content

Conversation

@jimchen5209
Copy link
Member

@jimchen5209 jimchen5209 commented Dec 19, 2025

Depends-On: #474

Changes

  • Update to Minecraft 1.21.11
  • Update dependcies:
    • gradle wrapper 9.1.0 -> 9.2.1
    • kotlin 2.2.20 -> 2.3.0
    • Galaxy Lib f4e1b25 -> 2235da5
  • Remove unnecessary safe call on a non-null receiver of view.getStringOr("id", "")

Related

@jimchen5209 jimchen5209 added status: blocked This pr is blocked by something status: needs testing This pr needs testing status: needs review This pr needs review system: galaxy type: feature New feature labels Dec 19, 2025
@mergify
Copy link
Contributor

mergify bot commented Dec 19, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 ⛓️ Depends-On Requirements

Wonderful, this rule succeeded.

Requirement based on the presence of Depends-On in the body of the pull request

@gemini-code-assist
Copy link

Summary of Changes

Hello @jimchen5209, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request is a comprehensive update to bring the project in line with Minecraft version 1.21.11. It involves a wide array of changes, from updating build tools and dependencies to a deep refactoring of game logic, custom content, and performance optimizations. The core purpose is to ensure full compatibility and leverage the latest features and API structures provided by the new Minecraft version, impacting how custom blocks, items, GUIs, and server-side events are handled.

Highlights

  • Minecraft Version Update: The project has been updated to Minecraft version 1.21.11, requiring extensive changes across the codebase to maintain compatibility.
  • Build Environment Upgrade: The Gradle wrapper has been bumped to 9.2.1, and the CircleCI build environment now uses Java 25 (eclipse-temurin:25-jdk-noble).
  • Fabric Loom and Mappings Update: The Fabric Loom plugin was updated to net.fabricmc.fabric-loom-remap:1.14-SNAPSHOT, and the project now utilizes official Mojang mappings instead of Yarn mappings.
  • Recipe API Modernization: Minecraft's recipe API has been updated, leading to changes in GalaxyRecipeProvider.kt and ShapedRecipeJsonBuilder.kt to use new methods like shapeless, unlockedBy, and save.
  • Extensive Mixin Refactoring: Numerous mixin files have been renamed and their internal logic updated to align with Minecraft 1.21.11's API changes, affecting player abilities, beacon mechanics, network handlers, chat commands, and item interaction events.
  • Async Chunk Loading Improvements: The asynchronous chunk loading system has been refactored, including changes to IOWorker and RegionFile mixins, to improve parallelization and adapt to new storage APIs.
  • SpongePowered Real-Time Mixins: All SpongePowered common real-time mixins have been updated and renamed to ensure compatibility with the new Minecraft version, impacting various entities, block entities, and server-side ticking.
  • Kotlin Codebase Adaptation: The Kotlin source files have undergone significant modifications to reflect the new Minecraft API, including package renames, method signature adjustments, and updates to the component system for custom blocks, items, and GUI elements.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/workflow.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the project to Minecraft 1.21.11 and Gradle 9.2.1, which involves a significant number of API changes and refactoring across the codebase. The updates seem to be handled correctly, with class, method, and field renames applied consistently. The move to new APIs for data generation, mixins, and core Minecraft functionality appears to be thorough. I've found one potential issue regarding a mixin that might not be applying correctly, which I've commented on.

Comment on lines 45 to 46
// TODO(Ravel): no target class
@WrapOperation(method = "createAndPopulateRegistryMap", at = @At(value = "INVOKE", target = "Lnet/minecraft/core/Registry;getKey(Ljava/lang/Object;)Lnet/minecraft/resources/Identifier;"), require = 0)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The TODO comment and require = 0 suggest that this WrapOperation might not be applying correctly. The target string seems to use Yarn names (net.minecraft.resources.Identifier), but if the project is configured to use official Mojang mappings, this could cause issues during the build process if the names aren't resolved correctly.

To ensure this mixin applies correctly, you should verify the target method signature. With official mappings, it should be Lnet/minecraft/core/Registry;getKey(Ljava/lang/Object;)Lnet/minecraft/resources/ResourceLocation;. If you are indeed using Yarn names, the current target might be correct, but the TODO indicates a potential problem worth investigating. If this mixin is intended to be optional, it's fine, but if its logic is important, this could lead to unexpected behavior.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gemini-code-assist ResourceLocation is renamed back to Identifier in 1.21.11

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the clarification! You are correct; ResourceLocation was indeed renamed back to Identifier in Minecraft 1.21.11. My apologies for the oversight. The current target Lnet/minecraft/core/Registry;getKey(Ljava/lang/Object;)Lnet/minecraft/resources/Identifier; is correct for this version.

The TODO(Ravel): no target class comment still suggests there might be an underlying reason for require = 0 or a potential issue with the mixin's application, but the specific naming concern I raised is resolved.

@jimchen5209 jimchen5209 marked this pull request as ready for review December 26, 2025 13:46
@jimchen5209 jimchen5209 removed the status: blocked This pr is blocked by something label Dec 26, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 26, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

This PR updates build tooling and target environment versions for Minecraft 1.21.11 compatibility, including Kotlin plugin (2.2.20→2.3.0), Gradle (9.1.0→9.2.1), and Fabric components. The primary code change is a widespread API migration replacing ResourceLocation with Identifier across the codebase, alongside package restructuring and select behavioral logic updates.

Changes

Cohort / File(s) Summary
Build Configuration
build.gradle.kts, gradle/wrapper/gradle-wrapper.properties, .gitmodules
Upgraded Kotlin (2.2.20→2.3.0), Fabric Loom (1.13→1.14-SNAPSHOT with remap variant), Gradle (9.1.0→9.2.1), and bumped Minecraft/Fabric dependencies; added Gradle wrapper cache configuration.
Mixin Package Updates
src/main/java/one/oktw/galaxy/mixin/tweak/MixinAsyncChunk_IOWorker.java, src/main/java/one/oktw/galaxy/mixin/tweak/MixinThrownCountdown_Entity.java, src/main/java/org/spongepowered/common/mixin/realtime/.../*
Updated import paths for relocated classes (Util, Arrow, ZombieVillager, GameRules) and adjusted mixin redirect targets to match new package structures.
Mixin Logic Updates
src/main/java/one/oktw/galaxy/mixin/tweak/MixinSkipSyncRegistry.java, src/main/java/org/spongepowered/common/mixin/realtime/world/ServerLevelMixin_RealTime.java
Migrated method signatures from ResourceLocation to Identifier; switched real-time daylight check from RULE_DAYLIGHT to ADVANCE_TIME.
Block & Block Entity (ResourceLocation→Identifier)
src/main/kotlin/one/oktw/galaxy/block/CustomBlock.kt, src/main/kotlin/one/oktw/galaxy/block/DummyBlock.kt, src/main/kotlin/one/oktw/galaxy/block/ModelCustomBlock.kt, src/main/kotlin/one/oktw/galaxy/block/TrashcanBlock.kt, src/main/kotlin/one/oktw/galaxy/block/entity/.../*
Replaced all ResourceLocation usages with Identifier in constructors, method calls, and public signatures; updated associated imports.
Command Updates
src/main/kotlin/one/oktw/galaxy/command/commands/Admin.kt, src/main/kotlin/one/oktw/galaxy/command/commands/admin/GetItem.kt, src/main/kotlin/one/oktw/galaxy/command/commands/admin/RegisterBlock.kt, src/main/kotlin/one/oktw/galaxy/command/commands/admin/Creative.kt
Migrated argument types from ResourceLocationArgument to IdentifierArgument; updated Admin command permission gate from lambda-based to Commands.hasPermission(Commands.LEVEL_GAMEMASTERS).
GUI & Item Framework
src/main/kotlin/one/oktw/galaxy/gui/GUI.kt, src/main/kotlin/one/oktw/galaxy/item/CustomItem.kt, src/main/kotlin/one/oktw/galaxy/item/Registrable.kt, src/main/kotlin/one/oktw/galaxy/item/CustomBlockItem.kt, src/main/kotlin/one/oktw/galaxy/item/CustomItemHelper.kt
Updated public API signatures and internal usage from ResourceLocation to Identifier; added getName(): Component overrides in select item classes.
Item Subclasses (ResourceLocation→Identifier)
src/main/kotlin/one/oktw/galaxy/item/Gui.kt, src/main/kotlin/one/oktw/galaxy/item/Material.kt, src/main/kotlin/one/oktw/galaxy/item/Misc.kt, src/main/kotlin/one/oktw/galaxy/item/Tool.kt, src/main/kotlin/one/oktw/galaxy/item/Upgrade.kt, src/main/kotlin/one/oktw/galaxy/item/Weapon.kt
Replaced ResourceLocation.fromNamespaceAndPath() with Identifier.fromNamespaceAndPath() in superclass constructor calls; added getName() overrides where applicable.
Network & Registry
src/main/kotlin/one/oktw/galaxy/network/ProxyAPIPayload.kt, src/main/kotlin/one/oktw/galaxy/network/ProxyChatPayload.kt, src/main/kotlin/one/oktw/galaxy/util/CustomRegistry.kt, src/main/kotlin/one/oktw/galaxy/util/KotlinCoroutineTaskExecutor.kt, src/main/kotlin/one/oktw/galaxy/util/Registrable.kt
Migrated identifier constants and registry key type from ResourceLocation to Identifier; updated codec and method signatures throughout.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

Possibly related PRs

  • Migrate to Mojang mapping #474 — Shares identical ResourceLocation↔Identifier API mappings, mixin target updates, and overlapping source file modifications indicating coordinated version upgrade work.

Suggested labels

type: enhancement

Suggested reviewers

  • bill96012

Poem

🐰 Hops through versions with careful grace,
ResourceLocation finds its place—
As Identifier now takes the lead,
Dependencies updated with speed,
One-twenty-one-point-eleven's here,
The future's bright, the path is clear! 🌟

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.70% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title '1.21.11' directly corresponds to the main objective of updating Minecraft to version 1.21.11, which is clearly stated as the primary change in both the description and the detailed changeset summary.
Description check ✅ Passed The description is well-related to the changeset, covering the main Minecraft version update to 1.21.11, dependency updates (Gradle, Kotlin, Galaxy Lib), and removal of unnecessary safe calls, all of which are reflected in the file changes.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85b07a0 and 99a8f71.

⛔ Files ignored due to path filters (1)
  • gradle/wrapper/gradle-wrapper.jar is excluded by !**/*.jar
📒 Files selected for processing (36)
  • build.gradle.kts
  • docker
  • gradle/wrapper/gradle-wrapper.properties
  • src/main/java/one/oktw/galaxy/mixin/tweak/MixinAsyncChunk_IOWorker.java
  • src/main/java/one/oktw/galaxy/mixin/tweak/MixinSkipSyncRegistry.java
  • src/main/java/one/oktw/galaxy/mixin/tweak/MixinThrownCountdown_Entity.java
  • src/main/java/org/spongepowered/common/mixin/realtime/entity/mob/ZombieVillagerMixin_RealTime.java
  • src/main/java/org/spongepowered/common/mixin/realtime/world/ServerLevelMixin_RealTime.java
  • src/main/kotlin/one/oktw/galaxy/block/CustomBlock.kt
  • src/main/kotlin/one/oktw/galaxy/block/DummyBlock.kt
  • src/main/kotlin/one/oktw/galaxy/block/ModelCustomBlock.kt
  • src/main/kotlin/one/oktw/galaxy/block/TrashcanBlock.kt
  • src/main/kotlin/one/oktw/galaxy/block/entity/DummyBlockEntity.kt
  • src/main/kotlin/one/oktw/galaxy/block/entity/HTCraftingTableBlockEntity.kt
  • src/main/kotlin/one/oktw/galaxy/block/entity/HarvestBlockEntity.kt
  • src/main/kotlin/one/oktw/galaxy/block/entity/TestGuiBlockEntity.kt
  • src/main/kotlin/one/oktw/galaxy/block/entity/TrashcanBlockEntity.kt
  • src/main/kotlin/one/oktw/galaxy/command/commands/Admin.kt
  • src/main/kotlin/one/oktw/galaxy/command/commands/admin/Creative.kt
  • src/main/kotlin/one/oktw/galaxy/command/commands/admin/GetItem.kt
  • src/main/kotlin/one/oktw/galaxy/command/commands/admin/RegisterBlock.kt
  • src/main/kotlin/one/oktw/galaxy/gui/GUI.kt
  • src/main/kotlin/one/oktw/galaxy/item/CustomBlockItem.kt
  • src/main/kotlin/one/oktw/galaxy/item/CustomItem.kt
  • src/main/kotlin/one/oktw/galaxy/item/CustomItemHelper.kt
  • src/main/kotlin/one/oktw/galaxy/item/Gui.kt
  • src/main/kotlin/one/oktw/galaxy/item/Material.kt
  • src/main/kotlin/one/oktw/galaxy/item/Misc.kt
  • src/main/kotlin/one/oktw/galaxy/item/Tool.kt
  • src/main/kotlin/one/oktw/galaxy/item/Upgrade.kt
  • src/main/kotlin/one/oktw/galaxy/item/Weapon.kt
  • src/main/kotlin/one/oktw/galaxy/network/ProxyAPIPayload.kt
  • src/main/kotlin/one/oktw/galaxy/network/ProxyChatPayload.kt
  • src/main/kotlin/one/oktw/galaxy/util/CustomRegistry.kt
  • src/main/kotlin/one/oktw/galaxy/util/KotlinCoroutineTaskExecutor.kt
  • src/main/kotlin/one/oktw/galaxy/util/Registrable.kt
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: james58899
Repo: OKTW-Network/Galaxy PR: 474
File: src/main/java/one/oktw/galaxy/mixin/tweak/MixinMapExistingChunk_FilledMapItem.java:35-37
Timestamp: 2025-11-18T04:07:14.605Z
Learning: In Minecraft 1.21 mapping migration from Yarn to Mojang mappings, the method FilledMapItem.updateColors in Yarn maps to MapItem.update in Mojang mappings. This is part of the standard Yarn → Mojang mapping migration in the MapItem class.
📚 Learning: 2025-11-18T04:22:38.294Z
Learnt from: james58899
Repo: OKTW-Network/Galaxy PR: 474
File: src/main/kotlin/one/oktw/galaxy/block/entity/TrashcanBlockEntity.kt:65-77
Timestamp: 2025-11-18T04:22:38.294Z
Learning: In the Galaxy GUI system (one.oktw.galaxy.gui.GUI), the `editInventory` method is designed to only modify default slots that are not overlaid by explicit `addSlot` bindings. When slots are bound to a specific container via `addSlot`, those slots remain independent of the GUI's internal inventory that `editInventory` operates on.

Applied to files:

  • src/main/kotlin/one/oktw/galaxy/block/entity/HTCraftingTableBlockEntity.kt
  • src/main/kotlin/one/oktw/galaxy/command/commands/admin/Creative.kt
  • src/main/kotlin/one/oktw/galaxy/block/entity/TestGuiBlockEntity.kt
📚 Learning: 2025-11-18T05:14:05.407Z
Learnt from: james58899
Repo: OKTW-Network/Galaxy PR: 474
File: src/main/java/org/spongepowered/common/mixin/realtime/entity/passive/AgeableMobMixin_RealTime.java:56-56
Timestamp: 2025-11-18T05:14:05.407Z
Learning: In Minecraft 1.21 mapping migration from Yarn to Mojang mappings, the method PassiveEntity.setBreedingAge in Yarn maps to AgeableMob.setAge in Mojang mappings. This is part of the standard Yarn → Mojang mapping migration for the AgeableMob class.

Applied to files:

  • src/main/java/org/spongepowered/common/mixin/realtime/entity/mob/ZombieVillagerMixin_RealTime.java
🧬 Code graph analysis (7)
src/main/kotlin/one/oktw/galaxy/item/CustomItem.kt (1)
src/main/kotlin/one/oktw/galaxy/block/entity/CustomBlockEntity.kt (1)
  • type (29-49)
src/main/kotlin/one/oktw/galaxy/item/CustomBlockItem.kt (1)
src/main/java/one/oktw/galaxy/mixin/tweak/MixinCustomBlockEntity_BarrierBlock.java (2)
  • Override (69-77)
  • Mixin (41-78)
src/main/kotlin/one/oktw/galaxy/network/ProxyChatPayload.kt (1)
src/main/kotlin/one/oktw/galaxy/chat/Exchange.kt (1)
  • handleChat (33-59)
src/main/kotlin/one/oktw/galaxy/block/TrashcanBlock.kt (2)
src/main/java/one/oktw/galaxy/mixin/tweak/MixinCustomBlockEntity_BarrierBlock.java (3)
  • Mixin (41-78)
  • Override (69-77)
  • Nullable (47-51)
src/main/kotlin/one/oktw/galaxy/block/entity/CustomBlockEntity.kt (1)
  • type (29-49)
src/main/kotlin/one/oktw/galaxy/block/entity/DummyBlockEntity.kt (3)
src/main/kotlin/one/oktw/galaxy/block/entity/ModelCustomBlockEntity.kt (1)
  • loadAdditional (66-69)
src/main/java/one/oktw/galaxy/mixin/tweak/MixinCustomBlockEntity_BarrierBlock.java (1)
  • Mixin (41-78)
src/main/kotlin/one/oktw/galaxy/block/entity/CustomBlockEntity.kt (1)
  • saveAdditional (38-41)
src/main/kotlin/one/oktw/galaxy/block/ModelCustomBlock.kt (2)
src/main/kotlin/one/oktw/galaxy/block/entity/ModelCustomBlockEntity.kt (2)
  • type (37-50)
  • data (80-80)
src/main/kotlin/one/oktw/galaxy/block/entity/CustomBlockEntity.kt (1)
  • type (29-49)
src/main/kotlin/one/oktw/galaxy/block/DummyBlock.kt (2)
src/main/java/one/oktw/galaxy/mixin/tweak/MixinCustomBlockEntity_BarrierBlock.java (3)
  • Nullable (47-51)
  • Mixin (41-78)
  • Nullable (63-67)
src/main/kotlin/one/oktw/galaxy/block/entity/CustomBlockEntity.kt (1)
  • type (29-49)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Docker-image
  • GitHub Check: Docker-image
  • GitHub Check: Mergify Merge Protections
  • GitHub Check: Summary
🔇 Additional comments (39)
src/main/kotlin/one/oktw/galaxy/util/KotlinCoroutineTaskExecutor.kt (1)

22-22: Import path corrected for Minecraft 1.21.11.

The package restructuring from net.minecraft.Util to net.minecraft.util.Util aligns with Minecraft 1.21.11's API changes. The usage on line 63 (Util.runNamed(task, name())) will work correctly with the updated import path.

src/main/java/one/oktw/galaxy/mixin/tweak/MixinSkipSyncRegistry.java (1)

28-28: API migration correctly implemented for Minecraft 1.21.11.

The changes consistently update ResourceLocation to Identifier across the import statement, annotation target, method signature, and local variable declarations. The logic remains unchanged—the mixin continues to filter out "galaxy" namespace entries from registry synchronization. This aligns with the Minecraft 1.21.11 API where ResourceLocation was renamed back to Identifier.

The require = 0 on line 46 makes this mixin optional, which is appropriate given the TODO comment indicating potential target resolution issues. As discussed in past reviews, this is an intentional design choice.

Also applies to: 46-48

src/main/java/org/spongepowered/common/mixin/realtime/entity/mob/ZombieVillagerMixin_RealTime.java (1)

45-45: The import and bytecode target are consistently updated to use net.minecraft.world.entity.monster.zombie.ZombieVillager, properly reflecting the package restructuring in Minecraft 1.21.11. The method signature getConversionProgress()I is correctly preserved and the @Mixin annotation properly targets the ZombieVillager class.

src/main/java/one/oktw/galaxy/mixin/tweak/MixinThrownCountdown_Entity.java (2)

40-50: LGTM!

The mixin logic is correct: it tracks water entry ticks for Arrow instances and discards them after 10 ticks in water. The refactored imports properly support the instanceof checks on line 44. No behavioral changes introduced.


22-23: The import paths are valid for Minecraft 1.21.11. The imports use Mojang's official mappings (net.minecraft.world.entity.projectile.arrow.Arrow and SpectralArrow), which are appropriate for Fabric development. The presence of this code in a well-maintained repository confirms these package paths are correct.

src/main/kotlin/one/oktw/galaxy/gui/GUI.kt (2)

28-28: LGTM: Identifier migration applied correctly.

The import and font constant declarations have been successfully migrated from ResourceLocation to Identifier. The usage of Identifier.fromNamespaceAndPath("galaxy", "gui_font/shift") is consistent across all GUI font shift constants.

Also applies to: 59-65


161-169: All setBackground callers already updated to use Identifier.

The setBackground method signature correctly accepts Identifier instead of ResourceLocation, and the implementation properly uses Identifier with FontDescription.Resource. Verification across the codebase confirms all 8 callers (Creative.kt, HTCraftingTableBlockEntity.kt, TrashcanBlockEntity.kt, TestGuiBlockEntity.kt, HarvestBlockEntity.kt) already pass Identifier.fromNamespaceAndPath() — the migration is complete.

src/main/java/one/oktw/galaxy/mixin/tweak/MixinAsyncChunk_IOWorker.java (1)

27-27: LGTM: Import path updated for Minecraft 1.21.11.

The import has been correctly updated from net.minecraft.Util to net.minecraft.util.Util, reflecting the Minecraft API package structure changes in version 1.21.11. The usage at Line 168 remains unchanged.

src/main/kotlin/one/oktw/galaxy/block/entity/TrashcanBlockEntity.kt (1)

23-23: LGTM: Identifier migration applied correctly.

The import and setBackground call have been successfully migrated to use Identifier.fromNamespaceAndPath. The resource path construction is correct.

Also applies to: 68-68

src/main/kotlin/one/oktw/galaxy/command/commands/admin/Creative.kt (1)

27-27: LGTM: Identifier migration applied correctly.

The import and setBackground call have been successfully migrated to use Identifier.fromNamespaceAndPath. The creative GUI setup remains functionally identical.

Also applies to: 58-58

src/main/kotlin/one/oktw/galaxy/block/entity/HarvestBlockEntity.kt (1)

28-28: LGTM: Identifier migration applied correctly.

The import and setBackground call have been successfully migrated to use Identifier.fromNamespaceAndPath. The harvest block entity logic and GUI setup remain unchanged.

Also applies to: 65-65

src/main/kotlin/one/oktw/galaxy/command/commands/admin/GetItem.kt (1)

25-25: LGTM: Identifier migration applied correctly.

The command argument type has been successfully migrated from ResourceLocationArgument to IdentifierArgument. All usages (argument definition, ID extraction, and registry lookup) are consistent with the migration.

Also applies to: 34-34, 44-44

src/main/kotlin/one/oktw/galaxy/util/Registrable.kt (1)

21-24: Public API change: all implementers properly updated.

The Registrable interface change to use Identifier instead of ResourceLocation has been implemented across all implementers (CustomItem and CustomBlock). All override declarations correctly use the new type.

gradle/wrapper/gradle-wrapper.properties (1)

3-3: Gradle 9.2.1 is available with no breaking changes.

Gradle 9.2.1 is a bugfix/quality release with no breaking changes. The update from 9.1.0 to 9.2.1 within the 9.x line introduces no compatibility issues.

src/main/kotlin/one/oktw/galaxy/block/entity/HTCraftingTableBlockEntity.kt (1)

25-25: LGTM: Consistent ResourceLocation → Identifier migration.

The migration from ResourceLocation to Identifier is correctly applied across all GUI background settings, with the import and usage updated consistently.

Also applies to: 63-63, 138-138

src/main/kotlin/one/oktw/galaxy/item/CustomItemHelper.kt (1)

23-23: LGTM: Codec migration correctly applied.

The migration from ResourceLocation.CODEC to Identifier.CODEC for NBT decoding is correct and aligns with the broader API migration.

Also applies to: 37-37

src/main/kotlin/one/oktw/galaxy/network/ProxyChatPayload.kt (1)

25-25: LGTM: Packet identifier migration is correct.

The migration of the packet identifier from ResourceLocation to Identifier is correctly implemented and maintains the same identifier value.

Also applies to: 33-33

src/main/kotlin/one/oktw/galaxy/item/Gui.kt (2)

22-22: LGTM: Identifier migration correctly applied.

The migration from ResourceLocation to Identifier is correctly implemented for both the main identifier and item model path.

Also applies to: 28-28, 30-30


35-35: LGTM: getName() override provides safe fallback.

The override correctly returns the provided name or an empty component when none is supplied, which is likely required due to parent class API changes in the Minecraft version update.

src/main/kotlin/one/oktw/galaxy/command/commands/admin/RegisterBlock.kt (1)

25-25: LGTM: Command argument migration is complete and consistent.

The migration from ResourceLocationArgument to IdentifierArgument is correctly applied in the argument definition, construction, and retrieval. The suggestions logic and error handling remain intact.

Also applies to: 40-40, 50-50

src/main/kotlin/one/oktw/galaxy/network/ProxyAPIPayload.kt (1)

25-25: LGTM: Proxy API packet identifier migration is correct.

The migration of the proxy identifier from ResourceLocation to Identifier is correctly implemented and consistent with the ProxyChatPayload migration.

Also applies to: 33-33

src/main/kotlin/one/oktw/galaxy/item/Tool.kt (1)

23-23: LGTM: Item identifier migration is correct.

The migration from ResourceLocation to Identifier in the CustomItem constructor is correctly applied and consistent with other item class migrations.

Also applies to: 27-27

build.gradle.kts (1)

14-17: No issues found with dependency versions.

All versions have been verified:

  • Minecraft 1.21.11 is a valid release
  • Fabric Loader 0.18.3 exists and is stable
  • Fabric API 0.140.0+1.21.11 exists and is explicitly compatible with Minecraft 1.21.11

The dependencies are valid and compatible with each other.

src/main/kotlin/one/oktw/galaxy/block/entity/TestGuiBlockEntity.kt (1)

27-27: LGTM! Clean API migration from ResourceLocation to Identifier.

The import and GUI background texture definitions have been correctly updated to use Identifier.fromNamespaceAndPath instead of ResourceLocation.fromNamespaceAndPath. This change aligns with the Minecraft 1.21.11 API migration.

Also applies to: 73-73, 97-97, 114-114

src/main/kotlin/one/oktw/galaxy/block/DummyBlock.kt (1)

22-22: LGTM! API migration correctly applied.

The import and constructor argument have been properly updated to use Identifier instead of ResourceLocation.

Also applies to: 25-25

src/main/kotlin/one/oktw/galaxy/block/entity/DummyBlockEntity.kt (1)

22-22: LGTM! Correct API migration and unnecessary safe call removal.

Two improvements here:

  1. Migration from ResourceLocation to Identifier API
  2. Removal of the unnecessary safe call operator ? on view.getStringOr("id", ""), which returns a non-null String due to the default value

Both changes are correct and align with the PR objectives.

Also applies to: 31-31

src/main/kotlin/one/oktw/galaxy/item/Upgrade.kt (1)

23-23: LGTM! Consistent API migration.

The import and constructor argument have been correctly updated to use Identifier.fromNamespaceAndPath.

Also applies to: 28-28

src/main/kotlin/one/oktw/galaxy/item/CustomBlockItem.kt (1)

22-22: LGTM! API migration correctly applied in constructor and getBlock() method.

Both the CustomItem superclass constructor call and the CustomBlock.registry.get() lookup have been properly updated to use Identifier.fromNamespaceAndPath.

Also applies to: 27-27, 41-41

src/main/kotlin/one/oktw/galaxy/block/TrashcanBlock.kt (1)

22-22: LGTM! API migration correctly applied.

The import and ModelCustomBlock superclass constructor argument have been properly updated to use Identifier.fromNamespaceAndPath.

Also applies to: 27-27

src/main/kotlin/one/oktw/galaxy/command/commands/Admin.kt (1)

34-34: LGTM! Improved permission check using built-in utility.

The change from a lambda-based permission check to Commands.hasPermission(Commands.LEVEL_GAMEMASTERS) is more idiomatic and clearly expresses the intent. The constant LEVEL_GAMEMASTERS is semantically equivalent to permission level 2.

src/main/kotlin/one/oktw/galaxy/item/Misc.kt (1)

22-22: LGTM! API migration with getName() override addition.

The import and constructor have been correctly updated to use Identifier.fromNamespaceAndPath. The addition of getName() override returning an empty component appears intentional for hiding the item name, complementing the existing hideTooltip = true configuration.

Also applies to: 25-25, 30-30

src/main/kotlin/one/oktw/galaxy/item/CustomItem.kt (1)

25-25: LGTM: Consistent migration to Identifier.

The import and type changes from ResourceLocation to Identifier are consistent with the Minecraft 1.21.11 API migration. The default initialization pattern for itemModel is preserved, and all string serialization calls remain compatible.

Also applies to: 37-39

src/main/kotlin/one/oktw/galaxy/item/Weapon.kt (1)

23-23: LGTM: Identifier constructor call updated correctly.

The constructor delegation now uses Identifier.fromNamespaceAndPath instead of ResourceLocation.fromNamespaceAndPath, aligning with the updated CustomItem superclass signature.

Also applies to: 27-27

src/main/kotlin/one/oktw/galaxy/item/Material.kt (1)

23-23: LGTM: Consistent with the Identifier migration.

The import and constructor call are updated correctly, matching the pattern across other item classes.

Also applies to: 27-27

src/main/kotlin/one/oktw/galaxy/block/ModelCustomBlock.kt (1)

22-22: LGTM: Block identifier migration completed correctly.

Both the primary and secondary constructors are updated to use Identifier, maintaining the same initialization patterns while aligning with the updated CustomBlock superclass.

Also applies to: 30-31

src/main/kotlin/one/oktw/galaxy/block/CustomBlock.kt (1)

25-25: LGTM: CustomBlock identifier migration completed.

The primary and secondary constructors are correctly updated to use Identifier. The identifier property is properly passed to the BuiltInRegistries.BLOCK_ENTITY_TYPE registration (line 39), maintaining compatibility with the Minecraft registry system.

Also applies to: 34-35

src/main/kotlin/one/oktw/galaxy/util/CustomRegistry.kt (1)

21-21: LGTM: Registry updated to use Identifier keys.

The public API changes are consistent with the project-wide migration. The internal storage, get(), and getAll() methods now operate on Identifier instead of ResourceLocation. All call sites throughout the codebase (CustomBlockItem, item categories, command handlers, and CustomBlockHelper) have been properly updated to pass Identifier arguments.

src/main/java/org/spongepowered/common/mixin/realtime/world/ServerLevelMixin_RealTime.java (2)

52-52: LGTM: Import path updated for Minecraft 1.21.11.

The GameRules class import path has been updated to reflect the package restructuring in Minecraft 1.21.11 API.


83-83: Change is correct: ADVANCE_TIME is the proper equivalent of the renamed doDaylightCycle game rule in Minecraft 1.21.11.

The constant change from GameRules.RULE_DAYLIGHT to GameRules.ADVANCE_TIME is appropriate for the project's target version. In Minecraft 1.21.11, the doDaylightCycle game rule was renamed to advance_time, and GameRules.ADVANCE_TIME is the correct API constant for controlling day/night cycle advancement. The real-time daylight tracking feature will work as intended.

Comment on lines +7 to +8
kotlin("jvm") version "2.3.0"
id("net.fabricmc.fabric-loom-remap") version "1.14-SNAPSHOT"
Copy link

@coderabbitai coderabbitai bot Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify Kotlin 2.3.0 release status
echo "=== Checking Kotlin 2.3.0 ==="
curl -s "https://api.github.com/repos/JetBrains/kotlin/releases" | jq -r '.[] | select(.tag_name | test("v?2\\.3\\.0")) | {tag: .tag_name, prerelease: .prerelease, draft: .draft}'

echo ""
echo "=== Checking fabric-loom-remap versions ==="
curl -s "https://search.maven.org/solrsearch/select?q=g:net.fabricmc+AND+a:fabric-loom-remap&rows=10&wt=json" | jq -r '.response.docs[] | "\(.v)"'

echo ""
echo "=== Checking fabric-loom versions (original plugin) ==="
curl -s "https://search.maven.org/solrsearch/select?q=g:net.fabricmc+AND+a:fabric-loom&rows=10&wt=json" | jq -r '.response.docs[] | "\(.v)"'

Repository: OKTW-Network/Galaxy

Length of output: 590


🏁 Script executed:

#!/bin/bash
# Search for fabric-loom more broadly
echo "=== Searching Maven Central for fabric-loom (all versions) ==="
curl -s "https://search.maven.org/solrsearch/select?q=g:net.fabricmc+AND+a:fabric-loom&rows=50&wt=json" | jq -r '.response.docs[] | "\(.v)"' | head -20

echo ""
echo "=== Searching for any fabric-loom related artifacts ==="
curl -s "https://search.maven.org/solrsearch/select?q=g:net.fabricmc+AND+a:*loom*&rows=20&wt=json" | jq -r '.response.docs[] | "\(.a) - \(.v)"' | sort | uniq

echo ""
echo "=== Checking Gradle Plugin Portal for fabric-loom ==="
curl -s "https://plugins.gradle.org/api/plugins?query=fabric-loom" | jq -r '.plugins[].id' | head -10

Repository: OKTW-Network/Galaxy

Length of output: 369


🏁 Script executed:

#!/bin/bash
# Read the build.gradle.kts file
echo "=== Full build.gradle.kts content ==="
cat build.gradle.kts

echo ""
echo "=== Checking Fabric GitHub for loom plugin ==="
curl -s "https://api.github.com/repos/FabricMC/fabric-loom/releases" | jq -r '.[0:5] | .[] | {tag: .tag_name, prerelease: .prerelease}' 2>/dev/null || echo "Could not fetch Fabric Loom releases"

echo ""
echo "=== Checking for fabric-loom-remap in Fabric org ==="
curl -s "https://api.github.com/orgs/FabricMC/repos?type=all" | jq -r '.[] | .name' | grep -i loom

Repository: OKTW-Network/Galaxy

Length of output: 2439


Correct the plugin ID and use the stable Fabric Loom version.

The plugin ID net.fabricmc.fabric-loom-remap does not exist; it should be net.fabricmc.fabric-loom. Additionally, use the stable version 1.14 instead of the snapshot 1.14-SNAPSHOT.

    kotlin("jvm") version "2.3.0"
    id("net.fabricmc.fabric-loom") version "1.14"
🤖 Prompt for AI Agents
In build.gradle.kts around lines 7 to 8, the plugin declaration uses the wrong
ID and a snapshot version; replace id("net.fabricmc.fabric-loom-remap") with
id("net.fabricmc.fabric-loom") and change the version from "1.14-SNAPSHOT" to
the stable "1.14" so the correct Fabric Loom plugin and stable release are
applied.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai 1.14-SNAPSHOT is recommended by fabric document, and name is changing based on changelog, net.fabricmc.fabric-loom is for non-obfuscated versions.

New plugin IDs:

  • net.fabricmc.fabric-loom to be used for non-obfuscated versions
  • net.fabricmc.fabric-loom-remap to be used for obfuscated versions of Minecraft
  • fabric-loom remains to preserve backwards compatibility with existing projects

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimchen5209, thank you for the correction! You're absolutely right. Minecraft 1.21.11 is still obfuscated and will be the last obfuscated version, and developers should use Loom 1.14. Since you're working with an obfuscated version, using net.fabricmc.fabric-loom-remap is the correct choice, and the 1.14-SNAPSHOT version is actively maintained.

I apologize for the confusion in my initial review. Your configuration is correct for Minecraft 1.21.11.


✏️ Learnings added
Learnt from: jimchen5209
Repo: OKTW-Network/Galaxy PR: 475
File: build.gradle.kts:7-8
Timestamp: 2025-12-26T14:03:59.485Z
Learning: Fabric Loom 1.14 introduced new plugin IDs: `net.fabricmc.fabric-loom` for non-obfuscated Minecraft versions, `net.fabricmc.fabric-loom-remap` for obfuscated versions, and `fabric-loom` for backwards compatibility. Minecraft 1.21.11 is the last obfuscated version, so projects targeting it should use `net.fabricmc.fabric-loom-remap`.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

Copy link
Member

@bill96012 bill96012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test passed

@mergify mergify bot added the queued label Jan 9, 2026
@mergify mergify bot merged commit 131f585 into master Jan 9, 2026
10 checks passed
@mergify
Copy link
Contributor

mergify bot commented Jan 9, 2026

Merge Queue Status

✅ The pull request has been merged at 99a8f71

This pull request spent 5 seconds in the queue, with no time running CI.
The checks were run in-place.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Build
    • check-neutral = Build
    • check-skipped = Build
  • any of [🛡 GitHub branch protection]:
    • check-success = Docker-image
    • check-neutral = Docker-image
    • check-skipped = Docker-image
  • any of [🛡 GitHub branch protection]:
    • check-success = Mergify Merge Protections
    • check-neutral = Mergify Merge Protections
    • check-skipped = Mergify Merge Protections

@mergify mergify bot deleted the 1.21.11 branch January 9, 2026 06:35
@mergify mergify bot removed the queued label Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: needs review This pr needs review status: needs testing This pr needs testing system: galaxy type: feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants