Conversation
🚀 Release PreviewThis pull request will trigger a new release when merged. Release notes0.7.0 (v0.6.0...v0.7.0) (2026-03-08)Features |
There was a problem hiding this comment.
Pull request overview
This PR upgrades the mod’s build and runtime compatibility to Minecraft 1.21.11 (and corresponding Fabric tooling), and updates mixins/build scripts to match upstream API changes.
Changes:
- Bump Minecraft/Fabric Loader/Yarn/Fabric API versions to the 1.21.11 line.
- Update mixins to newer world/accessor and entity custom-data serialization APIs.
- Update Gradle wrapper + build script configuration for newer Gradle conventions.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/fabric.mod.json | Updates declared dependencies for the new Minecraft/Fabric Loader versions. |
| src/main/java/io/nihlen/scriptschunkloaders/mixin/DispenserBlockMixin.java | Refactors dispenser pattern detection and adds start/stop actions; updates client check API usage. |
| src/main/java/io/nihlen/scriptschunkloaders/mixin/AbstractMinecartEntityMixin.java | Adapts to new world accessor + custom data read/write APIs. |
| src/main/java/io/nihlen/scriptschunkloaders/ChunkLoaderManager.java | Updates world accessor usage to match newer entity APIs. |
| gradlew.bat | Modifies Windows wrapper invocation to use -jar. |
| gradlew | Modifies Unix wrapper invocation and wrapper variables (notably CLASSPATH). |
| gradle/wrapper/gradle-wrapper.properties | Updates Gradle distribution URL. |
| gradle/wrapper/gradle-wrapper.jar | Updates wrapper JAR to match the new Gradle wrapper version. |
| gradle.properties | Bumps Minecraft/Fabric versions and renames Fabric API version property. |
| build.gradle | Uses base.archivesName, updates Fabric API property name, and moves Java compatibility into the java {} block. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import net.minecraft.storage.ReadView; | ||
| import net.minecraft.storage.WriteView; | ||
| import net.minecraft.world.TeleportTarget; | ||
| import org.spongepowered.asm.mixin.Mixin; | ||
| import org.spongepowered.asm.mixin.Shadow; |
There was a problem hiding this comment.
This file now uses ReadView/WriteView for custom data, but some imports are no longer referenced (org.spongepowered.asm.mixin.Shadow and net.minecraft.nbt.NbtCompound). Please remove unused imports to keep the mixin clean and avoid stricter compiler/lint failures.
| this.lastChunkPos = null; | ||
| } | ||
| @Unique | ||
| public void scripts_chunk_loaders$stopChunkLoader(Boolean keepName) { |
There was a problem hiding this comment.
scripts_chunk_loaders$stopChunkLoader(Boolean keepName) takes a boxed Boolean. Since callers pass primitives and null isn’t meaningful here, this should be a primitive boolean to avoid accidental NullPointerException and unnecessary boxing.
| public void scripts_chunk_loaders$stopChunkLoader(Boolean keepName) { | |
| public void scripts_chunk_loaders$stopChunkLoader(boolean keepName) { |
| esac | ||
|
|
||
| CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar | ||
| CLASSPATH="\\\"\\\"" |
There was a problem hiding this comment.
CLASSPATH is being set to the literal string \"\" instead of the wrapper JAR path. This makes the generated java ... -classpath "$CLASSPATH" ... invocation invalid and can prevent the Gradle wrapper from starting. Regenerate gradlew from a known-good Gradle wrapper template (or restore CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar).
| CLASSPATH="\\\"\\\"" | |
| CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar |
|
|
||
| set -- \ | ||
| "-Dorg.gradle.appname=$APP_BASE_NAME" \ | ||
| -classpath "$CLASSPATH" \ |
There was a problem hiding this comment.
The wrapper launch arguments now include both -classpath "$CLASSPATH" and -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar". java -jar ignores the classpath, so this combination is inconsistent and (together with the broken CLASSPATH value) is likely to break wrapper execution. Prefer the standard Gradle wrapper invocation (-classpath ... org.gradle.wrapper.GradleWrapperMain) or drop -classpath entirely if you intend to rely on -jar.
| -classpath "$CLASSPATH" \ |
| set CLASSPATH= | ||
|
|
||
|
|
||
| @rem Execute Gradle | ||
| "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* | ||
| "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* |
There was a problem hiding this comment.
On Windows the wrapper command now uses -classpath "%CLASSPATH%" while CLASSPATH is set to empty and -jar is also used. If the intent is to use java -jar, the classpath flag is unnecessary (and an empty value can be confusing). Consider regenerating the wrapper scripts so gradlew/gradlew.bat use a consistent, standard invocation.
| @@ -23,53 +26,107 @@ | |||
|
|
|||
| @Mixin(DispenserBlock.class) | |||
| public class DispenserBlockMixin { | |||
| @Shadow @Final private static Logger LOGGER; | |||
|
|
|||
There was a problem hiding this comment.
LOGGER is shadowed/imported but never used. In a Mixin, an unused @Shadow is risky because it still has to resolve a matching field on the target class at runtime; if DispenserBlock doesn’t have a private static final Logger LOGGER with this exact name/type in 1.21.11, the mixin will fail to apply. Remove the shadow (and related imports) unless it’s required, or use it in this mixin if it’s intentional.
|
🎉 This PR is included in version 0.7.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
No description provided.