diff --git a/build.gradle b/build.gradle index 84b9ce4..46e75cb 100644 --- a/build.gradle +++ b/build.gradle @@ -106,8 +106,8 @@ repositories { dependencies { minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}" - implementation fg.deobf("mezz.jei:jei-1.18.2:+") - implementation fg.deobf("curse.maven:jade-324717:4082408") //1.18.2-5.2.6 + implementation fg.deobf("mezz.jei:jei-1.19.2-forge:+") + implementation fg.deobf("curse.maven:jade-324717:4433884") //1.19.2-8.8.1 } jar { diff --git a/gradle.properties b/gradle.properties index 2516518..1dd6898 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.jvmargs=-Xmx4G mod_name=NoAutoJump -mc_version=1.18.2 -forge_version=40.2.2 +mc_version=1.19.2 +forge_version=43.2.10 mod_version=1.0 mappings_channel=official -mappings_version=1.18.2 +mappings_version=1.19.2 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180..249e583 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradlew b/gradlew index c53aefa..a69d9cb 100644 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,10 +32,10 @@ # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: # * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». # # Important for patching: # @@ -205,6 +205,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index ac1b06f..53a6b23 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/src/main/java/jackyy/noautojump/NoAutoJump.java b/src/main/java/jackyy/noautojump/NoAutoJump.java index de5033a..dac8abf 100644 --- a/src/main/java/jackyy/noautojump/NoAutoJump.java +++ b/src/main/java/jackyy/noautojump/NoAutoJump.java @@ -4,7 +4,7 @@ import net.minecraft.client.gui.components.CycleButton; import net.minecraft.client.gui.components.Widget; import net.minecraft.client.gui.screens.controls.ControlsScreen; -import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.network.chat.Component; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.client.event.ScreenEvent; @@ -32,19 +32,19 @@ public NoAutoJump() { public void onClientTick(TickEvent.ClientTickEvent event) { if (ModConfigs.CONFIG.enableMod.get()) { if (event.phase == TickEvent.Phase.END) { - Minecraft.getInstance().options.autoJump = false; + Minecraft.getInstance().options.autoJump().set(false); } } } @SubscribeEvent @OnlyIn(Dist.CLIENT) - public void onInitGui(ScreenEvent.InitScreenEvent.Post event) { + public void onInitGui(ScreenEvent.Init.Post event) { if (ModConfigs.CONFIG.enableMod.get()) { if (event.getScreen() instanceof ControlsScreen) { for (Widget button : event.getScreen().renderables) { if (button instanceof CycleButton) { - TranslatableComponent autoJumpOn = new TranslatableComponent("options.generic_value", new TranslatableComponent("options.autoJump"), new TranslatableComponent("options.on")); - TranslatableComponent autoJumpOff = new TranslatableComponent("options.generic_value", new TranslatableComponent("options.autoJump"), new TranslatableComponent("options.off")); + Component autoJumpOn = Component.translatable("options.generic_value", Component.translatable("options.autoJump"), Component.translatable("options.on")); + Component autoJumpOff = Component.translatable("options.generic_value", Component.translatable("options.autoJump"), Component.translatable("options.off")); if (((CycleButton) button).getMessage().equals(autoJumpOn) || ((CycleButton) button).getMessage().equals(autoJumpOff)) { ((CycleButton) button).active = false; } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index df3c3cc..60ab1fe 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,10 +1,10 @@ modLoader="javafml" -loaderVersion="[38,)" +loaderVersion="[41,)" license="Jacky's Minecraft Mods License" [[mods]] modId="noautojump" -version="1.18.2-1.0" +version="1.19.2-1.0" displayName="No Auto Jump" displayURL="https://github.com/JackyyTV/NoAutoJump" authors="Jackyy" @@ -15,12 +15,12 @@ Simply forces Auto-Jump to be disabled! [[dependencies.noautojump]] modId="forge" mandatory=true - versionRange="[38,)" + versionRange="[41,)" ordering="NONE" side="CLIENT" [[dependencies.noautojump]] modId="minecraft" mandatory=true - versionRange="[1.18,1.19)" + versionRange="[1.19,1.19.2)" ordering="NONE" side="CLIENT" diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index 4230d4e..fe8a97d 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { "description": "No Auto Jump Resources", - "pack_format": 8 + "pack_format": 9 } }