Skip to content

feat: Upgrade to Minecraft 1.21.11#48

Merged
scriptcoded merged 1 commit intomainfrom
upgrade-to-mc-1.21.11
Mar 8, 2026
Merged

feat: Upgrade to Minecraft 1.21.11#48
scriptcoded merged 1 commit intomainfrom
upgrade-to-mc-1.21.11

Conversation

@scriptcoded
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 8, 2026 15:47
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

🚀 Release Preview

This pull request will trigger a new release when merged.

Release notes

0.7.0 (v0.6.0...v0.7.0) (2026-03-08)

Features

* Upgrade to Minecraft 1.21.11 ([1dc57ce](https://github.com/scriptcoded/scripts-chunk-loaders/commit/1dc57ce988e6f039a7a6a9e2be74087bec0707a4))

@scriptcoded scriptcoded merged commit 48d80f2 into main Mar 8, 2026
6 checks passed
@scriptcoded scriptcoded deleted the upgrade-to-mc-1.21.11 branch March 8, 2026 15:48
Copy link

Copilot AI left a 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 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.

Comment on lines +5 to 9
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;
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
this.lastChunkPos = null;
}
@Unique
public void scripts_chunk_loaders$stopChunkLoader(Boolean keepName) {
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
public void scripts_chunk_loaders$stopChunkLoader(Boolean keepName) {
public void scripts_chunk_loaders$stopChunkLoader(boolean keepName) {

Copilot uses AI. Check for mistakes.
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

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

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

Suggested change
CLASSPATH="\\\"\\\""
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

Copilot uses AI. Check for mistakes.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
-classpath "$CLASSPATH" \

Copilot uses AI. Check for mistakes.
Comment on lines +73 to +77
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" %*
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines 16 to +30
@@ -23,53 +26,107 @@

@Mixin(DispenserBlock.class)
public class DispenserBlockMixin {
@Shadow @Final private static Logger LOGGER;

Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

🎉 This PR is included in version 0.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants