diff --git a/build.gradle b/build.gradle index ad91f56c..69b2acff 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id "architectury-plugin" version "3.4-SNAPSHOT" - id "dev.architectury.loom" version "1.6.396" apply false + id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false id "maven-publish" id 'com.matthewprenger.cursegradle' version '1.4.0' apply false id 'com.palantir.git-version' version '1.0.0' diff --git a/common/src/main/java/org/embeddedt/modernfix/common/mixin/feature/measure_time/SimpleReloadInstanceMixin.java b/common/src/main/java/org/embeddedt/modernfix/common/mixin/feature/measure_time/SimpleReloadInstanceMixin.java new file mode 100644 index 00000000..a98c0c25 --- /dev/null +++ b/common/src/main/java/org/embeddedt/modernfix/common/mixin/feature/measure_time/SimpleReloadInstanceMixin.java @@ -0,0 +1,20 @@ +package org.embeddedt.modernfix.common.mixin.feature.measure_time; + +import net.minecraft.server.packs.resources.SimpleReloadInstance; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.ModifyVariable; + +@Mixin(SimpleReloadInstance.class) +public class SimpleReloadInstanceMixin { + // TODO maybe expose as a mixin config + private static final boolean ENABLE_DEBUG_RELOADER = Boolean.getBoolean("modernfix.debugReloader"); + /** + * @author embeddedt + * @reason add ability to use this feature in modpacks + */ + @ModifyVariable(method = "create", at = @At("HEAD"), argsOnly = true) + private static boolean enableDebugReloader(boolean bl) { + return bl || ENABLE_DEBUG_RELOADER; + } +} diff --git a/common/src/main/java/org/embeddedt/modernfix/common/mixin/feature/measure_time/SimpleReloadableResourceManagerMixin.java b/common/src/main/java/org/embeddedt/modernfix/common/mixin/feature/measure_time/SimpleReloadableResourceManagerMixin.java deleted file mode 100644 index a8a8d5f7..00000000 --- a/common/src/main/java/org/embeddedt/modernfix/common/mixin/feature/measure_time/SimpleReloadableResourceManagerMixin.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.embeddedt.modernfix.common.mixin.feature.measure_time; - -import net.minecraft.server.packs.resources.ReloadableResourceManager; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyArg; - -@Mixin(ReloadableResourceManager.class) -public class SimpleReloadableResourceManagerMixin { - // TODO maybe expose as a mixin config - private static final boolean ENABLE_DEBUG_RELOADER = Boolean.getBoolean("modernfix.debugReloader"); - /** - * @author embeddedt - * @reason add ability to use this feature in modpacks - */ - @ModifyArg(method = "createReload", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/packs/resources/SimpleReloadInstance;create(Lnet/minecraft/server/packs/resources/ResourceManager;Ljava/util/List;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;Z)Lnet/minecraft/server/packs/resources/ReloadInstance;"), index = 5) - private boolean enableDebugReloader(boolean bl) { - return bl || ENABLE_DEBUG_RELOADER; - } -} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a80b22ce..a4413138 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew.bat b/gradlew.bat index 93e3f59f..25da30db 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail