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:
15
build.gradle
15
build.gradle
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '1.7-SNAPSHOT'
|
id 'fabric-loom' version '1.9-SNAPSHOT'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_21
|
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_21
|
||||||
@@ -18,6 +18,11 @@ repositories {
|
|||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://jitpack.io' }
|
||||||
maven { url 'https://maven.duti.dev/releases' }
|
maven { url 'https://maven.duti.dev/releases' }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loom {
|
||||||
|
accessWidenerPath = file("src/main/resources/meteor-rejects.accesswidener")
|
||||||
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
// configuration that holds jars to include in the jar
|
// configuration that holds jars to include in the jar
|
||||||
extraLibs
|
extraLibs
|
||||||
@@ -34,7 +39,7 @@ dependencies {
|
|||||||
mappings "net.fabricmc:yarn:${project.yarn_version}:v2"
|
mappings "net.fabricmc:yarn:${project.yarn_version}:v2"
|
||||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
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"
|
modCompileOnly "meteordevelopment:baritone:${project.baritone_version}-SNAPSHOT"
|
||||||
|
|
||||||
// seed .locate and ore sim
|
// seed .locate and ore sim
|
||||||
@@ -53,10 +58,6 @@ dependencies {
|
|||||||
configurations.implementation.extendsFrom(configurations.extraLibs)
|
configurations.implementation.extendsFrom(configurations.extraLibs)
|
||||||
}
|
}
|
||||||
|
|
||||||
loom {
|
|
||||||
accessWidenerPath = file("src/main/resources/meteor-rejects.accesswidener")
|
|
||||||
}
|
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
inputs.property "version", project.version
|
inputs.property "version", project.version
|
||||||
|
|
||||||
@@ -70,7 +71,7 @@ processResources {
|
|||||||
|
|
||||||
jar {
|
jar {
|
||||||
from("LICENSE") {
|
from("LICENSE") {
|
||||||
rename { "${it}_${project.archivesBaseName}"}
|
rename { "${it}_${project.archivesBaseName}" }
|
||||||
}
|
}
|
||||||
from {
|
from {
|
||||||
configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) }
|
configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) }
|
||||||
|
|||||||
@@ -2,14 +2,13 @@
|
|||||||
org.gradle.jvmargs=-Xmx2G
|
org.gradle.jvmargs=-Xmx2G
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
minecraft_version=1.21
|
minecraft_version=1.21.4
|
||||||
yarn_version=1.21+build.2
|
yarn_version=1.21.4+build.8
|
||||||
loader_version=0.15.11
|
loader_version=0.16.9
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 0.3
|
mod_version = 0.3
|
||||||
maven_group = anticope.rejects
|
maven_group = anticope.rejects
|
||||||
archives_base_name = meteor-rejects-addon
|
archives_base_name = meteor-rejects-addon
|
||||||
|
|
||||||
meteor_version=0.5.8
|
baritone_version=1.21.4
|
||||||
baritone_version=1.20.6
|
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
298
gradlew
vendored
298
gradlew
vendored
@@ -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");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with 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
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
# Resolve links: $0 may be a link
|
# Resolve links: $0 may be a link
|
||||||
PRG="$0"
|
app_path=$0
|
||||||
# Need this for relative symlinks.
|
|
||||||
while [ -h "$PRG" ] ; do
|
# Need this for daisy-chained symlinks.
|
||||||
ls=`ls -ld "$PRG"`
|
while
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
if expr "$link" : '/.*' > /dev/null; then
|
[ -h "$app_path" ]
|
||||||
PRG="$link"
|
do
|
||||||
else
|
ls=$( ls -ld "$app_path" )
|
||||||
PRG=`dirname "$PRG"`"/$link"
|
link=${ls#*' -> '}
|
||||||
fi
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
SAVED="`pwd`"
|
|
||||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
|
||||||
APP_HOME="`pwd -P`"
|
|
||||||
cd "$SAVED" >/dev/null
|
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
# This is normally unused
|
||||||
APP_BASE_NAME=`basename "$0"`
|
# 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.
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
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.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD=maximum
|
||||||
|
|
||||||
warn () {
|
warn () {
|
||||||
echo "$*"
|
echo "$*"
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
die () {
|
die () {
|
||||||
echo
|
echo
|
||||||
echo "$*"
|
echo "$*"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
# OS specific support (must be 'true' or 'false').
|
||||||
cygwin=false
|
cygwin=false
|
||||||
msys=false
|
msys=false
|
||||||
darwin=false
|
darwin=false
|
||||||
nonstop=false
|
nonstop=false
|
||||||
case "`uname`" in
|
case "$( uname )" in #(
|
||||||
CYGWIN* )
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
cygwin=true
|
Darwin* ) darwin=true ;; #(
|
||||||
;;
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
Darwin* )
|
NONSTOP* ) nonstop=true ;;
|
||||||
darwin=true
|
|
||||||
;;
|
|
||||||
MSYS* | MINGW* )
|
|
||||||
msys=true
|
|
||||||
;;
|
|
||||||
NONSTOP* )
|
|
||||||
nonstop=true
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
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 [ -n "$JAVA_HOME" ] ; then
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
else
|
else
|
||||||
JAVACMD="$JAVA_HOME/bin/java"
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
fi
|
fi
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
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."
|
location of your Java installation."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD="java"
|
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
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
case $MAX_FD in #(
|
||||||
if [ $? -eq 0 ] ; then
|
max*)
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
MAX_FD="$MAX_FD_LIMIT"
|
# shellcheck disable=SC2039,SC3045
|
||||||
fi
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
ulimit -n $MAX_FD
|
warn "Could not query maximum file descriptor limit"
|
||||||
if [ $? -ne 0 ] ; then
|
esac
|
||||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
case $MAX_FD in #(
|
||||||
fi
|
'' | soft) :;; #(
|
||||||
else
|
*)
|
||||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
fi
|
# shellcheck disable=SC2039,SC3045
|
||||||
fi
|
ulimit -n "$MAX_FD" ||
|
||||||
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
# 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" ;;
|
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Escape application args
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
save () {
|
# * args from the command line
|
||||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
# * the main class name
|
||||||
echo " "
|
# * -classpath
|
||||||
}
|
# * -D...appname settings
|
||||||
APP_ARGS=`save "$@"`
|
# * --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
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
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" "$@"
|
||||||
|
|||||||
39
gradlew.bat
vendored
39
gradlew.bat
vendored
@@ -13,8 +13,10 @@
|
|||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@@ -25,7 +27,8 @@
|
|||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
|||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
@@ -75,15 +78,17 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
exit /b 1
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
:omega
|
:omega
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ public class MeteorRejectsAddon extends MeteorAddon {
|
|||||||
.get().getMetadata()
|
.get().getMetadata()
|
||||||
.getCustomValue("github:sha")
|
.getCustomValue("github:sha")
|
||||||
.getAsString();
|
.getAsString();
|
||||||
LOG.info(String.format("Rejects version: %s", commit));
|
LOG.info("Rejects version: {}", commit);
|
||||||
return commit.isEmpty() ? null : commit.trim();
|
return commit.isEmpty() ? null : commit.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ public class EnumArgumentType<T extends Enum<?>> implements ArgumentType<T> {
|
|||||||
super();
|
super();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
//noinspection unchecked
|
||||||
values = (T[]) defaultValue.getClass().getMethod("values").invoke(null);
|
values = (T[]) defaultValue.getClass().getMethod("values").invoke(null);
|
||||||
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
|
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -34,6 +35,7 @@ public class EnumArgumentType<T extends Enum<?>> implements ArgumentType<T> {
|
|||||||
return new EnumArgumentType<>(defaultValue);
|
return new EnumArgumentType<>(defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public static <T extends Enum<?>> T getEnum(CommandContext<?> context, String name, T defaultValue) {
|
public static <T extends Enum<?>> T getEnum(CommandContext<?> context, String name, T defaultValue) {
|
||||||
return (T) context.getArgument(name, defaultValue.getClass());
|
return (T) context.getArgument(name, defaultValue.getClass());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class CenterCommand extends Command {
|
|||||||
double x = MathHelper.floor(mc.player.getX()) + 0.5;
|
double x = MathHelper.floor(mc.player.getX()) + 0.5;
|
||||||
double z = MathHelper.floor(mc.player.getZ()) + 0.5;
|
double z = MathHelper.floor(mc.player.getZ()) + 0.5;
|
||||||
mc.player.setPosition(x, mc.player.getY(), z);
|
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;
|
return SINGLE_SUCCESS;
|
||||||
}));
|
}));
|
||||||
@@ -26,7 +26,7 @@ public class CenterCommand extends Command {
|
|||||||
double x = MathHelper.floor(mc.player.getX());
|
double x = MathHelper.floor(mc.player.getX());
|
||||||
double z = MathHelper.floor(mc.player.getZ());
|
double z = MathHelper.floor(mc.player.getZ());
|
||||||
mc.player.setPosition(x, mc.player.getY(), z);
|
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;
|
return SINGLE_SUCCESS;
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class KickCommand extends Command {
|
|||||||
return SINGLE_SUCCESS;
|
return SINGLE_SUCCESS;
|
||||||
}));
|
}));
|
||||||
builder.then(literal("pos").executes(ctx -> {
|
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;
|
return SINGLE_SUCCESS;
|
||||||
}));
|
}));
|
||||||
builder.then(literal("hurt").executes(ctx -> {
|
builder.then(literal("hurt").executes(ctx -> {
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public class RadarHud extends HudElement {
|
|||||||
double yPos = ((coords.getZ() - mc.player.getZ()) * scale.get() * zoom.get() + height / 2);
|
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;
|
if (xPos < 0 || yPos < 0 || xPos > width - scale.get() || yPos > height - scale.get()) continue;
|
||||||
String icon = "*";
|
String icon = "*";
|
||||||
if (letters.get() && waypoint.name.get().length() > 0)
|
if (letters.get() && !waypoint.name.get().isEmpty())
|
||||||
icon = waypoint.name.get().substring(0, 1);
|
icon = waypoint.name.get().substring(0, 1);
|
||||||
renderer.text(icon, xPos + x, yPos + y, waypoint.color.get(), false);
|
renderer.text(icon, xPos + x, yPos + y, waypoint.color.get(), false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,12 +15,13 @@ import meteordevelopment.starscript.compiler.Parser;
|
|||||||
import meteordevelopment.starscript.utils.Error;
|
import meteordevelopment.starscript.utils.Error;
|
||||||
import meteordevelopment.starscript.utils.StarscriptError;
|
import meteordevelopment.starscript.utils.StarscriptError;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
import net.minecraft.client.gl.ShaderProgramKeys;
|
||||||
import net.minecraft.client.gui.DrawContext;
|
import net.minecraft.client.gui.DrawContext;
|
||||||
import net.minecraft.client.gui.screen.ChatScreen;
|
import net.minecraft.client.gui.screen.ChatScreen;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraft.client.gui.screen.ingame.InventoryScreen;
|
import net.minecraft.client.gui.screen.ingame.InventoryScreen;
|
||||||
import net.minecraft.client.option.KeyBinding;
|
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.InputUtil;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.component.DataComponentTypes;
|
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.text.Text;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.util.PlayerInput;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import org.joml.Vector2f;
|
import org.joml.Vector2f;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
@@ -93,27 +95,26 @@ public class InteractionScreen extends Screen {
|
|||||||
closeScreen();
|
closeScreen();
|
||||||
client.setScreen(new StatsScreen(e));
|
client.setScreen(new StatsScreen(e));
|
||||||
});
|
});
|
||||||
if (entity instanceof PlayerEntity) {
|
switch (entity) {
|
||||||
functions.put("Open Inventory", (Entity e) -> {
|
case PlayerEntity playerEntity -> functions.put("Open Inventory", (Entity e) -> {
|
||||||
closeScreen();
|
closeScreen();
|
||||||
client.setScreen(new InventoryScreen((PlayerEntity) e));
|
client.setScreen(new InventoryScreen((PlayerEntity) e));
|
||||||
});
|
});
|
||||||
} else if (entity instanceof AbstractHorseEntity) {
|
case AbstractHorseEntity abstractHorseEntity -> functions.put("Open Inventory", (Entity e) -> {
|
||||||
functions.put("Open Inventory", (Entity e) -> {
|
|
||||||
closeScreen();
|
closeScreen();
|
||||||
if (client.player.isRiding()) {
|
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.networkHandler.sendPacket(PlayerInteractEntityC2SPacket.interact(entity, true, Hand.MAIN_HAND));
|
||||||
client.player.setSneaking(false);
|
client.player.setSneaking(false);
|
||||||
});
|
});
|
||||||
} else if (entity instanceof StorageMinecartEntity) {
|
case StorageMinecartEntity storageMinecartEntity -> functions.put("Open Inventory", (Entity e) -> {
|
||||||
functions.put("Open Inventory", (Entity e) -> {
|
|
||||||
closeScreen();
|
closeScreen();
|
||||||
client.player.networkHandler.sendPacket(PlayerInteractEntityC2SPacket.interact(entity, true, Hand.MAIN_HAND));
|
client.player.networkHandler.sendPacket(PlayerInteractEntityC2SPacket.interact(entity, true, Hand.MAIN_HAND));
|
||||||
});
|
});
|
||||||
} else {
|
case null, default -> functions.put("Open Inventory", (Entity e) -> {
|
||||||
functions.put("Open Inventory", (Entity e) -> {
|
|
||||||
closeScreen();
|
closeScreen();
|
||||||
ItemStack container = new ItemStack(Items.CHEST);
|
ItemStack container = new ItemStack(Items.CHEST);
|
||||||
container.set(DataComponentTypes.CUSTOM_NAME, e.getName());
|
container.set(DataComponentTypes.CUSTOM_NAME, e.getName());
|
||||||
@@ -186,7 +187,7 @@ public class InteractionScreen extends Screen {
|
|||||||
} catch (NullPointerException ex) {
|
} catch (NullPointerException ex) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Saddleable.class.isInstance(e)) {
|
if (e instanceof Saddleable) {
|
||||||
if (((Saddleable) e).isSaddled()) {
|
if (((Saddleable) e).isSaddled()) {
|
||||||
stack[index[0]] = Items.SADDLE.getDefaultStack();
|
stack[index[0]] = Items.SADDLE.getDefaultStack();
|
||||||
index[0]++;
|
index[0]++;
|
||||||
@@ -251,12 +252,12 @@ public class InteractionScreen extends Screen {
|
|||||||
MatrixStack matrix = context.getMatrices();
|
MatrixStack matrix = context.getMatrices();
|
||||||
// Fake crosshair stuff
|
// Fake crosshair stuff
|
||||||
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
RenderSystem.setShader(GameRenderer::getPositionTexProgram);
|
RenderSystem.setShader(ShaderProgramKeys.POSITION_TEX);
|
||||||
RenderSystem.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
RenderSystem.blendFuncSeparate(GlStateManager.SrcFactor.ONE_MINUS_DST_COLOR,
|
RenderSystem.blendFuncSeparate(GlStateManager.SrcFactor.ONE_MINUS_DST_COLOR,
|
||||||
GlStateManager.DstFactor.ONE_MINUS_SRC_COLOR, GlStateManager.SrcFactor.ONE,
|
GlStateManager.DstFactor.ONE_MINUS_SRC_COLOR, GlStateManager.SrcFactor.ONE,
|
||||||
GlStateManager.DstFactor.ZERO);
|
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);
|
drawDots(context, (int) (Math.min(height, width) / 2 * 0.75), mouseX, mouseY);
|
||||||
matrix.scale(2f, 2f, 1f);
|
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) {
|
private void drawDots(DrawContext context, int radius, int mouseX, int mouseY) {
|
||||||
ArrayList<Point> pointList = new ArrayList<Point>();
|
ArrayList<Point> pointList = new ArrayList<Point>();
|
||||||
String cache[] = new String[functions.size()];
|
String[] cache = new String[functions.size()];
|
||||||
double lowestDistance = Double.MAX_VALUE;
|
double lowestDistance = Double.MAX_VALUE;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ public class LegacyServerFinderScreen extends WindowScreen {
|
|||||||
updatePingers(pingers);
|
updatePingers(pingers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (pingers.size() > 0) {
|
while (!pingers.isEmpty()) {
|
||||||
if (state == ServerFinderState.CANCELLED)
|
if (state == ServerFinderState.CANCELLED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ public class ServerFinderScreen extends WindowScreen implements IServerFinderDon
|
|||||||
versionFilters.clear();
|
versionFilters.clear();
|
||||||
for (String version : versions) {
|
for (String version : versions) {
|
||||||
String trimmed = version.trim();
|
String trimmed = version.trim();
|
||||||
if (trimmed.length() > 0)
|
if (!trimmed.isEmpty())
|
||||||
versionFilters.add(version.trim());
|
versionFilters.add(version.trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -177,7 +177,7 @@ public class ServerFinderScreen extends WindowScreen implements IServerFinderDon
|
|||||||
|
|
||||||
private boolean pingNewIP() {
|
private boolean pingNewIP() {
|
||||||
synchronized (serverFinderLock) {
|
synchronized (serverFinderLock) {
|
||||||
if (ipsToPing.size() > 0) {
|
if (!ipsToPing.isEmpty()) {
|
||||||
String ip = ipsToPing.pop();
|
String ip = ipsToPing.pop();
|
||||||
ServerPinger pinger = new ServerPinger(scanPortsBox.checked, searchNumber);
|
ServerPinger pinger = new ServerPinger(scanPortsBox.checked, searchNumber);
|
||||||
pinger.addServerFinderDoneListener(this);
|
pinger.addServerFinderDoneListener(this);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class WMeteorCheckbox extends WCheckbox implements MeteorWidget {
|
|||||||
|
|
||||||
if (animProgress > 0) {
|
if (animProgress > 0) {
|
||||||
double cs = (width - theme.scale(2)) / 1.75 * animProgress;
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import meteordevelopment.meteorclient.systems.modules.Modules;
|
|||||||
|
|
||||||
import net.minecraft.client.gl.PostEffectProcessor;
|
import net.minecraft.client.gl.PostEffectProcessor;
|
||||||
import net.minecraft.client.render.RenderTickCounter;
|
import net.minecraft.client.render.RenderTickCounter;
|
||||||
|
import net.minecraft.client.util.Pool;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
@@ -18,6 +19,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
@Mixin(GameRenderer.class)
|
@Mixin(GameRenderer.class)
|
||||||
public class GameRendererMixin {
|
public class GameRendererMixin {
|
||||||
@Shadow @Final MinecraftClient client;
|
@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))
|
@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) {
|
private void renderShader(RenderTickCounter tickCounter, boolean tick, CallbackInfo ci) {
|
||||||
@@ -26,8 +29,8 @@ public class GameRendererMixin {
|
|||||||
PostEffectProcessor shader = renderingModule.getShaderEffect();
|
PostEffectProcessor shader = renderingModule.getShaderEffect();
|
||||||
|
|
||||||
if (shader != null) {
|
if (shader != null) {
|
||||||
shader.setupDimensions(client.getWindow().getFramebufferWidth(), client.getWindow().getFramebufferHeight());
|
// shader.setupDimensions(client.getWindow().getFramebufferWidth(), client.getWindow().getFramebufferHeight());
|
||||||
shader.render(tickCounter.getTickDelta(tick));
|
shader.render(this.client.getFramebuffer(), this.pool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ import meteordevelopment.meteorclient.systems.modules.Modules;
|
|||||||
import net.fabricmc.api.EnvType;
|
import net.fabricmc.api.EnvType;
|
||||||
import net.fabricmc.api.Environment;
|
import net.fabricmc.api.Environment;
|
||||||
import net.minecraft.client.render.entity.LivingEntityRenderer;
|
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.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
|
||||||
import net.minecraft.util.math.RotationAxis;
|
import net.minecraft.util.math.RotationAxis;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
@@ -16,14 +18,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
|
|
||||||
@Environment(EnvType.CLIENT)
|
@Environment(EnvType.CLIENT)
|
||||||
@Mixin(LivingEntityRenderer.class)
|
@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"))
|
@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);
|
Rendering renderingModule = Modules.get().get(Rendering.class);
|
||||||
if (renderingModule == null) return;
|
if (renderingModule == null) return;
|
||||||
if ((!(entity instanceof PlayerEntity)) && renderingModule.dinnerboneEnabled()) {
|
if ((!(state instanceof PlayerEntityRenderState)) && renderingModule.dinnerboneEnabled()) {
|
||||||
matrices.translate(0.0D, entity.getHeight() + 0.1F, 0.0D);
|
matrices.translate(0.0D, state.height + 0.1F, 0.0D);
|
||||||
matrices.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(180.0F));
|
matrices.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(180.0F));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
package anticope.rejects.mixin;
|
package anticope.rejects.mixin;
|
||||||
|
|
||||||
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket;
|
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.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Mutable;
|
|
||||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||||
|
import org.spongepowered.asm.mixin.gen.Invoker;
|
||||||
|
|
||||||
@Mixin(VehicleMoveC2SPacket.class)
|
@Mixin(VehicleMoveC2SPacket.class)
|
||||||
public interface VehicleMoveC2SPacketAccessor {
|
public interface VehicleMoveC2SPacketAccessor {
|
||||||
@Mutable
|
@Accessor("position")
|
||||||
@Accessor("x")
|
Vec3d getPosition();
|
||||||
void setX(double x);
|
|
||||||
|
|
||||||
@Mutable
|
@Invoker("<init>")
|
||||||
@Accessor("z")
|
static VehicleMoveC2SPacket create(Vec3d position, float yaw, float pitch, boolean onGround) {
|
||||||
void setZ(double z);
|
throw new AssertionError();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ public class ModuleMixin {
|
|||||||
@Mutable @Shadow public String name;
|
@Mutable @Shadow public String name;
|
||||||
|
|
||||||
@Mutable @Shadow public String title;
|
@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) {
|
private void onInit(Category category, String name, String description, String[] aliases, CallbackInfo info) {
|
||||||
if (RejectsConfig.get().duplicateModuleNames) {
|
if (RejectsConfig.get().duplicateModuleNames) {
|
||||||
this.name = RejectsUtils.getModuleName(name);
|
this.name = RejectsUtils.getModuleName(name);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public class AntiBot extends Module {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onTick(TickEvent.Post tickEvent) {
|
public void onTick(TickEvent.Post tickEvent) {
|
||||||
for (Entity entity : mc.world.getEntities()) {
|
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 (removeInvisible.get() && !entity.isInvisible()) continue;
|
||||||
|
|
||||||
if (isBot(playerEntity)) entity.remove(Entity.RemovalReason.DISCARDED);
|
if (isBot(playerEntity)) entity.remove(Entity.RemovalReason.DISCARDED);
|
||||||
|
|||||||
@@ -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.ExplosionS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.ParticleS2CPacket;
|
import net.minecraft.network.packet.s2c.play.ParticleS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket;
|
import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
public class AntiCrash extends Module {
|
public class AntiCrash extends Module {
|
||||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||||
@@ -29,22 +30,25 @@ public class AntiCrash extends Module {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
private void onPacketReceive(PacketEvent.Receive event) {
|
private void onPacketReceive(PacketEvent.Receive event) {
|
||||||
if (event.packet instanceof ExplosionS2CPacket packet) {
|
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 ||
|
Vec3d explodePos = packet.center();
|
||||||
// power too high
|
// TODO: 1.21.3
|
||||||
packet.getRadius() > 1000 ||
|
Vec3d playerKnockback = new Vec3d(0, 0, 0);
|
||||||
// too many blocks
|
if(packet.playerKnockback().isPresent()) {
|
||||||
packet.getAffectedBlocks().size() > 100_000 ||
|
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
|
// 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?
|
// 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);
|
) cancel(event);
|
||||||
} else if (event.packet instanceof ParticleS2CPacket packet) {
|
} else if (event.packet instanceof ParticleS2CPacket packet) {
|
||||||
// too many particles
|
// too many particles
|
||||||
if (packet.getCount() > 100_000) cancel(event);
|
if (packet.getCount() > 100_000) cancel(event);
|
||||||
} else if (event.packet instanceof PlayerPositionLookS2CPacket packet) {
|
} else if (event.packet instanceof PlayerPositionLookS2CPacket packet) {
|
||||||
|
Vec3d playerPos = packet.change().position();
|
||||||
// out of world movement
|
// 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);
|
cancel(event);
|
||||||
} else if (event.packet instanceof EntityVelocityUpdateS2CPacket packet) {
|
} else if (event.packet instanceof EntityVelocityUpdateS2CPacket packet) {
|
||||||
// velocity
|
// velocity
|
||||||
|
|||||||
@@ -54,9 +54,9 @@ public class ArrowDmg extends Module {
|
|||||||
|
|
||||||
for (int i = 0; i < packets.get() / 2; i++) {
|
for (int i = 0; i < packets.get() / 2; i++) {
|
||||||
p.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(x,
|
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,
|
p.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(x,
|
||||||
y + 1e-10, z, false));
|
y + 1e-10, z, false, mc.player.horizontalCollision));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ public class AutoBedTrap extends Module {
|
|||||||
if (cap >= bpt.get()) {
|
if (cap >= bpt.get()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
cap = 0;
|
cap = 0;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -7,10 +7,14 @@ import meteordevelopment.meteorclient.settings.ItemListSetting;
|
|||||||
import meteordevelopment.meteorclient.settings.Setting;
|
import meteordevelopment.meteorclient.settings.Setting;
|
||||||
import meteordevelopment.meteorclient.settings.SettingGroup;
|
import meteordevelopment.meteorclient.settings.SettingGroup;
|
||||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||||
|
import meteordevelopment.meteorclient.utils.Utils;
|
||||||
import meteordevelopment.orbit.EventHandler;
|
import meteordevelopment.orbit.EventHandler;
|
||||||
import net.minecraft.client.gui.screen.recipebook.RecipeResultCollection;
|
import net.minecraft.client.gui.screen.recipebook.RecipeResultCollection;
|
||||||
import net.minecraft.item.Item;
|
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.CraftingScreenHandler;
|
||||||
import net.minecraft.screen.slot.SlotActionType;
|
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()
|
private final Setting<List<Item>> items = sgGeneral.add(new ItemListSetting.Builder()
|
||||||
.name("items")
|
.name("items")
|
||||||
.description("Items you want to get crafted.")
|
.description("Items you want to get crafted.")
|
||||||
.defaultValue(Arrays.asList())
|
.defaultValue(List.of())
|
||||||
.build()
|
.build()
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -55,11 +59,11 @@ public class AutoCraft extends Module {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
private void onTick(TickEvent.Post event) {
|
private void onTick(TickEvent.Post event) {
|
||||||
if (mc.interactionManager == null) return;
|
if (!Utils.canUpdate() || mc.interactionManager == null) return;
|
||||||
|
|
||||||
if (items.get().isEmpty()) return;
|
if (items.get().isEmpty()) return;
|
||||||
|
|
||||||
if (!(mc.player.currentScreenHandler instanceof CraftingScreenHandler)) return;
|
if (!(mc.player.currentScreenHandler instanceof CraftingScreenHandler)) return;
|
||||||
|
|
||||||
|
|
||||||
if (antiDesync.get())
|
if (antiDesync.get())
|
||||||
mc.player.getInventory().updateItems();
|
mc.player.getInventory().updateItems();
|
||||||
@@ -70,11 +74,19 @@ public class AutoCraft extends Module {
|
|||||||
List<Item> itemList = items.get();
|
List<Item> itemList = items.get();
|
||||||
List<RecipeResultCollection> recipeResultCollectionList = mc.player.getRecipeBook().getOrderedResults();
|
List<RecipeResultCollection> recipeResultCollectionList = mc.player.getRecipeBook().getOrderedResults();
|
||||||
for (RecipeResultCollection recipeResultCollection : recipeResultCollectionList) {
|
for (RecipeResultCollection recipeResultCollection : recipeResultCollectionList) {
|
||||||
for (RecipeEntry<?> recipe : recipeResultCollection.getRecipes(true)) {
|
// Get craftable recipes only
|
||||||
if (!itemList.contains(recipe.value().getResult(mc.world.getRegistryManager()).getItem())) continue;
|
List<RecipeDisplayEntry> craftRecipes = recipeResultCollection.filter(RecipeResultCollection.RecipeFilterMode.CRAFTABLE);
|
||||||
mc.interactionManager.clickRecipe(currentScreenHandler.syncId, recipe, craftAll.get());
|
for (RecipeDisplayEntry recipe : craftRecipes) {
|
||||||
mc.interactionManager.clickSlot(currentScreenHandler.syncId, 0, 1,
|
RecipeDisplay recipeDisplay = recipe.display();
|
||||||
drop.get() ? SlotActionType.THROW : SlotActionType.QUICK_MOVE, mc.player);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class AutoPot extends Module {
|
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 static final Class<? extends Module>[] AURAS = new Class[]{KillAura.class, CrystalAura.class, AnchorAura.class, BedAura.class};
|
||||||
|
|
||||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||||
|
|||||||
@@ -132,23 +132,26 @@ public class AutoSoup extends Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isClickable(HitResult hitResult) {
|
private boolean isClickable(HitResult hitResult) {
|
||||||
if (hitResult == null)
|
switch (hitResult) {
|
||||||
return false;
|
case null -> {
|
||||||
|
|
||||||
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)
|
|
||||||
return false;
|
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();
|
Block block = mc.world.getBlockState(pos).getBlock();
|
||||||
return block instanceof BlockWithEntity
|
return block instanceof BlockWithEntity
|
||||||
|| block instanceof CraftingTableBlock;
|
|| block instanceof CraftingTableBlock;
|
||||||
|
}
|
||||||
|
default -> {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public class AutoTNT extends Module {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
private void onPostTick(TickEvent.Post event) {
|
private void onPostTick(TickEvent.Post event) {
|
||||||
// Ignition
|
// Ignition
|
||||||
if (ignite.get() && blocksToIgnite.size() > 0) {
|
if (ignite.get() && !blocksToIgnite.isEmpty()) {
|
||||||
if (igniteTick > igniteDelay.get()) {
|
if (igniteTick > igniteDelay.get()) {
|
||||||
// Sort based on closest tnt
|
// Sort based on closest tnt
|
||||||
blocksToIgnite.sort(Comparator.comparingDouble(PlayerUtils::distanceTo));
|
blocksToIgnite.sort(Comparator.comparingDouble(PlayerUtils::distanceTo));
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public class AutoWither extends Module {
|
|||||||
|
|
||||||
// Register
|
// Register
|
||||||
BlockIterator.register(horizontalRadius.get(), verticalRadius.get(), (blockPos, blockState) -> {
|
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));
|
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 leftHead = wither.foot.up().up().offset(wither.axis, -1);
|
||||||
BlockPos rightHead = 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,
|
(double) midHead.getX() + 0.8, (double) midHead.getX() + 0.7, (double) midHead.getX() + 0.8,
|
||||||
sideColor.get(), lineColor.get(), shapeMode.get(), 0);
|
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,
|
(double) leftHead.getX() + 0.8, (double) leftHead.getX() + 0.7, (double) leftHead.getX() + 0.8,
|
||||||
sideColor.get(), lineColor.get(), shapeMode.get(), 0);
|
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,
|
(double) rightHead.getX() + 0.8, (double) rightHead.getX() + 0.7, (double) rightHead.getX() + 0.8,
|
||||||
sideColor.get(), lineColor.get(), shapeMode.get(), 0);
|
sideColor.get(), lineColor.get(), shapeMode.get(), 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
} 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,9 +142,10 @@ public class ChorusExploit extends Module {
|
|||||||
if (event.packet instanceof PlayerPositionLookS2CPacket posPacket && ateChorus) {
|
if (event.packet instanceof PlayerPositionLookS2CPacket posPacket && ateChorus) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
if (positionMode.get() == PositionMode.PosLook) {
|
if (positionMode.get() == PositionMode.PosLook) {
|
||||||
cposX = posPacket.getX();
|
Vec3d pos = posPacket.change().position();
|
||||||
cposY = posPacket.getY();
|
cposX = pos.x;
|
||||||
cposZ = posPacket.getZ();
|
cposY = pos.y;
|
||||||
|
cposZ = pos.z;
|
||||||
gotPosition = true;
|
gotPosition = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,12 +144,12 @@ public class Confuse extends Module {
|
|||||||
if (mc.world.getBlockState(BlockPos.ofFloored(goal.x, goal.y, goal.z)).getBlock() == Blocks.AIR) {
|
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));
|
hit = mc.world.raycast(new RaycastContext(mc.player.getPos(), goal, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.ANY, mc.player));
|
||||||
if (!moveThroughBlocks.get() && hit.isInsideBlock()) {
|
if (!moveThroughBlocks.get() && hit.isInsideBlock()) {
|
||||||
delayWaited = (int) (delay.get() - 1);
|
delayWaited = delay.get() - 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
mc.player.updatePosition(goal.x, goal.y, goal.z);
|
mc.player.updatePosition(goal.x, goal.y, goal.z);
|
||||||
} else {
|
} else {
|
||||||
delayWaited = (int) (delay.get() - 1);
|
delayWaited = delay.get() - 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -159,7 +159,7 @@ public class Confuse extends Module {
|
|||||||
Vec3d goal2 = entityPos.add(diff1);
|
Vec3d goal2 = entityPos.add(diff1);
|
||||||
hit = mc.world.raycast(new RaycastContext(mc.player.getPos(), goal2, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.ANY, mc.player));
|
hit = mc.world.raycast(new RaycastContext(mc.player.getPos(), goal2, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.ANY, mc.player));
|
||||||
if (!moveThroughBlocks.get() && hit.isInsideBlock()) {
|
if (!moveThroughBlocks.get() && hit.isInsideBlock()) {
|
||||||
delayWaited = (int) (delay.get() - 1);
|
delayWaited = delay.get() - 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
mc.player.updatePosition(goal2.x, goal2.y, goal2.z);
|
mc.player.updatePosition(goal2.x, goal2.y, goal2.z);
|
||||||
|
|||||||
@@ -99,11 +99,11 @@ public class CoordLogger extends Module {
|
|||||||
EntityPositionS2CPacket packet = (EntityPositionS2CPacket) event.packet;
|
EntityPositionS2CPacket packet = (EntityPositionS2CPacket) event.packet;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Entity entity = mc.world.getEntityById(packet.getId());
|
Entity entity = mc.world.getEntityById(packet.entityId());
|
||||||
|
|
||||||
// Player teleport
|
// Player teleport
|
||||||
if (entity.getType().equals(EntityType.PLAYER) && players.get()) {
|
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();
|
Vec3d playerPosition = entity.getPos();
|
||||||
|
|
||||||
if (playerPosition.distanceTo(packetPosition) >= minDistance.get()) {
|
if (playerPosition.distanceTo(packetPosition) >= minDistance.get()) {
|
||||||
@@ -113,7 +113,7 @@ public class CoordLogger extends Module {
|
|||||||
|
|
||||||
// World teleport
|
// World teleport
|
||||||
else if (entity.getType().equals(EntityType.WOLF) && wolves.get()) {
|
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();
|
Vec3d wolfPosition = entity.getPos();
|
||||||
|
|
||||||
UUID ownerUuid = ((TameableEntity) entity).getOwnerUuid();
|
UUID ownerUuid = ((TameableEntity) entity).getOwnerUuid();
|
||||||
@@ -152,7 +152,7 @@ public class CoordLogger extends Module {
|
|||||||
public MutableText formatMessage(String message, Vec3d coords) {
|
public MutableText formatMessage(String message, Vec3d coords) {
|
||||||
MutableText text = Text.literal(message);
|
MutableText text = Text.literal(message);
|
||||||
text.append(ChatUtils.formatCoords(coords));
|
text.append(ChatUtils.formatCoords(coords));
|
||||||
text.append(Formatting.GRAY.toString()+".");
|
text.append(Formatting.GRAY +".");
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,9 +54,10 @@ public class CustomPackets extends Module {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
private void onCustomPayloadPacket(PacketEvent.Receive event) {
|
private void onCustomPayloadPacket(PacketEvent.Receive event) {
|
||||||
if (event.packet instanceof CustomPayloadS2CPacket packet) {
|
if (event.packet instanceof CustomPayloadS2CPacket packet) {
|
||||||
switch (packet.payload().getId().toString()) {
|
if (packet.payload().getId().toString().equals("badlion:mods")) {
|
||||||
case "badlion:mods" -> event.setCancelled(onBadlionModsPacket(packet));
|
event.setCancelled(onBadlionModsPacket(packet));
|
||||||
default -> onUnknownPacket(packet);
|
} else {
|
||||||
|
onUnknownPacket(packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import meteordevelopment.meteorclient.settings.SettingGroup;
|
|||||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||||
import meteordevelopment.orbit.EventHandler;
|
import meteordevelopment.orbit.EventHandler;
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
import net.minecraft.item.ElytraItem;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
|
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
|
||||||
@@ -72,18 +71,17 @@ public class ExtraElytra extends Module {
|
|||||||
if (chest.getItem() != Items.ELYTRA)
|
if (chest.getItem() != Items.ELYTRA)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (mc.player.isFallFlying()) {
|
if (mc.player.isGliding()) {
|
||||||
if (stopInWater.get() && mc.player.isTouchingWater()) {
|
if (stopInWater.get() && mc.player.isTouchingWater()) {
|
||||||
sendStartStopPacket();
|
sendStartStopPacket();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
controlSpeed();
|
controlSpeed();
|
||||||
controlHeight();
|
controlHeight();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ElytraItem.isUsable(chest) && mc.options.jumpKey.isPressed())
|
if (chest.getDamage() < chest.getMaxDamage() - 1 && mc.options.jumpKey.isPressed())
|
||||||
doInstantFly();
|
doInstantFly();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,14 +112,16 @@ public class FullFlight extends Module {
|
|||||||
mc.player.getZ(),
|
mc.player.getZ(),
|
||||||
packet.getYaw(0),
|
packet.getYaw(0),
|
||||||
packet.getPitch(0),
|
packet.getPitch(0),
|
||||||
packet.isOnGround()
|
packet.isOnGround(),
|
||||||
|
packet.horizontalCollision()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
fullPacket = new PlayerMoveC2SPacket.PositionAndOnGround(
|
fullPacket = new PlayerMoveC2SPacket.PositionAndOnGround(
|
||||||
mc.player.getX(),
|
mc.player.getX(),
|
||||||
mc.player.getY(),
|
mc.player.getY(),
|
||||||
mc.player.getZ(),
|
mc.player.getZ(),
|
||||||
packet.isOnGround()
|
packet.isOnGround(),
|
||||||
|
packet.horizontalCollision()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
event.cancel();
|
event.cancel();
|
||||||
@@ -146,8 +148,8 @@ public class FullFlight extends Module {
|
|||||||
|
|
||||||
if (blockCollisions.findAny().isPresent()) break;
|
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() - 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.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround(), mc.player.horizontalCollision));
|
||||||
}
|
}
|
||||||
case Old -> {
|
case Old -> {
|
||||||
Box box = mc.player.getBoundingBox();
|
Box box = mc.player.getBoundingBox();
|
||||||
@@ -161,20 +163,20 @@ public class FullFlight extends Module {
|
|||||||
double groundExtra = ground + 0.1D;
|
double groundExtra = ground + 0.1D;
|
||||||
|
|
||||||
for (double posY = mc.player.getY(); posY > groundExtra; posY -= 4D) {
|
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
|
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) {
|
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
|
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));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class Jetpack extends Module {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
private void onTick(TickEvent.Pre event) {
|
private void onTick(TickEvent.Pre event) {
|
||||||
if (mc.options.jumpKey.isPressed()) {
|
if (mc.options.jumpKey.isPressed()) {
|
||||||
((IVec3d) mc.player.getVelocity()).setY(jetpackSpeed.get());
|
((IVec3d) mc.player.getVelocity()).meteor$setY(jetpackSpeed.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ public class KnockbackPlus extends Module {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
private void onSendPacket(PacketEvent.Send event) {
|
private void onSendPacket(PacketEvent.Send event) {
|
||||||
if (event.packet instanceof IPlayerInteractEntityC2SPacket packet && packet.getType() == PlayerInteractEntityC2SPacket.InteractType.ATTACK) {
|
if (event.packet instanceof IPlayerInteractEntityC2SPacket packet && packet.meteor$getType() == PlayerInteractEntityC2SPacket.InteractType.ATTACK) {
|
||||||
Entity entity = packet.getEntity();
|
Entity entity = packet.meteor$getEntity();
|
||||||
|
|
||||||
if (!(entity instanceof LivingEntity) || (entity != Modules.get().get(KillAura.class).getTarget() && ka.get()))
|
if (!(entity instanceof LivingEntity) || (entity != Modules.get().get(KillAura.class).getTarget() && ka.get()))
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import net.minecraft.util.math.Box;
|
|||||||
import net.minecraft.util.math.ChunkPos;
|
import net.minecraft.util.math.ChunkPos;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraft.world.Heightmap;
|
||||||
import net.minecraft.world.chunk.WorldChunk;
|
import net.minecraft.world.chunk.WorldChunk;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -187,8 +188,8 @@ public class NewChunks extends Module {
|
|||||||
|
|
||||||
|
|
||||||
for (int x = 0; x < 16; x++) {
|
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);
|
FluidState fluid = chunk.getFluidState(x, y, z);
|
||||||
|
|
||||||
if (!fluid.isEmpty() && !fluid.isStill()) {
|
if (!fluid.isEmpty() && !fluid.isStill()) {
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import anticope.rejects.MeteorRejectsAddon;
|
|||||||
import meteordevelopment.meteorclient.events.entity.player.PlayerMoveEvent;
|
import meteordevelopment.meteorclient.events.entity.player.PlayerMoveEvent;
|
||||||
import meteordevelopment.meteorclient.events.entity.player.SendMovementPacketsEvent;
|
import meteordevelopment.meteorclient.events.entity.player.SendMovementPacketsEvent;
|
||||||
import meteordevelopment.meteorclient.events.packets.PacketEvent;
|
import meteordevelopment.meteorclient.events.packets.PacketEvent;
|
||||||
import meteordevelopment.meteorclient.mixin.PlayerPositionLookS2CPacketAccessor;
|
|
||||||
import meteordevelopment.meteorclient.settings.*;
|
import meteordevelopment.meteorclient.settings.*;
|
||||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||||
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
|
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
|
||||||
import meteordevelopment.orbit.EventHandler;
|
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.PlayerMoveC2SPacket;
|
||||||
import net.minecraft.network.packet.c2s.play.TeleportConfirmC2SPacket;
|
import net.minecraft.network.packet.c2s.play.TeleportConfirmC2SPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket;
|
import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket;
|
||||||
@@ -128,7 +128,7 @@ public class PacketFly extends Module {
|
|||||||
double speed = 0.0;
|
double speed = 0.0;
|
||||||
boolean checkCollisionBoxes = checkHitBoxes();
|
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());
|
Vec3d horizontal = PlayerUtils.getHorizontalVelocity(horizontalSpeed.get());
|
||||||
|
|
||||||
@@ -154,12 +154,17 @@ public class PacketFly extends Module {
|
|||||||
public void onPacketReceive(PacketEvent.Receive event) {
|
public void onPacketReceive(PacketEvent.Receive event) {
|
||||||
if (event.packet instanceof PlayerPositionLookS2CPacket && !(mc.player == null || mc.world == null)) {
|
if (event.packet instanceof PlayerPositionLookS2CPacket && !(mc.player == null || mc.world == null)) {
|
||||||
PlayerPositionLookS2CPacket packet = (PlayerPositionLookS2CPacket) event.packet;
|
PlayerPositionLookS2CPacket packet = (PlayerPositionLookS2CPacket) event.packet;
|
||||||
|
PlayerPosition oldPos = packet.change();
|
||||||
if (setYaw.get()) {
|
if (setYaw.get()) {
|
||||||
((PlayerPositionLookS2CPacketAccessor) event.packet).setPitch(mc.player.getPitch());
|
PlayerPosition newPos = new PlayerPosition(oldPos.position(), oldPos.deltaMovement(), mc.player.getYaw(), mc.player.getPitch());
|
||||||
((PlayerPositionLookS2CPacketAccessor) event.packet).setYaw(mc.player.getYaw());
|
event.packet = PlayerPositionLookS2CPacket.of(
|
||||||
|
packet.teleportId(),
|
||||||
|
newPos,
|
||||||
|
packet.relatives()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (setID.get()) {
|
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 vec = new Vec3d(x, y, z);
|
||||||
Vec3d position = mc.player.getPos().add(vec);
|
Vec3d position = mc.player.getPos().add(vec);
|
||||||
Vec3d outOfBoundsVec = outOfBoundsVec(vec, position);
|
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()) {
|
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()) {
|
if (setPos.get()) {
|
||||||
mc.player.setPos(position.x, position.y, position.z);
|
mc.player.setPos(position.x, position.y, position.z);
|
||||||
|
|||||||
@@ -7,38 +7,17 @@ import meteordevelopment.meteorclient.settings.Setting;
|
|||||||
import meteordevelopment.meteorclient.settings.SettingGroup;
|
import meteordevelopment.meteorclient.settings.SettingGroup;
|
||||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||||
import net.minecraft.client.gl.PostEffectProcessor;
|
import net.minecraft.client.gl.PostEffectProcessor;
|
||||||
|
import net.minecraft.client.render.DefaultFramebufferSet;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
public class Rendering extends Module {
|
public class Rendering extends Module {
|
||||||
|
|
||||||
public enum Shader {
|
public enum Shader {
|
||||||
None,
|
None,
|
||||||
Notch,
|
|
||||||
FXAA,
|
|
||||||
Art,
|
|
||||||
Bumpy,
|
|
||||||
Blobs,
|
|
||||||
Blobs2,
|
|
||||||
Pencil,
|
|
||||||
Vibrant,
|
|
||||||
Deconverge,
|
|
||||||
Flip,
|
|
||||||
Invert,
|
|
||||||
NTSC,
|
|
||||||
Outline,
|
|
||||||
Phosphor,
|
|
||||||
Scanline,
|
|
||||||
Sobel,
|
|
||||||
Bits,
|
|
||||||
Desaturate,
|
|
||||||
Green,
|
|
||||||
Blur,
|
Blur,
|
||||||
Wobble,
|
|
||||||
Antialias,
|
|
||||||
Creeper,
|
Creeper,
|
||||||
Spider
|
Invert,
|
||||||
|
Spider,
|
||||||
}
|
}
|
||||||
|
|
||||||
private final SettingGroup sgInvisible = settings.createGroup("Invisible");
|
private final SettingGroup sgInvisible = settings.createGroup("Invisible");
|
||||||
@@ -102,17 +81,16 @@ public class Rendering extends Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onChanged(Shader s) {
|
public void onChanged(Shader s) {
|
||||||
String name;
|
if (mc.world == null) return;
|
||||||
if (s == Shader.Vibrant) name = "color_convolve";
|
String name = s.toString().toLowerCase();
|
||||||
else if (s == Shader.Scanline) name = "scan_pincushion";
|
|
||||||
else name = s.toString().toLowerCase();
|
if (name.equals("none")) {
|
||||||
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) {
|
|
||||||
this.shader = null;
|
this.shader = null;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Identifier shaderID = Identifier.ofVanilla(name);
|
||||||
|
this.shader = mc.getShaderLoader().loadPostEffect(shaderID, DefaultFramebufferSet.MAIN_ONLY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean renderStructureVoid() {
|
public boolean renderStructureVoid() {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import meteordevelopment.meteorclient.systems.modules.Module;
|
|||||||
import meteordevelopment.orbit.EventHandler;
|
import meteordevelopment.orbit.EventHandler;
|
||||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||||
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket;
|
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
public class RoboWalk extends Module {
|
public class RoboWalk extends Module {
|
||||||
public RoboWalk() {
|
public RoboWalk() {
|
||||||
@@ -30,11 +31,11 @@ public class RoboWalk extends Module {
|
|||||||
((PlayerMoveC2SPacketAccessor) packet).setX(x);
|
((PlayerMoveC2SPacketAccessor) packet).setX(x);
|
||||||
((PlayerMoveC2SPacketAccessor) packet).setZ(z);
|
((PlayerMoveC2SPacketAccessor) packet).setZ(z);
|
||||||
} else if (event.packet instanceof VehicleMoveC2SPacket packet) {
|
} else if (event.packet instanceof VehicleMoveC2SPacket packet) {
|
||||||
double x = smooth(packet.getX());
|
Vec3d pos = ((VehicleMoveC2SPacketAccessor) (Object) packet).getPosition();
|
||||||
double z = smooth(packet.getZ());
|
double x = smooth(pos.getX());
|
||||||
|
double z = smooth(pos.getZ());
|
||||||
|
|
||||||
((VehicleMoveC2SPacketAccessor) packet).setX(x);
|
event.packet = VehicleMoveC2SPacketAccessor.create(new Vec3d(x, pos.getY(), z), packet.yaw(), packet.pitch(), packet.onGround());
|
||||||
((VehicleMoveC2SPacketAccessor) packet).setZ(z);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,13 +81,13 @@ public class ShieldBypass extends Module {
|
|||||||
|
|
||||||
event.cancel();
|
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(PlayerInteractEntityC2SPacket.attack(e, mc.player.isSneaking()));
|
||||||
mc.getNetworkHandler().sendPacket(new HandSwingC2SPacket(mc.player.getActiveHand()));
|
mc.getNetworkHandler().sendPacket(new HandSwingC2SPacket(mc.player.getActiveHand()));
|
||||||
mc.player.resetLastAttackedTicks();
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,12 +17,14 @@ import meteordevelopment.meteorclient.utils.render.color.Color;
|
|||||||
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
|
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
|
||||||
import meteordevelopment.orbit.EventHandler;
|
import meteordevelopment.orbit.EventHandler;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
import net.minecraft.client.gl.ShaderProgramKeys;
|
||||||
import net.minecraft.client.model.ModelPart;
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.option.Perspective;
|
import net.minecraft.client.option.Perspective;
|
||||||
import net.minecraft.client.render.*;
|
import net.minecraft.client.render.*;
|
||||||
import net.minecraft.client.render.entity.LivingEntityRenderer;
|
import net.minecraft.client.render.entity.LivingEntityRenderer;
|
||||||
import net.minecraft.client.render.entity.PlayerEntityRenderer;
|
import net.minecraft.client.render.entity.PlayerEntityRenderer;
|
||||||
import net.minecraft.client.render.entity.model.PlayerEntityModel;
|
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.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
@@ -61,7 +63,7 @@ public class SkeletonESP extends Module {
|
|||||||
MatrixStack matrixStack = event.matrices;
|
MatrixStack matrixStack = event.matrices;
|
||||||
float g = event.tickDelta;
|
float g = event.tickDelta;
|
||||||
|
|
||||||
RenderSystem.setShader(GameRenderer::getPositionColorProgram);
|
RenderSystem.setShader(ShaderProgramKeys.POSITION_COLOR);
|
||||||
RenderSystem.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
RenderSystem.defaultBlendFunc();
|
RenderSystem.defaultBlendFunc();
|
||||||
RenderSystem.disableDepthTest();
|
RenderSystem.disableDepthTest();
|
||||||
@@ -79,8 +81,8 @@ public class SkeletonESP extends Module {
|
|||||||
PlayerEntity playerEntity = (PlayerEntity) entity;
|
PlayerEntity playerEntity = (PlayerEntity) entity;
|
||||||
|
|
||||||
Vec3d footPos = getEntityRenderPosition(playerEntity, g);
|
Vec3d footPos = getEntityRenderPosition(playerEntity, g);
|
||||||
PlayerEntityRenderer livingEntityRenderer = (PlayerEntityRenderer) (LivingEntityRenderer<?, ?>) mc.getEntityRenderDispatcher().getRenderer(playerEntity);
|
PlayerEntityRenderer livingEntityRenderer = (PlayerEntityRenderer) (LivingEntityRenderer<?, ?, ?>) mc.getEntityRenderDispatcher().getRenderer(playerEntity);
|
||||||
PlayerEntityModel<PlayerEntity> playerEntityModel = (PlayerEntityModel) livingEntityRenderer.getModel();
|
PlayerEntityModel playerEntityModel = livingEntityRenderer.getModel();
|
||||||
|
|
||||||
float h = MathHelper.lerpAngleDegrees(g, playerEntity.prevBodyYaw, playerEntity.bodyYaw);
|
float h = MathHelper.lerpAngleDegrees(g, playerEntity.prevBodyYaw, playerEntity.bodyYaw);
|
||||||
if (mc.player == entity && Rotations.rotationTimer < rotationHoldTicks) h = Rotations.serverYaw;
|
if (mc.player == entity && Rotations.rotationTimer < rotationHoldTicks) h = Rotations.serverYaw;
|
||||||
@@ -94,12 +96,17 @@ public class SkeletonESP extends Module {
|
|||||||
float m = playerEntity.getPitch(g);
|
float m = playerEntity.getPitch(g);
|
||||||
if (mc.player == entity && Rotations.rotationTimer < rotationHoldTicks) m = Rotations.serverPitch;
|
if (mc.player == entity && Rotations.rotationTimer < rotationHoldTicks) m = Rotations.serverPitch;
|
||||||
|
|
||||||
playerEntityModel.animateModel(playerEntity, q, p, g);
|
PlayerEntityRenderState renderState = new PlayerEntityRenderState();
|
||||||
playerEntityModel.setAngles(playerEntity, q, p, o, k, m);
|
renderState.limbFrequency = q;
|
||||||
|
renderState.limbAmplitudeMultiplier = p;
|
||||||
|
renderState.age = o;
|
||||||
|
renderState.yawDegrees = k;
|
||||||
|
renderState.pitch = m;
|
||||||
|
playerEntityModel.setAngles(renderState);
|
||||||
|
|
||||||
boolean swimming = playerEntity.isInSwimmingPose();
|
boolean swimming = playerEntity.isInSwimmingPose();
|
||||||
boolean sneaking = playerEntity.isSneaking();
|
boolean sneaking = playerEntity.isSneaking();
|
||||||
boolean flying = playerEntity.isFallFlying();
|
boolean flying = playerEntity.isGliding();
|
||||||
|
|
||||||
ModelPart head = playerEntityModel.head;
|
ModelPart head = playerEntityModel.head;
|
||||||
ModelPart leftArm = playerEntityModel.leftArm;
|
ModelPart leftArm = playerEntityModel.leftArm;
|
||||||
@@ -189,7 +196,7 @@ public class SkeletonESP extends Module {
|
|||||||
RenderSystem.disableBlend();
|
RenderSystem.disableBlend();
|
||||||
RenderSystem.enableDepthTest();
|
RenderSystem.enableDepthTest();
|
||||||
RenderSystem.depthMask(true);
|
RenderSystem.depthMask(true);
|
||||||
RenderSystem.setShader(GameRenderer::getPositionColorProgram);
|
RenderSystem.setShader(ShaderProgramKeys.POSITION_COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void rotate(MatrixStack matrix, ModelPart modelPart) {
|
private void rotate(MatrixStack matrix, ModelPart modelPart) {
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class SoundLocator extends Module {
|
|||||||
if(whitelist.get()) {
|
if(whitelist.get()) {
|
||||||
// Whitelist ON
|
// Whitelist ON
|
||||||
for (SoundEvent sound : sounds.get()) {
|
for (SoundEvent sound : sounds.get()) {
|
||||||
if (sound.getId().equals(event.sound.getId())) {
|
if (sound.id().equals(event.sound.getId())) {
|
||||||
printSound(event.sound);
|
printSound(event.sound);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package anticope.rejects.modules;
|
package anticope.rejects.modules;
|
||||||
|
|
||||||
import anticope.rejects.MeteorRejectsAddon;
|
import anticope.rejects.MeteorRejectsAddon;
|
||||||
|
import anticope.rejects.utils.WorldUtils;
|
||||||
import meteordevelopment.meteorclient.events.world.TickEvent;
|
import meteordevelopment.meteorclient.events.world.TickEvent;
|
||||||
import meteordevelopment.meteorclient.settings.*;
|
import meteordevelopment.meteorclient.settings.*;
|
||||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||||
@@ -139,22 +140,9 @@ public class TreeAura extends Module {
|
|||||||
return false;
|
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) {
|
private List<BlockPos> findSaplings(BlockPos centerPos, int radius, int height) {
|
||||||
ArrayList<BlockPos> blocc = new ArrayList<>();
|
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);
|
for (BlockPos b : blocks) if (isSapling(b)) blocc.add(b);
|
||||||
return blocc;
|
return blocc;
|
||||||
}
|
}
|
||||||
@@ -169,7 +157,7 @@ public class TreeAura extends Module {
|
|||||||
|
|
||||||
private List<BlockPos> getPlantLocations(BlockPos centerPos, int radius, int height) {
|
private List<BlockPos> getPlantLocations(BlockPos centerPos, int radius, int height) {
|
||||||
ArrayList<BlockPos> blocc = new ArrayList<>();
|
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);
|
for (BlockPos b : blocks) if (canPlant(b)) blocc.add(b);
|
||||||
return blocc;
|
return blocc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,27 +132,27 @@ public class GiveUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stack.set(DataComponentTypes.POTION_CONTENTS, new PotionContentsComponent(Optional.empty(), Optional.empty(),
|
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"));
|
stack.set(DataComponentTypes.CUSTOM_NAME, Text.literal("Lingering Potion of Trolling"));
|
||||||
return stack;
|
return stack;
|
||||||
});
|
});
|
||||||
|
|
||||||
PRESETS.put("32k", (preview) -> {
|
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();
|
if (preview || enchantmentRegistry == null) return Items.DIAMOND_SWORD.getDefaultStack();
|
||||||
ItemStack stack = Items.DIAMOND_SWORD.getDefaultStack();
|
ItemStack stack = Items.DIAMOND_SWORD.getDefaultStack();
|
||||||
|
|
||||||
stack.apply(DataComponentTypes.ENCHANTMENTS, ItemEnchantmentsComponent.DEFAULT, component -> {
|
stack.apply(DataComponentTypes.ENCHANTMENTS, ItemEnchantmentsComponent.DEFAULT, component -> {
|
||||||
ItemEnchantmentsComponent.Builder builder = new ItemEnchantmentsComponent.Builder(component);
|
ItemEnchantmentsComponent.Builder builder = new ItemEnchantmentsComponent.Builder(component);
|
||||||
builder.add(enchantmentRegistry.entryOf(Enchantments.SHARPNESS), 255);
|
builder.add(enchantmentRegistry.getOrThrow(Enchantments.SHARPNESS), 255);
|
||||||
builder.add(enchantmentRegistry.entryOf(Enchantments.KNOCKBACK), 255);
|
builder.add(enchantmentRegistry.getOrThrow(Enchantments.KNOCKBACK), 255);
|
||||||
builder.add(enchantmentRegistry.entryOf(Enchantments.FIRE_ASPECT), 255);
|
builder.add(enchantmentRegistry.getOrThrow(Enchantments.FIRE_ASPECT), 255);
|
||||||
builder.add(enchantmentRegistry.entryOf(Enchantments.LOOTING), 10);
|
builder.add(enchantmentRegistry.getOrThrow(Enchantments.LOOTING), 10);
|
||||||
builder.add(enchantmentRegistry.entryOf(Enchantments.SWEEPING_EDGE), 3);
|
builder.add(enchantmentRegistry.getOrThrow(Enchantments.SWEEPING_EDGE), 3);
|
||||||
builder.add(enchantmentRegistry.entryOf(Enchantments.UNBREAKING), 255);
|
builder.add(enchantmentRegistry.getOrThrow(Enchantments.UNBREAKING), 255);
|
||||||
builder.add(enchantmentRegistry.entryOf(Enchantments.MENDING), 1);
|
builder.add(enchantmentRegistry.getOrThrow(Enchantments.MENDING), 1);
|
||||||
builder.add(enchantmentRegistry.entryOf(Enchantments.VANISHING_CURSE), 1);
|
builder.add(enchantmentRegistry.getOrThrow(Enchantments.VANISHING_CURSE), 1);
|
||||||
return builder.build();
|
return builder.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ public class Ore {
|
|||||||
public static Map<RegistryKey<Biome>, List<Ore>> getRegistry(Dimension dimension) {
|
public static Map<RegistryKey<Biome>, List<Ore>> getRegistry(Dimension dimension) {
|
||||||
|
|
||||||
RegistryWrapper.WrapperLookup registry = BuiltinRegistries.createWrapperLookup();
|
RegistryWrapper.WrapperLookup registry = BuiltinRegistries.createWrapperLookup();
|
||||||
RegistryWrapper.Impl<PlacedFeature> features = registry.getWrapperOrThrow(RegistryKeys.PLACED_FEATURE);
|
RegistryWrapper.Impl<PlacedFeature> features = registry.getOrThrow(RegistryKeys.PLACED_FEATURE);
|
||||||
var reg = registry.getWrapperOrThrow(RegistryKeys.WORLD_PRESET).getOrThrow(WorldPresets.DEFAULT).value().createDimensionsRegistryHolder().dimensions();
|
var reg = registry.getOrThrow(RegistryKeys.WORLD_PRESET).getOrThrow(WorldPresets.DEFAULT).value().createDimensionsRegistryHolder().dimensions();
|
||||||
|
|
||||||
var dim = switch (dimension) {
|
var dim = switch (dimension) {
|
||||||
case Overworld -> reg.get(DimensionOptions.OVERWORLD);
|
case Overworld -> reg.get(DimensionOptions.OVERWORLD);
|
||||||
|
|||||||
@@ -70,9 +70,9 @@ public class RejectsUtils {
|
|||||||
double xDir = Math.cos(Math.toRadians(dir + 90));
|
double xDir = Math.cos(Math.toRadians(dir + 90));
|
||||||
double zDir = Math.sin(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 {
|
} else {
|
||||||
((IVec3d) event.movement).setXZ(0, 0);
|
((IVec3d) event.movement).meteor$setXZ(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
float ySpeed = 0;
|
float ySpeed = 0;
|
||||||
@@ -81,7 +81,7 @@ public class RejectsUtils {
|
|||||||
ySpeed += speed;
|
ySpeed += speed;
|
||||||
if (mc.options.sneakKey.isPressed())
|
if (mc.options.sneakKey.isPressed())
|
||||||
ySpeed -= speed;
|
ySpeed -= speed;
|
||||||
((IVec3d) event.movement).setY(verticalSpeedMatch ? ySpeed : ySpeed / 2);
|
((IVec3d) event.movement).meteor$setY(verticalSpeedMatch ? ySpeed : ySpeed / 2);
|
||||||
|
|
||||||
return ySpeed;
|
return ySpeed;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,13 +41,13 @@ public class WorldUtils {
|
|||||||
public static boolean interact(BlockPos pos, FindItemResult findItemResult, boolean rotate) {
|
public static boolean interact(BlockPos pos, FindItemResult findItemResult, boolean rotate) {
|
||||||
if (!findItemResult.found()) return false;
|
if (!findItemResult.found()) return false;
|
||||||
Runnable action = () -> {
|
Runnable action = () -> {
|
||||||
boolean wasSneaking = mc.player.input.sneaking;
|
boolean wasSneaking = mc.player.isSneaking();
|
||||||
mc.player.input.sneaking = false;
|
mc.player.setSneaking(false);
|
||||||
InvUtils.swap(findItemResult.slot(), true);
|
InvUtils.swap(findItemResult.slot(), true);
|
||||||
mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.ofCenter(pos), Direction.UP, pos, false));
|
mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.ofCenter(pos), Direction.UP, pos, false));
|
||||||
mc.player.swingHand(Hand.MAIN_HAND);
|
mc.player.swingHand(Hand.MAIN_HAND);
|
||||||
InvUtils.swapBack();
|
InvUtils.swapBack();
|
||||||
mc.player.input.sneaking = wasSneaking;
|
mc.player.setSneaking(wasSneaking);
|
||||||
};
|
};
|
||||||
if (rotate) Rotations.rotate(Rotations.getYaw(pos), Rotations.getPitch(pos), -100, action);
|
if (rotate) Rotations.rotate(Rotations.getYaw(pos), Rotations.getPitch(pos), -100, action);
|
||||||
else action.run();
|
else action.run();
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
"github:sha": "${gh_hash}"
|
"github:sha": "${gh_hash}"
|
||||||
},
|
},
|
||||||
"depends": {
|
"depends": {
|
||||||
"java": ">=16",
|
"java": ">=21",
|
||||||
"minecraft": "~${mc_version}",
|
"minecraft": "~${mc_version}",
|
||||||
"meteor-client": "*"
|
"meteor-client": "*"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
accessWidener v1 named
|
accessWidener v2 named
|
||||||
|
|
||||||
accessible class net/minecraft/network/packet/c2s/play/PlayerInteractEntityC2SPacket$InteractType
|
accessible class net/minecraft/network/packet/c2s/play/PlayerInteractEntityC2SPacket$InteractType
|
||||||
Reference in New Issue
Block a user