Update to 1.21.3/1.21.4 (#399)

* Update to 1.21.3 part 1

Don't expect it to work anytime soon.

* Update to 1.21.3 part 2

* Gradle 8.8 -> 8.12

* Working Build 1.21.3

Had to revert gradle to 8.10 due to unforseen issues.

* Removed Unused Imports

* Small rendering fixes (hopefully)

* 1.21.4 port

* Use Utils.canUpdate in AutoCraft

* Intellij code fixes

---------

Co-authored-by: crazymoose77756 <ryanrogo064@gmail.com>
Co-authored-by: SByte <stormybytes@gmail.com>
This commit is contained in:
Ashray Shah
2025-01-24 18:44:35 -06:00
committed by GitHub
parent 5049f5fbeb
commit 0dcf1a26d0
51 changed files with 430 additions and 346 deletions

View File

@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'fabric-loom' version '1.9-SNAPSHOT'
}
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_21
@@ -18,6 +18,11 @@ repositories {
maven { url 'https://jitpack.io' }
maven { url 'https://maven.duti.dev/releases' }
}
loom {
accessWidenerPath = file("src/main/resources/meteor-rejects.accesswidener")
}
configurations {
// configuration that holds jars to include in the jar
extraLibs
@@ -34,7 +39,7 @@ dependencies {
mappings "net.fabricmc:yarn:${project.yarn_version}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation("meteordevelopment:meteor-client:${project.meteor_version}-SNAPSHOT")
modImplementation("meteordevelopment:meteor-client:${project.minecraft_version}-SNAPSHOT")
modCompileOnly "meteordevelopment:baritone:${project.baritone_version}-SNAPSHOT"
// seed .locate and ore sim
@@ -53,10 +58,6 @@ dependencies {
configurations.implementation.extendsFrom(configurations.extraLibs)
}
loom {
accessWidenerPath = file("src/main/resources/meteor-rejects.accesswidener")
}
processResources {
inputs.property "version", project.version
@@ -70,7 +71,7 @@ processResources {
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
rename { "${it}_${project.archivesBaseName}" }
}
from {
configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) }

View File

@@ -2,14 +2,13 @@
org.gradle.jvmargs=-Xmx2G
# Fabric Properties
minecraft_version=1.21
yarn_version=1.21+build.2
loader_version=0.15.11
minecraft_version=1.21.4
yarn_version=1.21.4+build.8
loader_version=0.16.9
# Mod Properties
mod_version = 0.3
maven_group = anticope.rejects
archives_base_name = meteor-rejects-addon
meteor_version=0.5.8
baritone_version=1.20.6
baritone_version=1.21.4

Binary file not shown.

View File

@@ -1,5 +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.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

296
gradlew vendored
View File

@@ -1,7 +1,7 @@
#!/usr/bin/env sh
#!/bin/sh
#
# Copyright 2015 the original author or 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.
@@ -15,69 +15,103 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
##
## Gradle start up script for UN*X
##
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# 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».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# 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/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$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"'
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# 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"
MAX_FD=maximum
warn () {
echo "$*"
}
} >&2
die () {
echo
echo "$*"
echo
exit 1
}
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MSYS* | MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD="$JAVA_HOME/bin/java"
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -98,88 +132,120 @@ Please set the JAVA_HOME variable in your environment to match the
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.
JAVACMD=java
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" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
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
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# 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" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
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, 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 \
"$@"
# 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.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

37
gradlew.bat vendored
View File

@@ -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,11 +59,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
@@ -75,13 +78,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

View File

@@ -135,7 +135,7 @@ public class MeteorRejectsAddon extends MeteorAddon {
.get().getMetadata()
.getCustomValue("github:sha")
.getAsString();
LOG.info(String.format("Rejects version: %s", commit));
LOG.info("Rejects version: {}", commit);
return commit.isEmpty() ? null : commit.trim();
}

View File

@@ -24,6 +24,7 @@ public class EnumArgumentType<T extends Enum<?>> implements ArgumentType<T> {
super();
try {
//noinspection unchecked
values = (T[]) defaultValue.getClass().getMethod("values").invoke(null);
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
e.printStackTrace();
@@ -34,6 +35,7 @@ public class EnumArgumentType<T extends Enum<?>> implements ArgumentType<T> {
return new EnumArgumentType<>(defaultValue);
}
@SuppressWarnings("unchecked")
public static <T extends Enum<?>> T getEnum(CommandContext<?> context, String name, T defaultValue) {
return (T) context.getArgument(name, defaultValue.getClass());
}

View File

@@ -17,7 +17,7 @@ public class CenterCommand extends Command {
double x = MathHelper.floor(mc.player.getX()) + 0.5;
double z = MathHelper.floor(mc.player.getZ()) + 0.5;
mc.player.setPosition(x, mc.player.getY(), z);
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround()));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround(), mc.player.horizontalCollision));
return SINGLE_SUCCESS;
}));
@@ -26,7 +26,7 @@ public class CenterCommand extends Command {
double x = MathHelper.floor(mc.player.getX());
double z = MathHelper.floor(mc.player.getZ());
mc.player.setPosition(x, mc.player.getY(), z);
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround()));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround(), mc.player.horizontalCollision));
return SINGLE_SUCCESS;
}));

View File

