-
-
Notifications
You must be signed in to change notification settings - Fork 13
1.21.11 #475
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
Conversation
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 ⛓️ Depends-On RequirementsWonderful, this rule succeeded.Requirement based on the presence of
|
Summary of ChangesHello @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
Ignored Files
Using Gemini Code AssistThe 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
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 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
|
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.
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.
| // 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) |
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.
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.
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.
@gemini-code-assist ResourceLocation is renamed back to Identifier in 1.21.11
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.
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.
…tringOr("id", "")
|
Note Other AI code review bot(s) detectedCodeRabbit 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. 📝 WalkthroughWalkthroughThis 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 Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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. Comment |
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.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
gradle/wrapper/gradle-wrapper.jaris excluded by!**/*.jar
📒 Files selected for processing (36)
build.gradle.ktsdockergradle/wrapper/gradle-wrapper.propertiessrc/main/java/one/oktw/galaxy/mixin/tweak/MixinAsyncChunk_IOWorker.javasrc/main/java/one/oktw/galaxy/mixin/tweak/MixinSkipSyncRegistry.javasrc/main/java/one/oktw/galaxy/mixin/tweak/MixinThrownCountdown_Entity.javasrc/main/java/org/spongepowered/common/mixin/realtime/entity/mob/ZombieVillagerMixin_RealTime.javasrc/main/java/org/spongepowered/common/mixin/realtime/world/ServerLevelMixin_RealTime.javasrc/main/kotlin/one/oktw/galaxy/block/CustomBlock.ktsrc/main/kotlin/one/oktw/galaxy/block/DummyBlock.ktsrc/main/kotlin/one/oktw/galaxy/block/ModelCustomBlock.ktsrc/main/kotlin/one/oktw/galaxy/block/TrashcanBlock.ktsrc/main/kotlin/one/oktw/galaxy/block/entity/DummyBlockEntity.ktsrc/main/kotlin/one/oktw/galaxy/block/entity/HTCraftingTableBlockEntity.ktsrc/main/kotlin/one/oktw/galaxy/block/entity/HarvestBlockEntity.ktsrc/main/kotlin/one/oktw/galaxy/block/entity/TestGuiBlockEntity.ktsrc/main/kotlin/one/oktw/galaxy/block/entity/TrashcanBlockEntity.ktsrc/main/kotlin/one/oktw/galaxy/command/commands/Admin.ktsrc/main/kotlin/one/oktw/galaxy/command/commands/admin/Creative.ktsrc/main/kotlin/one/oktw/galaxy/command/commands/admin/GetItem.ktsrc/main/kotlin/one/oktw/galaxy/command/commands/admin/RegisterBlock.ktsrc/main/kotlin/one/oktw/galaxy/gui/GUI.ktsrc/main/kotlin/one/oktw/galaxy/item/CustomBlockItem.ktsrc/main/kotlin/one/oktw/galaxy/item/CustomItem.ktsrc/main/kotlin/one/oktw/galaxy/item/CustomItemHelper.ktsrc/main/kotlin/one/oktw/galaxy/item/Gui.ktsrc/main/kotlin/one/oktw/galaxy/item/Material.ktsrc/main/kotlin/one/oktw/galaxy/item/Misc.ktsrc/main/kotlin/one/oktw/galaxy/item/Tool.ktsrc/main/kotlin/one/oktw/galaxy/item/Upgrade.ktsrc/main/kotlin/one/oktw/galaxy/item/Weapon.ktsrc/main/kotlin/one/oktw/galaxy/network/ProxyAPIPayload.ktsrc/main/kotlin/one/oktw/galaxy/network/ProxyChatPayload.ktsrc/main/kotlin/one/oktw/galaxy/util/CustomRegistry.ktsrc/main/kotlin/one/oktw/galaxy/util/KotlinCoroutineTaskExecutor.ktsrc/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.ktsrc/main/kotlin/one/oktw/galaxy/command/commands/admin/Creative.ktsrc/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.Utiltonet.minecraft.util.Utilaligns 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
ResourceLocationtoIdentifieracross 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 whereResourceLocationwas renamed back toIdentifier.The
require = 0on 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 usenet.minecraft.world.entity.monster.zombie.ZombieVillager, properly reflecting the package restructuring in Minecraft 1.21.11. The method signaturegetConversionProgress()Iis correctly preserved and the@Mixinannotation 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.ArrowandSpectralArrow), 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
ResourceLocationtoIdentifier. The usage ofIdentifier.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
setBackgroundmethod signature correctly acceptsIdentifierinstead ofResourceLocation, and the implementation properly usesIdentifierwithFontDescription.Resource. Verification across the codebase confirms all 8 callers (Creative.kt, HTCraftingTableBlockEntity.kt, TrashcanBlockEntity.kt, TestGuiBlockEntity.kt, HarvestBlockEntity.kt) already passIdentifier.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.Utiltonet.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
setBackgroundcall have been successfully migrated to useIdentifier.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
setBackgroundcall have been successfully migrated to useIdentifier.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
setBackgroundcall have been successfully migrated to useIdentifier.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
ResourceLocationArgumenttoIdentifierArgument. 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
Registrableinterface change to useIdentifierinstead ofResourceLocationhas been implemented across all implementers (CustomItemandCustomBlock). 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
ResourceLocationtoIdentifieris 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.CODECtoIdentifier.CODECfor 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
ResourceLocationtoIdentifieris 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
ResourceLocationtoIdentifieris 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
ResourceLocationArgumenttoIdentifierArgumentis 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
ResourceLocationtoIdentifieris 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
ResourceLocationtoIdentifierin 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.fromNamespaceAndPathinstead ofResourceLocation.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
Identifierinstead ofResourceLocation.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:
- Migration from
ResourceLocationtoIdentifierAPI- Removal of the unnecessary safe call operator
?onview.getStringOr("id", ""), which returns a non-nullStringdue to the default valueBoth 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
CustomItemsuperclass constructor call and theCustomBlock.registry.get()lookup have been properly updated to useIdentifier.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
ModelCustomBlocksuperclass constructor argument have been properly updated to useIdentifier.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 constantLEVEL_GAMEMASTERSis 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 ofgetName()override returning an empty component appears intentional for hiding the item name, complementing the existinghideTooltip = trueconfiguration.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
ResourceLocationtoIdentifierare consistent with the Minecraft 1.21.11 API migration. The default initialization pattern foritemModelis 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.fromNamespaceAndPathinstead ofResourceLocation.fromNamespaceAndPath, aligning with the updatedCustomItemsuperclass 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 updatedCustomBlocksuperclass.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. Theidentifierproperty is properly passed to theBuiltInRegistries.BLOCK_ENTITY_TYPEregistration (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(), andgetAll()methods now operate onIdentifierinstead ofResourceLocation. All call sites throughout the codebase (CustomBlockItem, item categories, command handlers, and CustomBlockHelper) have been properly updated to passIdentifierarguments.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_TIMEis the proper equivalent of the renameddoDaylightCyclegame rule in Minecraft 1.21.11.The constant change from
GameRules.RULE_DAYLIGHTtoGameRules.ADVANCE_TIMEis appropriate for the project's target version. In Minecraft 1.21.11, thedoDaylightCyclegame rule was renamed toadvance_time, andGameRules.ADVANCE_TIMEis the correct API constant for controlling day/night cycle advancement. The real-time daylight tracking feature will work as intended.
| kotlin("jvm") version "2.3.0" | ||
| id("net.fabricmc.fabric-loom-remap") version "1.14-SNAPSHOT" |
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.
🧩 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 -10Repository: 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 loomRepository: 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.
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.
@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-loomto be used for non-obfuscated versionsnet.fabricmc.fabric-loom-remapto be used for obfuscated versions of Minecraftfabric-loomremains to preserve backwards compatibility with existing projects
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.
@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.
bill96012
left a comment
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.
Test passed
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. Required conditions to merge
|
Depends-On: #474
Changes
9.1.0->9.2.12.2.20->2.3.0f4e1b25->2235da5Related