diff --git a/build.gradle b/build.gradle index 61885242..72e622e2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.7-SNAPSHOT' + id 'fabric-loom' version '1.8-SNAPSHOT' id 'maven-publish' } @@ -48,7 +48,7 @@ dependencies { libImpl("meteordevelopment:orbit:${project.orbit_version}") - modCompileOnly "meteordevelopment:baritone:1.21-SNAPSHOT" + modCompileOnly "meteordevelopment:baritone:1.21.1-SNAPSHOT" libImpl("io.netty:netty-handler-proxy:${project.netty_version}") { transitive = false } libImpl("io.netty:netty-codec-socks:${project.netty_version}") { transitive = false } diff --git a/gradle.properties b/gradle.properties index 60c7d76a..b9b306cd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,15 +1,14 @@ org.gradle.jvmargs=-Xmx4G org.gradle.parallel=true - -minecraft_version=1.21 -yarn_mappings=1.21+build.2 -loader_version=0.15.11 +minecraft_version=1.21.1 +yarn_mappings=1.21.1+build.3 +loader_version=0.16.7 mod_version=1.7 maven_group=thunder.hack -archives_base_name=thunderhack +archives_base_name=melahack # Dependencies -fabric_version=0.100.3+1.21 +fabric_version=0.106.0+1.21.1 orbit_version=0.2.3 netty_version=4.1.90.Final diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index c1962a79..e6441136 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 2617362f..9355b415 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index aeb74cbb..b740cf13 100644 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/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/. @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -130,10 +131,13 @@ 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. @@ -141,7 +145,7 @@ 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=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -149,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -198,11 +202,11 @@ fi # 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 $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. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_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" \ 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 diff --git a/src/main/java/thunder/hack/features/modules/combat/AutoCrystal.java b/src/main/java/thunder/hack/features/modules/combat/AutoCrystal.java index f859cdfb..564d6182 100644 --- a/src/main/java/thunder/hack/features/modules/combat/AutoCrystal.java +++ b/src/main/java/thunder/hack/features/modules/combat/AutoCrystal.java @@ -41,7 +41,6 @@ import thunder.hack.setting.impl.SettingGroup; import thunder.hack.utility.TickTimer; import thunder.hack.utility.Timer; -import thunder.hack.utility.world.ExplosionUtility; import thunder.hack.utility.math.MathUtility; import thunder.hack.utility.math.PredictUtility; import thunder.hack.utility.player.InteractionUtility; @@ -51,6 +50,7 @@ import thunder.hack.utility.render.Render2DEngine; import thunder.hack.utility.render.Render3DEngine; import thunder.hack.utility.render.animation.CaptureMark; +import thunder.hack.utility.world.ExplosionUtility; import java.awt.*; import java.lang.reflect.Field; @@ -345,10 +345,10 @@ public void onPacketReceive(PacketEvent.Receive e) { if (mc.player == null || mc.world == null) return; if (e.getPacket() instanceof ExperienceOrbSpawnS2CPacket spawn) - processSpawnPacket(spawn.getId()); + processSpawnPacket(spawn.getEntityId()); if (e.getPacket() instanceof EntitySpawnS2CPacket spawn) - processSpawnPacket(spawn.getId()); + processSpawnPacket(spawn.getEntityId()); if (e.getPacket() instanceof ExplosionS2CPacket explosion) { for (Entity ent : Lists.newArrayList(mc.world.getEntities())) diff --git a/src/main/java/thunder/hack/features/modules/combat/Surround.java b/src/main/java/thunder/hack/features/modules/combat/Surround.java index f17864b4..452f377b 100644 --- a/src/main/java/thunder/hack/features/modules/combat/Surround.java +++ b/src/main/java/thunder/hack/features/modules/combat/Surround.java @@ -6,7 +6,9 @@ import net.minecraft.entity.MovementType; import net.minecraft.entity.decoration.EndCrystalEntity; import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket; -import net.minecraft.network.packet.s2c.play.*; +import net.minecraft.network.packet.s2c.play.BlockUpdateS2CPacket; +import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket; +import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket; import net.minecraft.util.math.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -19,7 +21,9 @@ import thunder.hack.utility.player.InteractionUtility; import thunder.hack.utility.world.HoleUtility; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; import static thunder.hack.features.modules.client.ClientSettings.isRu; @@ -113,7 +117,7 @@ private void onPacketReceive(PacketEvent.@NotNull Receive event) { if (event.getPacket() instanceof EntitySpawnS2CPacket spawn && spawn.getEntityType() == EntityType.END_CRYSTAL) { EndCrystalEntity cr = new EndCrystalEntity(mc.world, spawn.getX(), spawn.getY(), spawn.getZ()); - cr.setId(spawn.getId()); + cr.setId(spawn.getEntityId()); if (crystalBreaker.getValue().isEnabled() && cr.squaredDistanceTo(mc.player) <= remove.getPow2Value()) handlePacket(); diff --git a/src/main/java/thunder/hack/features/modules/combat/TargetStrafe.java b/src/main/java/thunder/hack/features/modules/combat/TargetStrafe.java index c04741a2..17aea7b9 100644 --- a/src/main/java/thunder/hack/features/modules/combat/TargetStrafe.java +++ b/src/main/java/thunder/hack/features/modules/combat/TargetStrafe.java @@ -13,8 +13,8 @@ import thunder.hack.core.Core; import thunder.hack.core.manager.client.ModuleManager; import thunder.hack.events.impl.*; -import thunder.hack.injection.accesors.ISPacketEntityVelocity; import thunder.hack.features.modules.Module; +import thunder.hack.injection.accesors.ISPacketEntityVelocity; import thunder.hack.setting.Setting; import thunder.hack.utility.player.InventoryUtility; @@ -238,7 +238,7 @@ public void onPacketReceive(PacketEvent.Receive e) { oldSpeed = 0; } EntityVelocityUpdateS2CPacket velocity; - if (e.getPacket() instanceof EntityVelocityUpdateS2CPacket && (velocity = e.getPacket()).getId() == mc.player.getId() && boost.getValue() == Boost.Damage) { + if (e.getPacket() instanceof EntityVelocityUpdateS2CPacket && (velocity = e.getPacket()).getEntityId() == mc.player.getId() && boost.getValue() == Boost.Damage) { if (mc.player.isOnGround()) return; double vX = velocity.getVelocityX(); diff --git a/src/main/java/thunder/hack/features/modules/movement/Blink.java b/src/main/java/thunder/hack/features/modules/movement/Blink.java index a5a3ed56..a075231e 100644 --- a/src/main/java/thunder/hack/features/modules/movement/Blink.java +++ b/src/main/java/thunder/hack/features/modules/movement/Blink.java @@ -95,7 +95,7 @@ public String getDisplayInfo() { @EventHandler public void onPacketReceive(PacketEvent.Receive event) { - if (event.getPacket() instanceof EntityVelocityUpdateS2CPacket vel && vel.getId() == mc.player.getId() && disableOnVelocity.getValue()) + if (event.getPacket() instanceof EntityVelocityUpdateS2CPacket vel && vel.getEntityId() == mc.player.getId() && disableOnVelocity.getValue()) disable(isRu() ? "Выключенно из-за велосити!" : "Disabled due to velocity!"); } diff --git a/src/main/java/thunder/hack/features/modules/movement/Strafe.java b/src/main/java/thunder/hack/features/modules/movement/Strafe.java index 0707e4ad..b7c2e42c 100644 --- a/src/main/java/thunder/hack/features/modules/movement/Strafe.java +++ b/src/main/java/thunder/hack/features/modules/movement/Strafe.java @@ -186,7 +186,7 @@ public void onPacketReceive(PacketEvent.Receive e) { } EntityVelocityUpdateS2CPacket velocity; - if (e.getPacket() instanceof EntityVelocityUpdateS2CPacket && (velocity = e.getPacket()).getId() == mc.player.getId() && boost.getValue() == Boost.Damage) { + if (e.getPacket() instanceof EntityVelocityUpdateS2CPacket && (velocity = e.getPacket()).getEntityId() == mc.player.getId() && boost.getValue() == Boost.Damage) { if (mc.player.isOnGround()) return; double vX = velocity.getVelocityX(); diff --git a/src/main/java/thunder/hack/features/modules/movement/Timer.java b/src/main/java/thunder/hack/features/modules/movement/Timer.java index b8d6560e..f90f24f0 100644 --- a/src/main/java/thunder/hack/features/modules/movement/Timer.java +++ b/src/main/java/thunder/hack/features/modules/movement/Timer.java @@ -108,7 +108,7 @@ public void onPacketReceive(PacketEvent.Receive e) { } if (e.getPacket() instanceof EntityVelocityUpdateS2CPacket velo - && velo.getId() == mc.player.getId() && mode.is(Mode.Grim)) { + && velo.getEntityId() == mc.player.getId() && mode.is(Mode.Grim)) { ThunderHack.TICK_TIMER = 1f; energy = 0; } diff --git a/src/main/java/thunder/hack/features/modules/movement/Velocity.java b/src/main/java/thunder/hack/features/modules/movement/Velocity.java index 2e8b68c9..46894d08 100644 --- a/src/main/java/thunder/hack/features/modules/movement/Velocity.java +++ b/src/main/java/thunder/hack/features/modules/movement/Velocity.java @@ -62,7 +62,7 @@ public void onPacketReceive(PacketEvent.Receive e) { // MAIN VELOCITY if (e.getPacket() instanceof EntityVelocityUpdateS2CPacket pac) { - if (pac.getId() == mc.player.getId() && (!onlyAura.getValue() || ModuleManager.aura.isEnabled())) { + if (pac.getEntityId() == mc.player.getId() && (!onlyAura.getValue() || ModuleManager.aura.isEnabled())) { switch (mode.getValue()) { case Matrix -> { if (!flag) {