@@ -44,7 +44,7 @@ public class KickCommand extends Command {
return SINGLE_SUCCESS;
}));
builder.then(literal("pos").executes(ctx -> {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(Double.NaN, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, !mc.player.isOnGround()));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(Double.NaN, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, !mc.player.isOnGround(), mc.player.horizontalCollision));
return SINGLE_SUCCESS;
}));
builder.then(literal("hurt").executes(ctx -> {

View File

@@ -116,7 +116,7 @@ public class RadarHud extends HudElement {
double yPos = ((coords.getZ() - mc.player.getZ()) * scale.get() * zoom.get() + height / 2);
if (xPos < 0 || yPos < 0 || xPos > width - scale.get() || yPos > height - scale.get()) continue;
String icon = "*";
if (letters.get() && waypoint.name.get().length() > 0)
if (letters.get() && !waypoint.name.get().isEmpty())
icon = waypoint.name.get().substring(0, 1);
renderer.text(icon, xPos + x, yPos + y, waypoint.color.get(), false);
}

View File

@@ -15,12 +15,13 @@ import meteordevelopment.starscript.compiler.Parser;
import meteordevelopment.starscript.utils.Error;
import meteordevelopment.starscript.utils.StarscriptError;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gl.ShaderProgramKeys;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.ingame.InventoryScreen;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.render.GameRenderer;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.util.InputUtil;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.component.DataComponentTypes;
@@ -38,6 +39,7 @@ import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
import net.minecraft.text.Text;
import net.minecraft.util.Hand;
import net.minecraft.util.Identifier;
import net.minecraft.util.PlayerInput;
import net.minecraft.util.math.MathHelper;
import org.joml.Vector2f;
import org.lwjgl.glfw.GLFW;
@@ -93,27 +95,26 @@ public class InteractionScreen extends Screen {
closeScreen();
client.setScreen(new StatsScreen(e));
});
if (entity instanceof PlayerEntity) {
functions.put("Open Inventory", (Entity e) -> {
switch (entity) {
case PlayerEntity playerEntity -> functions.put("Open Inventory", (Entity e) -> {
closeScreen();
client.setScreen(new InventoryScreen((PlayerEntity) e));
});
} else if (entity instanceof AbstractHorseEntity) {
functions.put("Open Inventory", (Entity e) -> {
case AbstractHorseEntity abstractHorseEntity -> functions.put("Open Inventory", (Entity e) -> {
closeScreen();
if (client.player.isRiding()) {
client.player.networkHandler.sendPacket(new PlayerInputC2SPacket(0, 0, false, true));
// client.player.networkHandler.sendPacket(new PlayerInputC2SPacket(0, 0, false, true));
client.player.networkHandler.sendPacket(new PlayerInputC2SPacket(new PlayerInput(false, false, false, false, false, true, false)));
}
client.player.networkHandler.sendPacket(PlayerInteractEntityC2SPacket.interact(entity, true, Hand.MAIN_HAND));
client.player.setSneaking(false);
});
} else if (entity instanceof StorageMinecartEntity) {
functions.put("Open Inventory", (Entity e) -> {
case StorageMinecartEntity storageMinecartEntity -> functions.put("Open Inventory", (Entity e) -> {
closeScreen();
client.player.networkHandler.sendPacket(PlayerInteractEntityC2SPacket.interact(entity, true, Hand.MAIN_HAND));
});
} else {
functions.put("Open Inventory", (Entity e) -> {
case null, default -> functions.put("Open Inventory", (Entity e) -> {
closeScreen();
ItemStack container = new ItemStack(Items.CHEST);
container.set(DataComponentTypes.CUSTOM_NAME, e.getName());
@@ -186,7 +187,7 @@ public class InteractionScreen extends Screen {
} catch (NullPointerException ex) {
}
}
if (Saddleable.class.isInstance(e)) {
if (e instanceof Saddleable) {
if (((Saddleable) e).isSaddled()) {
stack[index[0]] = Items.SADDLE.getDefaultStack();
index[0]++;
@@ -251,12 +252,12 @@ public class InteractionScreen extends Screen {
MatrixStack matrix = context.getMatrices();
// Fake crosshair stuff
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.setShader(GameRenderer::getPositionTexProgram);
RenderSystem.setShader(ShaderProgramKeys.POSITION_TEX);
RenderSystem.enableBlend();
RenderSystem.blendFuncSeparate(GlStateManager.SrcFactor.ONE_MINUS_DST_COLOR,
GlStateManager.DstFactor.ONE_MINUS_SRC_COLOR, GlStateManager.SrcFactor.ONE,
GlStateManager.DstFactor.ZERO);
context.drawTexture(GUI_ICONS_TEXTURE, crosshairX - 8, crosshairY - 8, 0, 0, 15, 15);
context.drawTexture(RenderLayer::getGuiTextured, GUI_ICONS_TEXTURE, crosshairX - 8, crosshairY - 8, 0, 0, 15, 15, 256, 256);
drawDots(context, (int) (Math.min(height, width) / 2 * 0.75), mouseX, mouseY);
matrix.scale(2f, 2f, 1f);
@@ -290,7 +291,7 @@ public class InteractionScreen extends Screen {
private void drawDots(DrawContext context, int radius, int mouseX, int mouseY) {
ArrayList<Point> pointList = new ArrayList<Point>();
String cache[] = new String[functions.size()];
String[] cache = new String[functions.size()];
double lowestDistance = Double.MAX_VALUE;
int i = 0;

View File

@@ -108,7 +108,7 @@ public class LegacyServerFinderScreen extends WindowScreen {
updatePingers(pingers);
}
}
while (pingers.size() > 0) {
while (!pingers.isEmpty()) {
if (state == ServerFinderState.CANCELLED)
return;

View File

@@ -136,7 +136,7 @@ public class ServerFinderScreen extends WindowScreen implements IServerFinderDon
versionFilters.clear();
for (String version : versions) {
String trimmed = version.trim();
if (trimmed.length() > 0)
if (!trimmed.isEmpty())
versionFilters.add(version.trim());
}
}
@@ -177,7 +177,7 @@ public class ServerFinderScreen extends WindowScreen implements IServerFinderDon
private boolean pingNewIP() {
synchronized (serverFinderLock) {
if (ipsToPing.size() > 0) {
if (!ipsToPing.isEmpty()) {
String ip = ipsToPing.pop();
ServerPinger pinger = new ServerPinger(scanPortsBox.checked, searchNumber);
pinger.addServerFinderDoneListener(this);

View File

@@ -31,7 +31,7 @@ public class WMeteorCheckbox extends WCheckbox implements MeteorWidget {
if (animProgress > 0) {
double cs = (width - theme.scale(2)) / 1.75 * animProgress;
GuiUtils.quadRounded(renderer, x + (width - cs) / 2, y + (height - cs) / 2, cs, cs, theme.checkboxColor.get(), ((MeteorRoundedGuiTheme)theme).roundAmount());
GuiUtils.quadRounded(renderer, x + (width - cs) / 2, y + (height - cs) / 2, cs, cs, theme.checkboxColor.get(), theme.roundAmount());
}
}
}

View File

@@ -5,6 +5,7 @@ import meteordevelopment.meteorclient.systems.modules.Modules;
import net.minecraft.client.gl.PostEffectProcessor;
import net.minecraft.client.render.RenderTickCounter;
import net.minecraft.client.util.Pool;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@@ -18,6 +19,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(GameRenderer.class)
public class GameRendererMixin {
@Shadow @Final MinecraftClient client;
@Shadow @Final
Pool pool;
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/WorldRenderer;drawEntityOutlinesFramebuffer()V", ordinal = 0))
private void renderShader(RenderTickCounter tickCounter, boolean tick, CallbackInfo ci) {
@@ -26,8 +29,8 @@ public class GameRendererMixin {
PostEffectProcessor shader = renderingModule.getShaderEffect();
if (shader != null) {
shader.setupDimensions(client.getWindow().getFramebufferWidth(), client.getWindow().getFramebufferHeight());
shader.render(tickCounter.getTickDelta(tick));
// shader.setupDimensions(client.getWindow().getFramebufferWidth(), client.getWindow().getFramebufferHeight());
shader.render(this.client.getFramebuffer(), this.pool);
}
}
}

View File

@@ -5,9 +5,11 @@ import meteordevelopment.meteorclient.systems.modules.Modules;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.render.entity.LivingEntityRenderer;
import net.minecraft.client.render.entity.model.EntityModel;
import net.minecraft.client.render.entity.state.LivingEntityRenderState;
import net.minecraft.client.render.entity.state.PlayerEntityRenderState;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.RotationAxis;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -16,14 +18,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Environment(EnvType.CLIENT)
@Mixin(LivingEntityRenderer.class)
public class LivingEntityRendererMixin<T extends LivingEntity> {
public class LivingEntityRendererMixin<T extends LivingEntity, S extends LivingEntityRenderState, M extends EntityModel<? super S>> {
@Inject(method = "setupTransforms", at = @At(value = "TAIL"))
private void dinnerboneEntities(T entity, MatrixStack matrices, float animationProgress, float bodyYaw, float tickDelta, float scale, CallbackInfo ci) {
private void dinnerboneEntities(S state, MatrixStack matrices, float animationProgress, float bodyYaw, CallbackInfo ci) {
Rendering renderingModule = Modules.get().get(Rendering.class);
if (renderingModule == null) return;
if ((!(entity instanceof PlayerEntity)) && renderingModule.dinnerboneEnabled()) {
matrices.translate(0.0D, entity.getHeight() + 0.1F, 0.0D);
if ((!(state instanceof PlayerEntityRenderState)) && renderingModule.dinnerboneEnabled()) {
matrices.translate(0.0D, state.height + 0.1F, 0.0D);
matrices.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(180.0F));
}
}

View File

@@ -1,17 +1,18 @@
package anticope.rejects.mixin;
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket;
import net.minecraft.util.math.Vec3d;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.gen.Accessor;
import org.spongepowered.asm.mixin.gen.Invoker;
@Mixin(VehicleMoveC2SPacket.class)
public interface VehicleMoveC2SPacketAccessor {
@Mutable
@Accessor("x")
void setX(double x);
@Accessor("position")
Vec3d getPosition();
@Mutable
@Accessor("z")
void setZ(double z);
@Invoker("<init>")
static VehicleMoveC2SPacket create(Vec3d position, float yaw, float pitch, boolean onGround) {
throw new AssertionError();
}
}

View File

@@ -18,7 +18,7 @@ public class ModuleMixin {
@Mutable @Shadow public String title;
@Inject(method = "<init>", at = @At("TAIL"))
@Inject(method = "<init>*", at = @At("TAIL"))
private void onInit(Category category, String name, String description, String[] aliases, CallbackInfo info) {
if (RejectsConfig.get().duplicateModuleNames) {
this.name = RejectsUtils.getModuleName(name);

View File

@@ -66,7 +66,7 @@ public class AntiBot extends Module {
@EventHandler
public void onTick(TickEvent.Post tickEvent) {
for (Entity entity : mc.world.getEntities()) {
if (entity == null || !(entity instanceof PlayerEntity playerEntity)) continue;
if (!(entity instanceof PlayerEntity playerEntity)) continue;
if (removeInvisible.get() && !entity.isInvisible()) continue;
if (isBot(playerEntity)) entity.remove(Entity.RemovalReason.DISCARDED);

View File

@@ -11,6 +11,7 @@ import net.minecraft.network.packet.s2c.play.EntityVelocityUpdateS2CPacket;
import net.minecraft.network.packet.s2c.play.ExplosionS2CPacket;
import net.minecraft.network.packet.s2c.play.ParticleS2CPacket;
import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket;
import net.minecraft.util.math.Vec3d;
public class AntiCrash extends Module {
private final SettingGroup sgGeneral = settings.getDefaultGroup();
@@ -29,22 +30,25 @@ public class AntiCrash extends Module {
@EventHandler
private void onPacketReceive(PacketEvent.Receive event) {
if (event.packet instanceof ExplosionS2CPacket packet) {
if (/* outside of world */ packet.getX() > 30_000_000 || packet.getY() > 30_000_000 || packet.getZ() > 30_000_000 || packet.getX() < -30_000_000 || packet.getY() < -30_000_000 || packet.getZ() < -30_000_000 ||
// power too high
packet.getRadius() > 1000 ||
// too many blocks
packet.getAffectedBlocks().size() > 100_000 ||
Vec3d explodePos = packet.center();
// TODO: 1.21.3
Vec3d playerKnockback = new Vec3d(0, 0, 0);
if(packet.playerKnockback().isPresent()) {
playerKnockback = packet.playerKnockback().get();
}
if (/* outside of world */ explodePos.getX() > 30_000_000 || explodePos.getY() > 30_000_000 || explodePos.getZ() > 30_000_000 || explodePos.getX() < -30_000_000 || explodePos.getY() < -30_000_000 || explodePos.getZ() < -30_000_000 ||
// too much knockback
packet.getPlayerVelocityX() > 30_000_000 || packet.getPlayerVelocityY() > 30_000_000 || packet.getPlayerVelocityZ() > 30_000_000
playerKnockback.x > 30_000_000 || playerKnockback.y > 30_000_000 || playerKnockback.z > 30_000_000
// knockback can be negative?
|| packet.getPlayerVelocityX() < -30_000_000 || packet.getPlayerVelocityY() < -30_000_000 || packet.getPlayerVelocityZ() < -30_000_000
|| playerKnockback.x < -30_000_000 || playerKnockback.y < -30_000_000 || playerKnockback.z < -30_000_000
) cancel(event);
} else if (event.packet instanceof ParticleS2CPacket packet) {
// too many particles
if (packet.getCount() > 100_000) cancel(event);
} else if (event.packet instanceof PlayerPositionLookS2CPacket packet) {
Vec3d playerPos = packet.change().position();
// out of world movement
if (packet.getX() > 30_000_000 || packet.getY() > 30_000_000 || packet.getZ() > 30_000_000 || packet.getX() < -30_000_000 || packet.getY() < -30_000_000 || packet.getZ() < -30_000_000)
if (playerPos.x > 30_000_000 || playerPos.y > 30_000_000 || playerPos.z > 30_000_000 || playerPos.x < -30_000_000 || playerPos.y < -30_000_000 || playerPos.z < -30_000_000)
cancel(event);
} else if (event.packet instanceof EntityVelocityUpdateS2CPacket packet) {
// velocity

View File

@@ -54,9 +54,9 @@ public class ArrowDmg extends Module {
for (int i = 0; i < packets.get() / 2; i++) {
p.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(x,
y - 1e-10, z, true));
y - 1e-10, z, true, mc.player.horizontalCollision));
p.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(x,
y + 1e-10, z, false));
y + 1e-10, z, false, mc.player.horizontalCollision));
}
}

View File

@@ -124,7 +124,7 @@ public class AutoBedTrap extends Module {
if (cap >= bpt.get()) {
return true;
}
};
}
}
cap = 0;
return true;

View File

@@ -7,10 +7,14 @@ import meteordevelopment.meteorclient.settings.ItemListSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.gui.screen.recipebook.RecipeResultCollection;
import net.minecraft.item.Item;
import net.minecraft.recipe.RecipeEntry;
import net.minecraft.item.ItemStack;
import net.minecraft.recipe.RecipeDisplayEntry;
import net.minecraft.recipe.display.RecipeDisplay;
import net.minecraft.recipe.display.SlotDisplayContexts;
import net.minecraft.screen.CraftingScreenHandler;
import net.minecraft.screen.slot.SlotActionType;
@@ -24,7 +28,7 @@ public class AutoCraft extends Module {
private final Setting<List<Item>> items = sgGeneral.add(new ItemListSetting.Builder()
.name("items")
.description("Items you want to get crafted.")
.defaultValue(Arrays.asList())
.defaultValue(List.of())
.build()
);
@@ -55,12 +59,12 @@ public class AutoCraft extends Module {
@EventHandler
private void onTick(TickEvent.Post event) {
if (mc.interactionManager == null) return;
if (!Utils.canUpdate() || mc.interactionManager == null) return;
if (items.get().isEmpty()) return;
if (!(mc.player.currentScreenHandler instanceof CraftingScreenHandler)) return;
if (antiDesync.get())
mc.player.getInventory().updateItems();
@@ -70,11 +74,19 @@ public class AutoCraft extends Module {
List<Item> itemList = items.get();
List<RecipeResultCollection> recipeResultCollectionList = mc.player.getRecipeBook().getOrderedResults();
for (RecipeResultCollection recipeResultCollection : recipeResultCollectionList) {
for (RecipeEntry<?> recipe : recipeResultCollection.getRecipes(true)) {
if (!itemList.contains(recipe.value().getResult(mc.world.getRegistryManager()).getItem())) continue;
mc.interactionManager.clickRecipe(currentScreenHandler.syncId, recipe, craftAll.get());
mc.interactionManager.clickSlot(currentScreenHandler.syncId, 0, 1,
drop.get() ? SlotActionType.THROW : SlotActionType.QUICK_MOVE, mc.player);
// Get craftable recipes only
List<RecipeDisplayEntry> craftRecipes = recipeResultCollection.filter(RecipeResultCollection.RecipeFilterMode.CRAFTABLE);
for (RecipeDisplayEntry recipe : craftRecipes) {
RecipeDisplay recipeDisplay = recipe.display();
List<ItemStack> resultStacks = recipeDisplay.result().getStacks(SlotDisplayContexts.createParameters(mc.world));
for (ItemStack resultStack : resultStacks) {
// Check if the result item is in the item list
if (!itemList.contains(resultStack.getItem())) continue;
mc.interactionManager.clickRecipe(currentScreenHandler.syncId, recipe.id(), craftAll.get());
mc.interactionManager.clickSlot(currentScreenHandler.syncId, 0, 1,
drop.get() ? SlotActionType.THROW : SlotActionType.QUICK_MOVE, mc.player);
}
}
}
}

View File

@@ -30,6 +30,7 @@ import java.util.ArrayList;
import java.util.List;
public class AutoPot extends Module {
@SuppressWarnings("unchecked")
private static final Class<? extends Module>[] AURAS = new Class[]{KillAura.class, CrystalAura.class, AnchorAura.class, BedAura.class};
private final SettingGroup sgGeneral = settings.getDefaultGroup();

View File

@@ -132,23 +132,26 @@ public class AutoSoup extends Module {
}
private boolean isClickable(HitResult hitResult) {
if (hitResult == null)
return false;
if (hitResult instanceof EntityHitResult) {
Entity entity = ((EntityHitResult) mc.crosshairTarget).getEntity();
return entity instanceof VillagerEntity
|| entity instanceof TameableEntity;
}
if (hitResult instanceof BlockHitResult) {
BlockPos pos = ((BlockHitResult) mc.crosshairTarget).getBlockPos();
if (pos == null)
switch (hitResult) {
case null -> {
return false;
}
case EntityHitResult entityHitResult -> {
Entity entity = ((EntityHitResult) mc.crosshairTarget).getEntity();
return entity instanceof VillagerEntity
|| entity instanceof TameableEntity;
}
case BlockHitResult blockHitResult -> {
BlockPos pos = ((BlockHitResult) mc.crosshairTarget).getBlockPos();
if (pos == null)
return false;
Block block = mc.world.getBlockState(pos).getBlock();
return block instanceof BlockWithEntity
|| block instanceof CraftingTableBlock;
Block block = mc.world.getBlockState(pos).getBlock();
return block instanceof BlockWithEntity
|| block instanceof CraftingTableBlock;
}
default -> {
}
}
return false;

View File

@@ -113,7 +113,7 @@ public class AutoTNT extends Module {
@EventHandler
private void onPostTick(TickEvent.Post event) {
// Ignition
if (ignite.get() && blocksToIgnite.size() > 0) {
if (ignite.get() && !blocksToIgnite.isEmpty()) {
if (igniteTick > igniteDelay.get()) {
// Sort based on closest tnt
blocksToIgnite.sort(Comparator.comparingDouble(PlayerUtils::distanceTo));

View File

@@ -139,7 +139,7 @@ public class AutoWither extends Module {
// Register
BlockIterator.register(horizontalRadius.get(), verticalRadius.get(), (blockPos, blockState) -> {
Direction dir = Direction.fromRotation(Rotations.getYaw(blockPos)).getOpposite();
Direction dir = Direction.fromHorizontalDegrees(Rotations.getYaw(blockPos)).getOpposite();
if (isValidSpawn(blockPos, dir)) withers.add(witherPool.get().set(blockPos, dir));
});
}
@@ -267,15 +267,15 @@ public class AutoWither extends Module {
BlockPos leftHead = wither.foot.up().up().offset(wither.axis, -1);
BlockPos rightHead = wither.foot.up().up().offset(wither.axis, 1);
event.renderer.box((double) midHead.getX() + 0.2, (double) midHead.getX(), (double) midHead.getX() + 0.2,
event.renderer.box((double) midHead.getX() + 0.2, midHead.getX(), (double) midHead.getX() + 0.2,
(double) midHead.getX() + 0.8, (double) midHead.getX() + 0.7, (double) midHead.getX() + 0.8,
sideColor.get(), lineColor.get(), shapeMode.get(), 0);
event.renderer.box((double) leftHead.getX() + 0.2, (double) leftHead.getX(), (double) leftHead.getX() + 0.2,
event.renderer.box((double) leftHead.getX() + 0.2, leftHead.getX(), (double) leftHead.getX() + 0.2,
(double) leftHead.getX() + 0.8, (double) leftHead.getX() + 0.7, (double) leftHead.getX() + 0.8,
sideColor.get(), lineColor.get(), shapeMode.get(), 0);
event.renderer.box((double) rightHead.getX() + 0.2, (double) rightHead.getX(), (double) rightHead.getX() + 0.2,
event.renderer.box((double) rightHead.getX() + 0.2, rightHead.getX(), (double) rightHead.getX() + 0.2,
(double) rightHead.getX() + 0.8, (double) rightHead.getX() + 0.7, (double) rightHead.getX() + 0.8,
sideColor.get(), lineColor.get(), shapeMode.get(), 0);
}

View File

@@ -130,7 +130,7 @@ public class BoatPhase extends Module {
else if (fall.get()) velY -= fallSpeed.get() / 20;
} else if (fall.get()) velY -= fallSpeed.get() / 20;
((IVec3d) boat.getVelocity()).set(velX,velY,velZ);
((IVec3d) boat.getVelocity()).meteor$set(velX,velY,velZ);
}
}
}

View File

@@ -142,9 +142,10 @@ public class ChorusExploit extends Module {
if (event.packet instanceof PlayerPositionLookS2CPacket posPacket && ateChorus) {
event.setCancelled(true);
if (positionMode.get() == PositionMode.PosLook) {
cposX = posPacket.getX();
cposY = posPacket.getY();
cposZ = posPacket.getZ();
Vec3d pos = posPacket.change().position();
cposX = pos.x;
cposY = pos.y;
cposZ = pos.z;
gotPosition = true;
}
}

View File

@@ -144,12 +144,12 @@ public class Confuse extends Module {
if (mc.world.getBlockState(BlockPos.ofFloored(goal.x, goal.y, goal.z)).getBlock() == Blocks.AIR) {
hit = mc.world.raycast(new RaycastContext(mc.player.getPos(), goal, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.ANY, mc.player));
if (!moveThroughBlocks.get() && hit.isInsideBlock()) {
delayWaited = (int) (delay.get() - 1);
delayWaited = delay.get() - 1;
break;
}
mc.player.updatePosition(goal.x, goal.y, goal.z);
} else {
delayWaited = (int) (delay.get() - 1);
delayWaited = delay.get() - 1;
}
break;
@@ -159,7 +159,7 @@ public class Confuse extends Module {
Vec3d goal2 = entityPos.add(diff1);
hit = mc.world.raycast(new RaycastContext(mc.player.getPos(), goal2, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.ANY, mc.player));
if (!moveThroughBlocks.get() && hit.isInsideBlock()) {
delayWaited = (int) (delay.get() - 1);
delayWaited = delay.get() - 1;
break;
}
mc.player.updatePosition(goal2.x, goal2.y, goal2.z);

View File

@@ -99,11 +99,11 @@ public class CoordLogger extends Module {
EntityPositionS2CPacket packet = (EntityPositionS2CPacket) event.packet;
try {
Entity entity = mc.world.getEntityById(packet.getId());
Entity entity = mc.world.getEntityById(packet.entityId());
// Player teleport
if (entity.getType().equals(EntityType.PLAYER) && players.get()) {
Vec3d packetPosition = new Vec3d(packet.getX(), packet.getY(), packet.getZ());
Vec3d packetPosition = packet.change().position();
Vec3d playerPosition = entity.getPos();
if (playerPosition.distanceTo(packetPosition) >= minDistance.get()) {
@@ -113,7 +113,7 @@ public class CoordLogger extends Module {
// World teleport
else if (entity.getType().equals(EntityType.WOLF) && wolves.get()) {
Vec3d packetPosition = new Vec3d(packet.getX(), packet.getY(), packet.getZ());
Vec3d packetPosition = packet.change().position();
Vec3d wolfPosition = entity.getPos();
UUID ownerUuid = ((TameableEntity) entity).getOwnerUuid();
@@ -152,7 +152,7 @@ public class CoordLogger extends Module {
public MutableText formatMessage(String message, Vec3d coords) {
MutableText text = Text.literal(message);
text.append(ChatUtils.formatCoords(coords));
text.append(Formatting.GRAY.toString()+".");
text.append(Formatting.GRAY +".");
return text;
}

View File

@@ -54,9 +54,10 @@ public class CustomPackets extends Module {
@EventHandler
private void onCustomPayloadPacket(PacketEvent.Receive event) {
if (event.packet instanceof CustomPayloadS2CPacket packet) {
switch (packet.payload().getId().toString()) {
case "badlion:mods" -> event.setCancelled(onBadlionModsPacket(packet));
default -> onUnknownPacket(packet);
if (packet.payload().getId().toString().equals("badlion:mods")) {
event.setCancelled(onBadlionModsPacket(packet));
} else {
onUnknownPacket(packet);
}
}
}

View File

@@ -8,7 +8,6 @@ import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.ElytraItem;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
@@ -72,18 +71,17 @@ public class ExtraElytra extends Module {
if (chest.getItem() != Items.ELYTRA)
return;
if (mc.player.isFallFlying()) {
if (mc.player.isGliding()) {
if (stopInWater.get() && mc.player.isTouchingWater()) {
sendStartStopPacket();
return;
}
controlSpeed();
controlHeight();
return;
}
if (ElytraItem.isUsable(chest) && mc.options.jumpKey.isPressed())
if (chest.getDamage() < chest.getMaxDamage() - 1 && mc.options.jumpKey.isPressed())
doInstantFly();
}

View File

@@ -112,14 +112,16 @@ public class FullFlight extends Module {
mc.player.getZ(),
packet.getYaw(0),
packet.getPitch(0),
packet.isOnGround()
packet.isOnGround(),
packet.horizontalCollision()
);
} else {
fullPacket = new PlayerMoveC2SPacket.PositionAndOnGround(
mc.player.getX(),
mc.player.getY(),
mc.player.getZ(),
packet.isOnGround()
packet.isOnGround(),
packet.horizontalCollision()
);
}
event.cancel();
@@ -146,8 +148,8 @@ public class FullFlight extends Module {
if (blockCollisions.findAny().isPresent()) break;
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY() - 0.4, mc.player.getZ(), mc.player.isOnGround()));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround()));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY() - 0.4, mc.player.getZ(), mc.player.isOnGround(), mc.player.horizontalCollision));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround(), mc.player.horizontalCollision));
}
case Old -> {
Box box = mc.player.getBoundingBox();
@@ -161,20 +163,20 @@ public class FullFlight extends Module {
double groundExtra = ground + 0.1D;
for (double posY = mc.player.getY(); posY > groundExtra; posY -= 4D) {
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), posY, mc.player.getZ(), true));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), posY, mc.player.getZ(), true, mc.player.horizontalCollision));
if (posY - 4D < groundExtra) break; // Prevent next step
}
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), groundExtra, mc.player.getZ(), true));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), groundExtra, mc.player.getZ(), true, mc.player.horizontalCollision));
for (double posY = groundExtra; posY < mc.player.getY(); posY += 4D) {
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), posY, mc.player.getZ(), mc.player.isOnGround()));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), posY, mc.player.getZ(), mc.player.isOnGround(), mc.player.horizontalCollision));
if (posY + 4D > mc.player.getY()) break; // Prevent next step
}
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround()));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround(), mc.player.horizontalCollision));
}
}

View File

@@ -29,7 +29,7 @@ public class Jetpack extends Module {
@EventHandler
private void onTick(TickEvent.Pre event) {
if (mc.options.jumpKey.isPressed()) {
((IVec3d) mc.player.getVelocity()).setY(jetpackSpeed.get());
((IVec3d) mc.player.getVelocity()).meteor$setY(jetpackSpeed.get());
}
}

View File

@@ -31,8 +31,8 @@ public class KnockbackPlus extends Module {
@EventHandler
private void onSendPacket(PacketEvent.Send event) {
if (event.packet instanceof IPlayerInteractEntityC2SPacket packet && packet.getType() == PlayerInteractEntityC2SPacket.InteractType.ATTACK) {
Entity entity = packet.getEntity();
if (event.packet instanceof IPlayerInteractEntityC2SPacket packet && packet.meteor$getType() == PlayerInteractEntityC2SPacket.InteractType.ATTACK) {
Entity entity = packet.meteor$getEntity();
if (!(entity instanceof LivingEntity) || (entity != Modules.get().get(KillAura.class).getTarget() && ka.get()))
return;

View File

@@ -18,6 +18,7 @@ import net.minecraft.util.math.Box;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.Heightmap;
import net.minecraft.world.chunk.WorldChunk;
import java.util.Collections;
@@ -187,8 +188,8 @@ public class NewChunks extends Module {
for (int x = 0; x < 16; x++) {
for (int y = mc.world.getBottomY(); y < mc.world.getTopY(); y++) {
for (int z = 0; z < 16; z++) {
for (int z = 0; z < 16; z++) {
for (int y = mc.world.getBottomY(); y < mc.world.getTopY(Heightmap.Type.MOTION_BLOCKING, x, z); y++) {
FluidState fluid = chunk.getFluidState(x, y, z);
if (!fluid.isEmpty() && !fluid.isStill()) {

View File

@@ -4,11 +4,11 @@ import anticope.rejects.MeteorRejectsAddon;
import meteordevelopment.meteorclient.events.entity.player.PlayerMoveEvent;
import meteordevelopment.meteorclient.events.entity.player.SendMovementPacketsEvent;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.mixin.PlayerPositionLookS2CPacketAccessor;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.entity.player.PlayerPosition;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.network.packet.c2s.play.TeleportConfirmC2SPacket;
import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket;
@@ -128,7 +128,7 @@ public class PacketFly extends Module {
double speed = 0.0;
boolean checkCollisionBoxes = checkHitBoxes();
speed = mc.player.input.jumping && (checkCollisionBoxes || !(mc.player.input.movementForward != 0.0 || mc.player.input.movementSideways != 0.0)) ? (antiKick.get() && !checkCollisionBoxes ? (resetCounter(downDelayFlying.get()) ? -0.032 : verticalSpeed.get()/20) : verticalSpeed.get()/20) : (mc.player.input.sneaking ? verticalSpeed.get()/-20 : (!checkCollisionBoxes ? (resetCounter(downDelay.get()) ? (antiKick.get() ? -0.04 : 0.0) : 0.0) : 0.0));
speed = mc.player.input.playerInput.jump() && (checkCollisionBoxes || !(mc.player.input.movementForward != 0.0 || mc.player.input.movementSideways != 0.0)) ? (antiKick.get() && !checkCollisionBoxes ? (resetCounter(downDelayFlying.get()) ? -0.032 : verticalSpeed.get()/20) : verticalSpeed.get()/20) : (mc.player.input.playerInput.sneak() ? verticalSpeed.get()/-20 : (!checkCollisionBoxes ? (resetCounter(downDelay.get()) ? (antiKick.get() ? -0.04 : 0.0) : 0.0) : 0.0));
Vec3d horizontal = PlayerUtils.getHorizontalVelocity(horizontalSpeed.get());
@@ -154,12 +154,17 @@ public class PacketFly extends Module {
public void onPacketReceive(PacketEvent.Receive event) {
if (event.packet instanceof PlayerPositionLookS2CPacket && !(mc.player == null || mc.world == null)) {
PlayerPositionLookS2CPacket packet = (PlayerPositionLookS2CPacket) event.packet;
PlayerPosition oldPos = packet.change();
if (setYaw.get()) {
((PlayerPositionLookS2CPacketAccessor) event.packet).setPitch(mc.player.getPitch());
((PlayerPositionLookS2CPacketAccessor) event.packet).setYaw(mc.player.getYaw());
PlayerPosition newPos = new PlayerPosition(oldPos.position(), oldPos.deltaMovement(), mc.player.getYaw(), mc.player.getPitch());
event.packet = PlayerPositionLookS2CPacket.of(
packet.teleportId(),
newPos,
packet.relatives()
);
}
if (setID.get()) {
teleportID = packet.getTeleportId();
teleportID = packet.teleportId();
}
}
}
@@ -180,9 +185,9 @@ public class PacketFly extends Module {
Vec3d vec = new Vec3d(x, y, z);
Vec3d position = mc.player.getPos().add(vec);
Vec3d outOfBoundsVec = outOfBoundsVec(vec, position);
packetSender(new PlayerMoveC2SPacket.PositionAndOnGround(position.x, position.y, position.z, mc.player.isOnGround()));
packetSender(new PlayerMoveC2SPacket.PositionAndOnGround(position.x, position.y, position.z, mc.player.isOnGround(), mc.player.horizontalCollision));
if (invalidPacket.get()) {
packetSender(new PlayerMoveC2SPacket.PositionAndOnGround(outOfBoundsVec.x, outOfBoundsVec.y, outOfBoundsVec.z, mc.player.isOnGround()));
packetSender(new PlayerMoveC2SPacket.PositionAndOnGround(outOfBoundsVec.x, outOfBoundsVec.y, outOfBoundsVec.z, mc.player.isOnGround(), mc.player.horizontalCollision));
}
if (setPos.get()) {
mc.player.setPos(position.x, position.y, position.z);

View File

@@ -7,38 +7,17 @@ import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import net.minecraft.client.gl.PostEffectProcessor;
import net.minecraft.client.render.DefaultFramebufferSet;
import net.minecraft.util.Identifier;
import java.io.IOException;
public class Rendering extends Module {
public enum Shader {
None,
Notch,
FXAA,
Art,
Bumpy,
Blobs,
Blobs2,
Pencil,
Vibrant,
Deconverge,
Flip,
Invert,
NTSC,
Outline,
Phosphor,
Scanline,
Sobel,
Bits,
Desaturate,
Green,
Blur,
Wobble,
Antialias,
Creeper,
Spider
Invert,
Spider,
}
private final SettingGroup sgInvisible = settings.createGroup("Invisible");
@@ -102,17 +81,16 @@ public class Rendering extends Module {
}
public void onChanged(Shader s) {
String name;
if (s == Shader.Vibrant) name = "color_convolve";
else if (s == Shader.Scanline) name = "scan_pincushion";
else name = s.toString().toLowerCase();
Identifier shaderID = Identifier.of(String.format("shaders/post/%s.json", name));
try {
PostEffectProcessor shader = new PostEffectProcessor(mc.getTextureManager(), mc.getResourceManager(), mc.getFramebuffer(), shaderID);
this.shader = shader;
} catch (IOException e) {
if (mc.world == null) return;
String name = s.toString().toLowerCase();
if (name.equals("none")) {
this.shader = null;
return;
}
Identifier shaderID = Identifier.ofVanilla(name);
this.shader = mc.getShaderLoader().loadPostEffect(shaderID, DefaultFramebufferSet.MAIN_ONLY);
}
public boolean renderStructureVoid() {

View File

@@ -8,6 +8,7 @@ import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket;
import net.minecraft.util.math.Vec3d;
public class RoboWalk extends Module {
public RoboWalk() {
@@ -30,11 +31,11 @@ public class RoboWalk extends Module {
((PlayerMoveC2SPacketAccessor) packet).setX(x);
((PlayerMoveC2SPacketAccessor) packet).setZ(z);
} else if (event.packet instanceof VehicleMoveC2SPacket packet) {
double x = smooth(packet.getX());
double z = smooth(packet.getZ());
Vec3d pos = ((VehicleMoveC2SPacketAccessor) (Object) packet).getPosition();
double x = smooth(pos.getX());
double z = smooth(pos.getZ());
((VehicleMoveC2SPacketAccessor) packet).setX(x);
((VehicleMoveC2SPacketAccessor) packet).setZ(z);
event.packet = VehicleMoveC2SPacketAccessor.create(new Vec3d(x, pos.getY(), z), packet.yaw(), packet.pitch(), packet.onGround());
}
}
}

View File

@@ -81,13 +81,13 @@ public class ShieldBypass extends Module {
event.cancel();
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(newPos.getX(), newPos.getY(), newPos.getZ(), true));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(newPos.getX(), newPos.getY(), newPos.getZ(), true, false));
mc.getNetworkHandler().sendPacket(PlayerInteractEntityC2SPacket.attack(e, mc.player.isSneaking()));
mc.getNetworkHandler().sendPacket(new HandSwingC2SPacket(mc.player.getActiveHand()));
mc.player.resetLastAttackedTicks();
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), true));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), true, mc.player.horizontalCollision));
}
}
}

View File

@@ -17,12 +17,14 @@ import meteordevelopment.meteorclient.utils.render.color.Color;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gl.ShaderProgramKeys;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.option.Perspective;
import net.minecraft.client.render.*;
import net.minecraft.client.render.entity.LivingEntityRenderer;
import net.minecraft.client.render.entity.PlayerEntityRenderer;
import net.minecraft.client.render.entity.model.PlayerEntityModel;
import net.minecraft.client.render.entity.state.PlayerEntityRenderState;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
@@ -61,7 +63,7 @@ public class SkeletonESP extends Module {
MatrixStack matrixStack = event.matrices;
float g = event.tickDelta;
RenderSystem.setShader(GameRenderer::getPositionColorProgram);
RenderSystem.setShader(ShaderProgramKeys.POSITION_COLOR);
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.disableDepthTest();
@@ -79,8 +81,8 @@ public class SkeletonESP extends Module {
PlayerEntity playerEntity = (PlayerEntity) entity;
Vec3d footPos = getEntityRenderPosition(playerEntity, g);
PlayerEntityRenderer livingEntityRenderer = (PlayerEntityRenderer) (LivingEntityRenderer<?, ?>) mc.getEntityRenderDispatcher().getRenderer(playerEntity);
PlayerEntityModel<PlayerEntity> playerEntityModel = (PlayerEntityModel) livingEntityRenderer.getModel();
PlayerEntityRenderer livingEntityRenderer = (PlayerEntityRenderer) (LivingEntityRenderer<?, ?, ?>) mc.getEntityRenderDispatcher().getRenderer(playerEntity);
PlayerEntityModel playerEntityModel = livingEntityRenderer.getModel();
float h = MathHelper.lerpAngleDegrees(g, playerEntity.prevBodyYaw, playerEntity.bodyYaw);
if (mc.player == entity && Rotations.rotationTimer < rotationHoldTicks) h = Rotations.serverYaw;
@@ -94,12 +96,17 @@ public class SkeletonESP extends Module {
float m = playerEntity.getPitch(g);
if (mc.player == entity && Rotations.rotationTimer < rotationHoldTicks) m = Rotations.serverPitch;
playerEntityModel.animateModel(playerEntity, q, p, g);
playerEntityModel.setAngles(playerEntity, q, p, o, k, m);
PlayerEntityRenderState renderState = new PlayerEntityRenderState();
renderState.limbFrequency = q;
renderState.limbAmplitudeMultiplier = p;
renderState.age = o;
renderState.yawDegrees = k;
renderState.pitch = m;
playerEntityModel.setAngles(renderState);
boolean swimming = playerEntity.isInSwimmingPose();
boolean sneaking = playerEntity.isSneaking();
boolean flying = playerEntity.isFallFlying();
boolean flying = playerEntity.isGliding();
ModelPart head = playerEntityModel.head;
ModelPart leftArm = playerEntityModel.leftArm;
@@ -189,7 +196,7 @@ public class SkeletonESP extends Module {
RenderSystem.disableBlend();
RenderSystem.enableDepthTest();
RenderSystem.depthMask(true);
RenderSystem.setShader(GameRenderer::getPositionColorProgram);
RenderSystem.setShader(ShaderProgramKeys.POSITION_COLOR);
}
private void rotate(MatrixStack matrix, ModelPart modelPart) {

View File

@@ -114,7 +114,7 @@ public class SoundLocator extends Module {
if(whitelist.get()) {
// Whitelist ON
for (SoundEvent sound : sounds.get()) {
if (sound.getId().equals(event.sound.getId())) {
if (sound.id().equals(event.sound.getId())) {
printSound(event.sound);
break;
}

View File

@@ -1,6 +1,7 @@
package anticope.rejects.modules;
import anticope.rejects.MeteorRejectsAddon;
import anticope.rejects.utils.WorldUtils;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
@@ -139,22 +140,9 @@ public class TreeAura extends Module {
return false;
}
private List<BlockPos> getBlocks(BlockPos centerPos, int radius, int height) {
ArrayList<BlockPos> blocks = new ArrayList<>();
for (int i = centerPos.getX() - radius; i < centerPos.getX() + radius; i++) {
for (int j = centerPos.getY() - height; j < centerPos.getY() + height; j++) {
for (int k = centerPos.getZ() - radius; k < centerPos.getZ() + radius; k++) {
BlockPos pos = new BlockPos(i, j, k);
if (distanceBetween(centerPos, pos) <= radius && !blocks.contains(pos)) blocks.add(pos);
}
}
}
return blocks;
}
private List<BlockPos> findSaplings(BlockPos centerPos, int radius, int height) {
ArrayList<BlockPos> blocc = new ArrayList<>();
List<BlockPos> blocks = getBlocks(centerPos, radius, height);
List<BlockPos> blocks = WorldUtils.getSphere(centerPos, radius, height);
for (BlockPos b : blocks) if (isSapling(b)) blocc.add(b);
return blocc;
}
@@ -169,7 +157,7 @@ public class TreeAura extends Module {
private List<BlockPos> getPlantLocations(BlockPos centerPos, int radius, int height) {
ArrayList<BlockPos> blocc = new ArrayList<>();
List<BlockPos> blocks = getBlocks(centerPos, radius, height);
List<BlockPos> blocks = WorldUtils.getSphere(centerPos, radius, height);
for (BlockPos b : blocks) if (canPlant(b)) blocc.add(b);
return blocc;
}

View File

@@ -132,27 +132,27 @@ public class GiveUtils {
}
stack.set(DataComponentTypes.POTION_CONTENTS, new PotionContentsComponent(Optional.empty(), Optional.empty(),
effects));
effects, Optional.empty()));
stack.set(DataComponentTypes.CUSTOM_NAME, Text.literal("Lingering Potion of Trolling"));
return stack;
});
PRESETS.put("32k", (preview) -> {
enchantmentRegistry = mc.world.getRegistryManager().get(RegistryKeys.ENCHANTMENT);
enchantmentRegistry = mc.world.getRegistryManager().getOrThrow(RegistryKeys.ENCHANTMENT);
if (preview || enchantmentRegistry == null) return Items.DIAMOND_SWORD.getDefaultStack();
ItemStack stack = Items.DIAMOND_SWORD.getDefaultStack();
stack.apply(DataComponentTypes.ENCHANTMENTS, ItemEnchantmentsComponent.DEFAULT, component -> {
ItemEnchantmentsComponent.Builder builder = new ItemEnchantmentsComponent.Builder(component);
builder.add(enchantmentRegistry.entryOf(Enchantments.SHARPNESS), 255);
builder.add(enchantmentRegistry.entryOf(Enchantments.KNOCKBACK), 255);
builder.add(enchantmentRegistry.entryOf(Enchantments.FIRE_ASPECT), 255);
builder.add(enchantmentRegistry.entryOf(Enchantments.LOOTING), 10);
builder.add(enchantmentRegistry.entryOf(Enchantments.SWEEPING_EDGE), 3);
builder.add(enchantmentRegistry.entryOf(Enchantments.UNBREAKING), 255);
builder.add(enchantmentRegistry.entryOf(Enchantments.MENDING), 1);
builder.add(enchantmentRegistry.entryOf(Enchantments.VANISHING_CURSE), 1);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.SHARPNESS), 255);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.KNOCKBACK), 255);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.FIRE_ASPECT), 255);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.LOOTING), 10);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.SWEEPING_EDGE), 3);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.UNBREAKING), 255);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.MENDING), 1);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.VANISHING_CURSE), 1);
return builder.build();
});

View File

@@ -48,8 +48,8 @@ public class Ore {
public static Map<RegistryKey<Biome>, List<Ore>> getRegistry(Dimension dimension) {
RegistryWrapper.WrapperLookup registry = BuiltinRegistries.createWrapperLookup();
RegistryWrapper.Impl<PlacedFeature> features = registry.getWrapperOrThrow(RegistryKeys.PLACED_FEATURE);
var reg = registry.getWrapperOrThrow(RegistryKeys.WORLD_PRESET).getOrThrow(WorldPresets.DEFAULT).value().createDimensionsRegistryHolder().dimensions();
RegistryWrapper.Impl<PlacedFeature> features = registry.getOrThrow(RegistryKeys.PLACED_FEATURE);
var reg = registry.getOrThrow(RegistryKeys.WORLD_PRESET).getOrThrow(WorldPresets.DEFAULT).value().createDimensionsRegistryHolder().dimensions();
var dim = switch (dimension) {
case Overworld -> reg.get(DimensionOptions.OVERWORLD);

View File

@@ -70,9 +70,9 @@ public class RejectsUtils {
double xDir = Math.cos(Math.toRadians(dir + 90));
double zDir = Math.sin(Math.toRadians(dir + 90));
((IVec3d) event.movement).setXZ(xDir * speed, zDir * speed);
((IVec3d) event.movement).meteor$setXZ(xDir * speed, zDir * speed);
} else {
((IVec3d) event.movement).setXZ(0, 0);
((IVec3d) event.movement).meteor$setXZ(0, 0);
}
float ySpeed = 0;
@@ -81,7 +81,7 @@ public class RejectsUtils {
ySpeed += speed;
if (mc.options.sneakKey.isPressed())
ySpeed -= speed;
((IVec3d) event.movement).setY(verticalSpeedMatch ? ySpeed : ySpeed / 2);
((IVec3d) event.movement).meteor$setY(verticalSpeedMatch ? ySpeed : ySpeed / 2);
return ySpeed;
}

View File

@@ -41,13 +41,13 @@ public class WorldUtils {
public static boolean interact(BlockPos pos, FindItemResult findItemResult, boolean rotate) {
if (!findItemResult.found()) return false;
Runnable action = () -> {
boolean wasSneaking = mc.player.input.sneaking;
mc.player.input.sneaking = false;
boolean wasSneaking = mc.player.isSneaking();
mc.player.setSneaking(false);
InvUtils.swap(findItemResult.slot(), true);
mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.ofCenter(pos), Direction.UP, pos, false));
mc.player.swingHand(Hand.MAIN_HAND);
InvUtils.swapBack();
mc.player.input.sneaking = wasSneaking;
mc.player.setSneaking(wasSneaking);
};
if (rotate) Rotations.rotate(Rotations.getYaw(pos), Rotations.getPitch(pos), -100, action);
else action.run();

View File

@@ -36,7 +36,7 @@
"github:sha": "${gh_hash}"
},
"depends": {
"java": ">=16",
"java": ">=21",
"minecraft": "~${mc_version}",
"meteor-client": "*"
}

View File

@@ -1,3 +1,3 @@
accessWidener v1 named
accessWidener v2 named
accessible class net/minecraft/network/packet/c2s/play/PlayerInteractEntityC2SPacket$InteractType