diff --git a/.github/workflows/dev_build.yml b/.github/workflows/dev_build.yml index 20b547f..09ee70b 100644 --- a/.github/workflows/dev_build.yml +++ b/.github/workflows/dev_build.yml @@ -26,8 +26,8 @@ jobs: uses: marvinpinto/action-automatic-releases@latest with: repo_token: '${{ secrets.GITHUB_TOKEN }}' - automatic_release_tag: "1.21.9_1.0.9.5" + automatic_release_tag: "1.21.10_1.0.9.5" prerelease: true - title: "1.21.9 | 1.0.9.5" + title: "1.21.10 | 1.0.9.5" files: | ./build/libs/*.jar diff --git a/README.md b/README.md index 3d420d6..7604791 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Minecraft version
Verified Addon - Minecraft version + Minecraft version Downloads GitHub stars
diff --git a/build.gradle b/build.gradle index c99ba6b..ba1ebbe 100644 --- a/build.gradle +++ b/build.gradle @@ -3,9 +3,12 @@ plugins { id "maven-publish" } -sourceCompatibility = targetCompatibility = JavaVersion.VERSION_21 +java { + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 +} -archivesBaseName = project.archives_base_name +base.archivesName = project.archives_name version = project.mod_version group = project.maven_group @@ -41,7 +44,16 @@ repositories { // Where Is It, JackFredLib maven { url = uri("https://maven.jackf.red/releases/") + // Meteor Client } + maven { + name = "meteor-maven" + url = "https://maven.meteordev.org/releases" + } + maven { + name = "meteor-maven-snapshots" + url = "https://maven.meteordev.org/snapshots" + } mavenCentral() gradlePluginPortal() } @@ -59,8 +71,10 @@ dependencies { include(implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:0.5.0"))) // Meteor Client - modImplementation files("libs\\baritone-unoptimized-fabric-1.14.0-1.jar") - modImplementation files("libs\\meteor-client-1.21.9-local.jar") + modImplementation files("libs\\baritone-unoptimized-fabric-1.14.0-1.jar") + modImplementation("meteordevelopment:meteor-client:${project.minecraft_version}-SNAPSHOT") + implementation "org.meteordev:starscript:0.2.5" + implementation "meteordevelopment:orbit:0.2.3" // Xaero's Mods modCompileOnly "maven.modrinth:xaeros-world-map:${project.xwm_fabric_version}" // Xaero's World Map @@ -74,6 +88,12 @@ loom { accessWidenerPath = file("src/main/resources/meteorplus.accesswidener") } +jar { + from("LICENSE") { + rename { "${it}_${project.base.archivesName}" } + } +} + processResources { filesMatching("fabric.mod.json") { expand "version": project.mod_version, "mc_version": project.minecraft_version, "gh_hash": (System.getenv("GITHUB_SHA") ?: "") diff --git a/gradle.properties b/gradle.properties index 279799e..2d7a58f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,25 +1,25 @@ org.gradle.jvmargs=-Xmx4G # Fabric (https://fabricmc.net/versions.html) -minecraft_version=1.21.9 -yarn_mappings=1.21.9+build.1 +minecraft_version=1.21.10 +yarn_mappings=1.21.10+build.2 loader_version=0.17.2 # Fabric API -fabric_version=0.133.14+1.21.9 +fabric_version=0.135.0+1.21.10 # Mod Properties -mod_version=1.21.9_1.0.9.5 +mod_version=1.21.10_1.0.9.5 maven_group=nekiplay.meteorplus -archives_base_name=meteor-plus +archives_name=meteor-plus # Dependency Versions # Xaero's Mods # Xaero's World Map (https://modrinth.com/mod/xaeros-world-map/versions) -xwm_fabric_version=1.39.16_Fabric_1.21.9 +xwm_fabric_version=1.39.17_Fabric_1.21.9 # Xaero's Minimap (https://modrinth.com/mod/xaeros-minimap/versions) -xmm_fabric_version=25.2.14_Fabric_1.21.9 +xmm_fabric_version=25.2.15_Fabric_1.21.9 # Where Is It (https://modrinth.com/mod/where-is-it/versions) where_is_it_version=2.6.4+1.21.2 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180..8bdaf60 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3ae1e2f..2e11132 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c787..adff685 100644 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 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. @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +82,11 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -114,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -133,22 +132,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -165,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -193,18 +198,27 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" +# 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 107acd3..c4bdd3a 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ 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. -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 @@ -56,32 +59,33 @@ 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 :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @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%" -jar "%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/libs/meteor-client-1.21.9-local.jar b/libs/meteor-client-1.21.9-local.jar deleted file mode 100644 index 6012391..0000000 Binary files a/libs/meteor-client-1.21.9-local.jar and /dev/null differ diff --git a/src/main/java/nekiplay/meteorplus/features/modules/world/XrayBruteforce.java b/src/main/java/nekiplay/meteorplus/features/modules/world/XrayBruteforce.java index fc7e332..1f094d6 100644 --- a/src/main/java/nekiplay/meteorplus/features/modules/world/XrayBruteforce.java +++ b/src/main/java/nekiplay/meteorplus/features/modules/world/XrayBruteforce.java @@ -7,7 +7,7 @@ import meteordevelopment.meteorclient.MeteorClient; import meteordevelopment.meteorclient.events.game.GameLeftEvent; import meteordevelopment.meteorclient.events.meteor.KeyEvent; -import meteordevelopment.meteorclient.events.meteor.MouseButtonEvent; +import meteordevelopment.meteorclient.events.meteor.MouseClickEvent; import meteordevelopment.meteorclient.systems.modules.Categories; import meteordevelopment.meteorclient.systems.modules.render.blockesp.ESPBlock; import meteordevelopment.meteorclient.systems.modules.render.blockesp.ESPBlockData; @@ -479,7 +479,7 @@ private void onKeyEvent(KeyEvent event) } @EventHandler - private void onMouseButtonEvent(MouseButtonEvent event) { + private void onMouseClickEvent(MouseClickEvent event) { if (event.action == KeyAction.Press && isPressed()) { pause_toggle = !pause_toggle; if (pause_toggle) { diff --git a/src/main/java/nekiplay/meteorplus/mixin/meteorclient/modules/BreakIndicatorsMixin.java b/src/main/java/nekiplay/meteorplus/mixin/meteorclient/modules/BreakIndicatorsMixin.java index 2313199..d9c8fa2 100644 --- a/src/main/java/nekiplay/meteorplus/mixin/meteorclient/modules/BreakIndicatorsMixin.java +++ b/src/main/java/nekiplay/meteorplus/mixin/meteorclient/modules/BreakIndicatorsMixin.java @@ -142,13 +142,13 @@ private void renderBlock(Render2DEvent event, BlockPos pos, double shrinkFactor, @Unique private void renderPacket(Render2DEvent event, List blocks) { for (PacketMine.MyBlock block : blocks) { - if (block.mining && block.progress != Double.POSITIVE_INFINITY) { + if (block.mining && block.progress() != Double.POSITIVE_INFINITY) { VoxelShape shape = block.blockState.getOutlineShape(mc.world, block.blockPos); if (shape == null || shape.isEmpty()) return; Box orig = shape.getBoundingBox(); - double progressNormalised = block.progress > 1 ? 1 : block.progress; + double progressNormalised = Math.min(1, block.progress()); double shrinkFactor = 1d - progressNormalised; BlockPos pos = block.blockPos; diff --git a/src/main/java/nekiplay/meteorplus/mixin/meteorclient/modules/FreecamMixin.java b/src/main/java/nekiplay/meteorplus/mixin/meteorclient/modules/FreecamMixin.java index b0e7722..a6c4cc3 100644 --- a/src/main/java/nekiplay/meteorplus/mixin/meteorclient/modules/FreecamMixin.java +++ b/src/main/java/nekiplay/meteorplus/mixin/meteorclient/modules/FreecamMixin.java @@ -4,7 +4,7 @@ import baritone.api.pathing.goals.GoalBlock; import meteordevelopment.meteorclient.events.Cancellable; import meteordevelopment.meteorclient.events.meteor.KeyEvent; -import meteordevelopment.meteorclient.events.meteor.MouseButtonEvent; +import meteordevelopment.meteorclient.events.meteor.MouseClickEvent; import meteordevelopment.meteorclient.events.world.TickEvent; import meteordevelopment.meteorclient.settings.BoolSetting; import meteordevelopment.meteorclient.settings.KeybindSetting; @@ -256,7 +256,7 @@ private void onKeyEvent(KeyEvent event) } @Unique @EventHandler - private void onMouseButtonEvent(MouseButtonEvent event) { + private void onMouseClickEvent(MouseClickEvent event) { if (mc.world != null && event.action == KeyAction.Press) { Work(event); } diff --git a/src/main/java/nekiplay/meteorplus/mixin/meteorclient/modules/MiddleClickExtraMixin.java b/src/main/java/nekiplay/meteorplus/mixin/meteorclient/modules/MiddleClickExtraMixin.java index 7b62c7b..6164eaa 100644 --- a/src/main/java/nekiplay/meteorplus/mixin/meteorclient/modules/MiddleClickExtraMixin.java +++ b/src/main/java/nekiplay/meteorplus/mixin/meteorclient/modules/MiddleClickExtraMixin.java @@ -1,7 +1,7 @@ package nekiplay.meteorplus.mixin.meteorclient.modules; -import meteordevelopment.meteorclient.events.meteor.MouseButtonEvent; +import meteordevelopment.meteorclient.events.meteor.MouseClickEvent; import meteordevelopment.meteorclient.settings.BoolSetting; import meteordevelopment.meteorclient.settings.Setting; import meteordevelopment.meteorclient.settings.SettingGroup; @@ -16,6 +16,8 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import net.minecraft.client.gui.Click; +import net.minecraft.client.input.MouseInput; import static meteordevelopment.meteorclient.MeteorClient.mc; import static nekiplay.meteorplus.MeteorPlusAddon.HUD_TITLE; @@ -40,10 +42,10 @@ public MiddleClickExtraMixin() { .build() ); - @Inject(method = "onMouseButton", at = @At("HEAD"), cancellable = true) - private void onMouseButton(MouseButtonEvent event, CallbackInfo ci) { - if (event.action == KeyAction.Press && event.button == 2 && mc.currentScreen == null) { - if (event.action != KeyAction.Press || event.button != GLFW_MOUSE_BUTTON_MIDDLE) return; + @Inject(method = "onMouseClick", at = @At("HEAD"), cancellable = true) + private void onMouseClick(MouseClickEvent event, CallbackInfo ci) { + if (event.action == KeyAction.Press && event.button() == 2 && mc.currentScreen == null) { + if (event.action != KeyAction.Press || event.button() != GLFW_MOUSE_BUTTON_MIDDLE) return; if (noInventory.get() && mc.currentScreen != null) { ci.cancel(); }