Compare commits

..

10 Commits

Author SHA1 Message Date
4a822e773c Update to Meteor-Rejects to 1.21.10
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2025-11-01 23:32:30 -03:00
dependabot[bot]
4563a7e7ef github-actions(deps): bump actions/setup-java from 3.13.0 to 4.7.0 (#409)
[no ci]

Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.13.0 to 4.7.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.13.0...v4.7.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-30 09:52:45 +07:00
dependabot[bot]
1783149fb1 github-actions(deps): bump actions/upload-artifact from 3 to 4 (#408)
[no ci]

* 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>

* github-actions(deps): bump actions/checkout from 3 to 4 (#288)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: SByte <stormybytes@gmail.com>

* github-actions(deps): bump actions/setup-java from 3.10.0 to 3.13.0 (#289)

Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.10.0 to 3.13.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.10.0...v3.13.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: SByte <stormybytes@gmail.com>

* Bumping Seedfinding Library Version to fix SimOre outdating issue (#376)

* Update build.gradle for seedfinding lib

---------

Co-authored-by: SByte <stormybytes@gmail.com>

* Update version displayed on build workflow

* github-actions(deps): bump actions/upload-artifact from 3 to 4

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ashray Shah <geektraindev@gmail.com>
Co-authored-by: crazymoose77756 <ryanrogo064@gmail.com>
Co-authored-by: SByte <stormybytes@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Azote | 窒垝 <azoteg@gmx.com>
2025-01-30 09:50:49 +07:00
SByte
faecb03084 Update version displayed on build workflow 2025-01-27 11:06:45 +07:00
Azote | 窒垝
4768fec4f6 Bumping Seedfinding Library Version to fix SimOre outdating issue (#376)
* Update build.gradle for seedfinding lib

---------

Co-authored-by: SByte <stormybytes@gmail.com>
2025-01-25 09:43:30 +07:00
dependabot[bot]
63c57eb114 github-actions(deps): bump actions/setup-java from 3.10.0 to 3.13.0 (#289)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.10.0 to 3.13.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.10.0...v3.13.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: SByte <stormybytes@gmail.com>
2025-01-25 09:18:15 +07:00
dependabot[bot]
2947dd7df8 github-actions(deps): bump actions/checkout from 3 to 4 (#288)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: SByte <stormybytes@gmail.com>
2025-01-25 08:59:36 +07:00
Ashray Shah
0dcf1a26d0 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>
2025-01-25 07:44:35 +07:00
ruriyoshinova
5049f5fbeb Fix mixin mismatch descriptor 2025-01-21 06:08:02 +07:00
crazymoose77756
fef076ad20 Update 1.21 (#365) 2024-07-01 09:04:40 +02:00
112 changed files with 965 additions and 768 deletions

View File

@@ -19,9 +19,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3.10.0
uses: actions/setup-java@v4.7.0
with:
java-version: 21
distribution: 'zulu'
@@ -34,9 +34,9 @@ jobs:
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest-1.20.6"
automatic_release_tag: "latest-1.21.4"
prerelease: false
title: "1.20.6 Build"
title: "1.21.4 Build"
files: |
./build/libs/*.jar

View File

@@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3.10.0
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4.7.0
with:
java-version: 21
distribution: 'zulu'
@@ -21,7 +21,7 @@ jobs:
- name: Build with Gradle
run: ./gradlew build
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pull-request-build
path: build/libs/

View File

@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'fabric-loom' version '1.11-SNAPSHOT'
}
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_21
@@ -18,6 +18,11 @@ repositories {
maven { url 'https://jitpack.io' }
maven { url 'https://maven.duti.dev/releases' }
}
loom {
accessWidenerPath = file("src/main/resources/meteor-rejects.accesswidener")
}
configurations {
// configuration that holds jars to include in the jar
extraLibs
@@ -34,13 +39,17 @@ dependencies {
mappings "net.fabricmc:yarn:${project.yarn_version}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation("meteordevelopment:meteor-client:${project.meteor_version}-SNAPSHOT")
modImplementation("meteordevelopment:meteor-client:${project.minecraft_version}-SNAPSHOT")
modCompileOnly "meteordevelopment:baritone:${project.baritone_version}-SNAPSHOT"
// Apache Commons Text for WordUtils
implementation 'org.apache.commons:commons-text:1.10.0'
include 'org.apache.commons:commons-text:1.10.0'
// seed .locate and ore sim
extraLibs('com.seedfinding:mc_math:ffd2edcfcc0d18147549c88cc7d8ec6cf21b5b91') { transitive = false }
extraLibs('com.seedfinding:mc_seed:1ead6fcefe7e8de4b3d60cd6c4e993f1e8f33409') { transitive = false }
extraLibs('com.seedfinding:mc_core:d64d5f90be66300da41ef58f4f1736db2499784f') { transitive = false }
extraLibs('com.seedfinding:mc_core:1.210.0') { transitive = false }
extraLibs('com.seedfinding:mc_noise:7e3ba65e181796c4a2a1c8881d840b2254b92962') { transitive = false }
extraLibs('com.seedfinding:mc_biome:41a42cb9019a552598f12089059538853e18ec78') { transitive = false }
extraLibs('com.seedfinding:mc_terrain:b4246cbd5880c4f8745ccb90e1b102bde3448126') { transitive = false }
@@ -53,10 +62,6 @@ dependencies {
configurations.implementation.extendsFrom(configurations.extraLibs)
}
loom {
accessWidenerPath = file("src/main/resources/meteor-rejects.accesswidener")
}
processResources {
inputs.property "version", project.version

View File

@@ -2,14 +2,13 @@
org.gradle.jvmargs=-Xmx2G
# Fabric Properties
minecraft_version=1.20.6
yarn_version=1.20.6+build.1
loader_version=0.15.11
minecraft_version=1.21.10
yarn_version=1.21.10+build.2
loader_version=0.17.2
# Mod Properties
mod_version = 0.3
maven_group = anticope.rejects
archives_base_name = meteor-rejects-addon
meteor_version=0.5.7
baritone_version=1.20.4
baritone_version=1.21.10

Binary file not shown.

View File

@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

296
gradlew vendored
View File

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

33
gradlew.bat vendored
View File

@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@@ -26,6 +28,7 @@ if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal

View File

@@ -50,7 +50,7 @@ public class MeteorRejectsAddon extends MeteorAddon {
modules.add(new BoatPhase());
modules.add(new Boost());
modules.add(new BungeeCordSpoof());
modules.add(new ChatBot());
// modules.add(new ChatBot()); // DESABILITADO: Starscript API removida
modules.add(new ChestAura());
modules.add(new ChorusExploit());
modules.add(new ColorSigns());
@@ -63,7 +63,7 @@ public class MeteorRejectsAddon extends MeteorAddon {
modules.add(new GhostMode());
modules.add(new Glide());
modules.add(new ItemGenerator());
modules.add(new InteractionMenu());
// modules.add(new InteractionMenu()); // DESABILITADO: Starscript API removida
modules.add(new Jetpack());
modules.add(new KnockbackPlus());
modules.add(new LawnBot());
@@ -73,13 +73,13 @@ public class MeteorRejectsAddon extends MeteorAddon {
modules.add(new NoJumpDelay());
modules.add(new ObsidianFarm());
modules.add(new OreSim());
modules.add(new PacketFly());
// modules.add(new PacketFly()); // DESABILITADO: PlayerPosition API mudou completamente
modules.add(new Painter());
modules.add(new Rendering());
modules.add(new RoboWalk());
modules.add(new ShieldBypass());
modules.add(new SilentDisconnect());
modules.add(new SkeletonESP());
// modules.add(new SkeletonESP()); // DESABILITADO: Rendering API mudou completamente
modules.add(new SoundLocator());
modules.add(new TreeAura());
modules.add(new VehicleOneHit());
@@ -135,7 +135,7 @@ public class MeteorRejectsAddon extends MeteorAddon {
.get().getMetadata()
.getCustomValue("github:sha")
.getAsString();
LOG.info(String.format("Rejects version: %s", commit));
LOG.info("Rejects version: {}", commit);
return commit.isEmpty() ? null : commit.trim();
}

View File

@@ -13,7 +13,6 @@ import net.minecraft.command.argument.Vec3ArgumentType;
import net.minecraft.server.command.CommandManager;
import net.minecraft.util.math.Vec3d;
import java.util.Arrays;
import java.util.Collection;
import java.util.concurrent.CompletableFuture;

View File

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

View File

@@ -6,9 +6,6 @@ import net.minecraft.command.CommandSource;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.util.math.MathHelper;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;
public class CenterCommand extends Command {
public CenterCommand() {
super("center", "Centers the player on a block.");
@@ -20,7 +17,7 @@ public class CenterCommand extends Command {
double x = MathHelper.floor(mc.player.getX()) + 0.5;
double z = MathHelper.floor(mc.player.getZ()) + 0.5;
mc.player.setPosition(x, mc.player.getY(), z);
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround()));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround(), mc.player.horizontalCollision));
return SINGLE_SUCCESS;
}));
@@ -29,7 +26,7 @@ public class CenterCommand extends Command {
double x = MathHelper.floor(mc.player.getX());
double z = MathHelper.floor(mc.player.getZ());
mc.player.setPosition(x, mc.player.getY(), z);
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround()));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround(), mc.player.horizontalCollision));
return SINGLE_SUCCESS;
}));

View File

@@ -4,9 +4,6 @@ import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import meteordevelopment.meteorclient.commands.Command;
import net.minecraft.command.CommandSource;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;
public class ClearChatCommand extends Command {
public ClearChatCommand() {
super("clear-chat", "Clears your chat.", "clear", "cls");

View File

@@ -9,9 +9,6 @@ import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;
public class GhostCommand extends Command {
public GhostCommand() {
super("ghost", "Remove ghost blocks & bypass AntiXray", "aax", "anti-anti-xray");

View File

@@ -44,8 +44,9 @@ public class GiveCommand extends Command {
if (inHand.getItem() instanceof BlockItem) {
ct.putInt("Time", 1);
ct.putString("id", "minecraft:falling_block");
ct.put("BlockState", new NbtCompound());
ct.getCompound("BlockState").putString("Name", Registries.ITEM.getId(inHand.getItem()).toString());
NbtCompound blockState = new NbtCompound();
blockState.putString("Name", Registries.ITEM.getId(inHand.getItem()).toString());
ct.put("BlockState", blockState);
} else {
ct.putString("id", "minecraft:item");
@@ -88,7 +89,7 @@ public class GiveCommand extends Command {
var changes = ComponentChanges.builder()
.add(DataComponentTypes.CUSTOM_NAME, Text.literal(message))
.add(DataComponentTypes.ENTITY_DATA, NbtComponent.of(tag))
.add(DataComponentTypes.CUSTOM_DATA, NbtComponent.of(tag))
.build();
stack.applyChanges(changes);
@@ -108,7 +109,7 @@ public class GiveCommand extends Command {
var changes = ComponentChanges.builder()
.add(DataComponentTypes.CUSTOM_NAME, Text.literal(message))
.add(DataComponentTypes.ENTITY_DATA, NbtComponent.of(tag))
.add(DataComponentTypes.CUSTOM_DATA, NbtComponent.of(tag))
.build();
stack.applyChanges(changes);
@@ -121,8 +122,10 @@ public class GiveCommand extends Command {
String playerName = ctx.getArgument("owner", String.class);
ItemStack itemStack = new ItemStack(Items.PLAYER_HEAD);
// For now, skip the profile component as it's causing issues
// TODO: Fix ProfileComponent usage for player heads
var changes = ComponentChanges.builder()
.add(DataComponentTypes.PROFILE, new ProfileComponent(new GameProfile(getUUID(playerName), playerName)))
.add(DataComponentTypes.CUSTOM_NAME, Text.literal(playerName + "'s Head"))
.build();
itemStack.applyChanges(changes);

View File

@@ -7,8 +7,6 @@ import meteordevelopment.meteorclient.gui.GuiThemes;
import meteordevelopment.meteorclient.utils.Utils;
import net.minecraft.command.CommandSource;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
public class HeadsCommand extends Command {
public HeadsCommand() {

View File

@@ -11,9 +11,6 @@ import net.minecraft.network.packet.s2c.common.DisconnectS2CPacket;
import net.minecraft.text.Text;
import org.apache.commons.lang3.SystemUtils;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;
public class KickCommand extends Command {
public KickCommand() {
@@ -47,7 +44,7 @@ public class KickCommand extends Command {
return SINGLE_SUCCESS;
}));
builder.then(literal("pos").executes(ctx -> {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(Double.NaN, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, !mc.player.isOnGround()));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(Double.NaN, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, !mc.player.isOnGround(), mc.player.horizontalCollision));
return SINGLE_SUCCESS;
}));
builder.then(literal("hurt").executes(ctx -> {

View File

@@ -19,9 +19,6 @@ import net.minecraft.util.math.Vec3d;
import cubitect.Cubiomes;
import cubitect.Cubiomes.Pos;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;
public class LocateCommand extends Command {
private final static DynamicCommandExceptionType NOT_FOUND = new DynamicCommandExceptionType(o -> {

View File

@@ -8,8 +8,6 @@ import net.minecraft.command.CommandSource;
import java.util.ArrayList;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
public class PanicCommand extends Command {
public PanicCommand() {
super("panic", "Disables all modules.", "disable-all");

View File

@@ -8,9 +8,8 @@ import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
import net.minecraft.client.network.ServerAddress;
import net.minecraft.client.network.ServerInfo;
import net.minecraft.command.CommandSource;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;
import net.minecraft.network.packet.s2c.common.DisconnectS2CPacket;
import net.minecraft.text.Text;
public class ReconnectCommand extends Command {
public ReconnectCommand() {
@@ -22,7 +21,7 @@ public class ReconnectCommand extends Command {
builder.executes(context -> {
ServerInfo info = mc.isInSingleplayer() ? null : mc.getCurrentServerEntry();
if (info != null) {
mc.world.disconnect();
mc.player.networkHandler.onDisconnect(new DisconnectS2CPacket(Text.literal("Reconnecting...")));
ConnectScreen.connect(new MultiplayerScreen(new TitleScreen()), mc,
ServerAddress.parse(info.address), info, false, null);
}

View File

@@ -23,8 +23,6 @@ import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.UUID;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
public class SaveSkinCommand extends Command {
private final static SimpleCommandExceptionType IO_EXCEPTION = new SimpleCommandExceptionType(Text.literal("An exception occurred"));
@@ -46,7 +44,7 @@ public class SaveSkinCommand extends Command {
@Override
public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.then(argument("player", PlayerListEntryArgumentType.create()).executes(ctx -> {
UUID id = PlayerListEntryArgumentType.get(ctx).getProfile().getId();
UUID id = PlayerListEntryArgumentType.get(ctx).getProfile().id();
String path = TinyFileDialogs.tinyfd_saveFileDialog("Save image", null, filters, null);
if (path == null) IO_EXCEPTION.create();
if (path != null) {

View File

@@ -13,8 +13,6 @@ import net.minecraft.command.CommandSource;
import net.minecraft.text.MutableText;
import net.minecraft.text.Text;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
public class SeedCommand extends Command {
private final static SimpleCommandExceptionType NO_SEED = new SimpleCommandExceptionType(Text.literal("No seed for current world saved."));

View File

@@ -10,19 +10,17 @@ import meteordevelopment.meteorclient.commands.Command;
import net.minecraft.client.network.ServerInfo;
import net.minecraft.command.CommandSource;
import net.minecraft.text.ClickEvent;
import net.minecraft.text.ClickEvent.Action;
import net.minecraft.text.HoverEvent;
import net.minecraft.text.MutableText;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import java.net.URI;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.*;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;
/*
Ported from Cornos
https://github.com/cornos/Cornos/blob/master/src/main/java/me/zeroX150/cornos/features/command/impl/Scan.java
@@ -119,46 +117,38 @@ public class ServerCommand extends Command {
text.append(ports.get(port));
if (ports.get(port).startsWith("HTTP") || ports.get(port).startsWith("FTP")) {
text.setStyle(text.getStyle()
.withClickEvent(new ClickEvent(
Action.OPEN_URL,
String.format("%s://%s:%d", ports.get(port).toLowerCase(), address.getHostAddress(), port)
.withClickEvent(new ClickEvent.OpenUrl(
URI.create(String.format("%s://%s:%d", ports.get(port).toLowerCase(), address.getHostAddress(), port))
))
.withHoverEvent(new HoverEvent(
HoverEvent.Action.SHOW_TEXT,
.withHoverEvent(new HoverEvent.ShowText(
Text.literal("Open in browser")
))
);
} else if (Objects.equals(ports.get(port), "DynMap")) {
text.setStyle(text.getStyle()
.withClickEvent(new ClickEvent(
ClickEvent.Action.OPEN_URL,
String.format("http://%s:%d", address.getHostAddress(), port)
.withClickEvent(new ClickEvent.OpenUrl(
URI.create(String.format("http://%s:%d", address.getHostAddress(), port))
))
.withHoverEvent(new HoverEvent(
HoverEvent.Action.SHOW_TEXT,
.withHoverEvent(new HoverEvent.ShowText(
Text.literal("Open in browser")
))
);
} else {
text.setStyle(text.getStyle()
.withClickEvent(new ClickEvent(
ClickEvent.Action.COPY_TO_CLIPBOARD,
.withClickEvent(new ClickEvent.CopyToClipboard(
String.format("%s:%d", address.getHostAddress(), port)
))
.withHoverEvent(new HoverEvent(
HoverEvent.Action.SHOW_TEXT,
.withHoverEvent(new HoverEvent.ShowText(
Text.literal("Copy")
))
);
}
} else {
text.setStyle(text.getStyle()
.withClickEvent(new ClickEvent(
ClickEvent.Action.COPY_TO_CLIPBOARD,
.withClickEvent(new ClickEvent.CopyToClipboard(
String.format("%s:%d", address.getHostAddress(), port)
))
.withHoverEvent(new HoverEvent(
HoverEvent.Action.SHOW_TEXT,
.withHoverEvent(new HoverEvent.ShowText(
Text.literal("Copy")
))
);

View File

@@ -10,9 +10,6 @@ import net.minecraft.command.argument.BlockStateArgumentType;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;
public class SetBlockCommand extends Command {
public SetBlockCommand() {
super("setblock", "Sets client side blocks", "sblk");

View File

@@ -5,9 +5,6 @@ import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import meteordevelopment.meteorclient.commands.Command;
import net.minecraft.command.CommandSource;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;
public class SetVelocityCommand extends Command {
public SetVelocityCommand() {
super("set-velocity", "Sets player velocity", "velocity", "vel");

View File

@@ -7,9 +7,6 @@ import meteordevelopment.meteorclient.commands.Command;
import net.minecraft.command.CommandSource;
import net.minecraft.util.math.Vec3d;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;
public class TeleportCommand extends Command {

View File

@@ -16,9 +16,6 @@ import java.io.FileWriter;
import java.io.IOException;
import java.nio.ByteBuffer;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;
public class TerrainExport extends Command {
private final static SimpleCommandExceptionType IO_EXCEPTION = new SimpleCommandExceptionType(Text.literal("An IOException occurred"));

View File

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

View File

@@ -98,7 +98,7 @@ public class HeadScreen extends WindowScreen {
WButton equip = t.add(theme.button("Equip")).widget();
equip.tooltip = "Equip client-side.";
equip.action = () -> {
mc.player.getInventory().armor.set(3, head);
mc.player.getInventory().setStack(39, head);
};
t.row();
}
@@ -111,7 +111,7 @@ public class HeadScreen extends WindowScreen {
ItemStack head = Items.PLAYER_HEAD.getDefaultStack();
NbtCompound tag = new NbtCompound();
NbtCompound skullOwner = new NbtCompound();
skullOwner.putUuid("Id", UUID.fromString(uuid));
skullOwner.putString("Id", uuid);
NbtCompound properties = new NbtCompound();
NbtList textures = new NbtList();
NbtCompound Value = new NbtCompound();

View File

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

View File

@@ -102,7 +102,7 @@ public class CleanUpScreen extends WindowScreen {
}
private boolean isSameProtocol(ServerInfo server) {
return server.protocolVersion == SharedConstants.getGameVersion().getProtocolVersion();
return server.protocolVersion == SharedConstants.getProtocolVersion();
}
private boolean isFailedPing(ServerInfo server) {

View File

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

View File

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

View File

@@ -221,6 +221,16 @@ public class MeteorRoundedGuiTheme extends GuiTheme {
return w(new WMeteorMinus());
}
@Override
public WConfirmedMinus confirmedMinus() {
return w(new WMeteorConfirmedMinus());
}
@Override
public WConfirmedButton confirmedButton(String text, String message, GuiTexture texture) {
return w(new WMeteorConfirmedButton(text, message, texture));
}
@Override
public WPlus plus() {
return w(new WMeteorPlus());

View File

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

View File

@@ -0,0 +1,29 @@
/*
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client/).
* Copyright (c) 2021 Meteor Development.
*/
package anticope.rejects.gui.themes.rounded.widgets.pressable;
import meteordevelopment.meteorclient.gui.renderer.GuiRenderer;
import meteordevelopment.meteorclient.gui.renderer.packer.GuiTexture;
import anticope.rejects.gui.themes.rounded.MeteorWidget;
import meteordevelopment.meteorclient.gui.widgets.pressable.WConfirmedButton;
public class WMeteorConfirmedButton extends WConfirmedButton implements MeteorWidget {
public WMeteorConfirmedButton(String text, String message, GuiTexture texture) {
super(text, message, texture);
}
@Override
protected void onRender(GuiRenderer renderer, double mouseX, double mouseY, double delta) {
renderBackground(renderer, this, pressed, mouseOver);
if (texture != null) {
double ts = theme().textHeight();
renderer.quad(x + width / 2 - ts / 2, y + pad(), ts, ts, texture, theme().textColor.get());
} else {
renderer.text(text, x + width / 2 - theme().textRenderer().getWidth(text) / 2, y + pad(), theme().textColor.get(), false);
}
}
}

View File

@@ -0,0 +1,21 @@
/*
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client/).
* Copyright (c) 2021 Meteor Development.
*/
package anticope.rejects.gui.themes.rounded.widgets.pressable;
import meteordevelopment.meteorclient.gui.renderer.GuiRenderer;
import anticope.rejects.gui.themes.rounded.MeteorWidget;
import meteordevelopment.meteorclient.gui.widgets.pressable.WConfirmedMinus;
public class WMeteorConfirmedMinus extends WConfirmedMinus implements MeteorWidget {
@Override
protected void onRender(GuiRenderer renderer, double mouseX, double mouseY, double delta) {
double pad = pad();
double s = theme.scale(3);
renderBackground(renderer, this, pressed, mouseOver);
renderer.quad(x + pad, y + height / 2 - s / 2, width - pad * 2, s, theme().minusColor.get());
}
}

View File

@@ -4,6 +4,7 @@ import anticope.rejects.modules.SilentDisconnect;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import net.minecraft.client.network.ClientCommonNetworkHandler;
import net.minecraft.network.DisconnectionInfo;
import net.minecraft.text.Text;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -15,11 +16,11 @@ import static meteordevelopment.meteorclient.MeteorClient.mc;
@Mixin(ClientCommonNetworkHandler.class)
public class ClientCommonNetwokHandlerMixin {
@Inject(method = "onDisconnected", at = @At("HEAD"), cancellable = true)
private void onDisconnected(Text reason, CallbackInfo info) {
private void onDisconnected(DisconnectionInfo info, CallbackInfo ci) {
if (Modules.get().isActive(SilentDisconnect.class) && mc.world != null && mc.player != null) {
ChatUtils.info(Text.translatable("disconnect.lost").getString() + ":");
ChatUtils.sendMsg(reason);
info.cancel();
ChatUtils.sendMsg(info.reason());
ci.cancel();
}
}
}

View File

@@ -0,0 +1,13 @@
package anticope.rejects.mixin;
import net.minecraft.client.network.ClientPlayerEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(ClientPlayerEntity.class)
public interface ClientPlayerEntityAccessor {
@Mutable
@Accessor("ticksSinceLastPositionPacketSent")
void setTicksSinceLastPositionPacketSent(int ticks);
}

View File

@@ -13,6 +13,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public class ClientPlayerInteractionManagerMixin {
@Inject(method = "stopUsingItem", at = @At("HEAD"))
public void onStopUsingItem(PlayerEntity player, CallbackInfo ci) {
MeteorClient.EVENT_BUS.post(StopUsingItemEvent.get(player.getInventory().getMainHandStack()));
MeteorClient.EVENT_BUS.post(StopUsingItemEvent.get(player.getMainHandStack()));
}
}

View File

@@ -5,7 +5,6 @@ import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.render.NoRender;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.ChatInputSuggestor;
import net.minecraft.client.util.math.MatrixStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;

View File

@@ -1,19 +0,0 @@
package anticope.rejects.mixin;
import anticope.rejects.modules.Rendering;
import meteordevelopment.meteorclient.systems.modules.Modules;
import net.minecraft.client.render.entity.feature.Deadmau5FeatureRenderer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(Deadmau5FeatureRenderer.class)
public class Deadmau5FeatureRendererMixin {
@Redirect(method = "render", at = @At(value = "INVOKE", target = "Ljava/lang/String;equals(Ljava/lang/Object;)Z"))
private boolean redirectAllow(String s, Object name){
Rendering renderingModule = Modules.get().get(Rendering.class);
if (renderingModule != null && renderingModule.deadmau5EarsEnabled()) return true;
return name.equals(s);
}
}

View File

@@ -0,0 +1,27 @@
package anticope.rejects.mixin;
import anticope.rejects.modules.Rendering;
import meteordevelopment.meteorclient.systems.modules.Modules;
import net.minecraft.client.network.AbstractClientPlayerEntity;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.feature.Deadmau5FeatureRenderer;
import net.minecraft.client.util.math.MatrixStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(Deadmau5FeatureRenderer.class)
public class Deadmau5FeatureRendererMixin {
@Inject(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/client/network/AbstractClientPlayerEntity;FFFFFF)V", at = @At("HEAD"), cancellable = true)
private void onRender(MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, AbstractClientPlayerEntity player, float limbAngle, float limbDistance, float tickDelta, float animationProgress, float headYaw, float headPitch, CallbackInfo ci) {
Rendering renderingModule = Modules.get().get(Rendering.class);
if (renderingModule != null && !renderingModule.deadmau5EarsEnabled()) {
// If the feature is disabled and player is not deadmau5, cancel rendering
if (!player.getName().getString().equals("deadmau5")) {
ci.cancel();
}
}
// If the feature is enabled, allow rendering for everyone (don't cancel)
}
}

View File

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

View File

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

View File

@@ -0,0 +1,14 @@
package anticope.rejects.mixin;
import net.minecraft.entity.player.PlayerInventory;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(PlayerInventory.class)
public interface PlayerInventoryAccessor {
@Accessor("selectedSlot")
int getSelectedSlot();
@Accessor("selectedSlot")
void setSelectedSlot(int slot);
}

View File

@@ -14,4 +14,11 @@ public interface PlayerMoveC2SPacketAccessor {
@Mutable
@Accessor("z")
void setZ(double z);
@Mutable
@Accessor("y")
void setY(double y);
@Accessor("y")
double getY();
}

View File

@@ -9,11 +9,17 @@ import org.spongepowered.asm.mixin.injection.ModifyVariable;
@Mixin(TexturedRenderLayers.class)
public class TexturedRenderLayersMixin {
@ModifyVariable(method = "getChestTextureId(Lnet/minecraft/block/entity/BlockEntity;Lnet/minecraft/block/enums/ChestType;Z)Lnet/minecraft/client/util/SpriteIdentifier;", at = @At("LOAD"), ordinal = 0)
private static boolean chrsitmas(boolean christmas) {
@ModifyVariable(
method = "getChestTextureId",
at = @At("HEAD"),
ordinal = 0,
argsOnly = true
)
private static boolean christmas(boolean christmas) {
Rendering rendering = Modules.get().get(Rendering.class);
if (rendering != null && rendering.chistmas())
if (rendering != null && rendering.chistmas()) {
return true;
}
return christmas;
}
}

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
package anticope.rejects.mixin.meteor.modules;
import anticope.rejects.modules.ShieldBypass;
// import anticope.rejects.modules.ShieldBypass;
import anticope.rejects.utils.RejectsUtils;
import meteordevelopment.meteorclient.events.Cancellable;
import meteordevelopment.meteorclient.events.world.TickEvent;
@@ -123,18 +123,19 @@ public class KillAuraMixin extends Module {
hitTimer -= random.nextInt(randomDelayMax.get());
}
@Inject(method = "attack", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerInteractionManager;attackEntity(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/Entity;)V"), cancellable = true)
private void onHit(Entity target, CallbackInfo info) {
ShieldBypass shieldBypass = Modules.get().get(ShieldBypass.class);
if (shieldBypass.isActive()) {
Cancellable dummyEvent = new Cancellable();
shieldBypass.bypass(target, dummyEvent);
if (dummyEvent.isCancelled()) {
hitTimer = 0;
info.cancel();
}
}
}
// ShieldBypass desabilitado temporariamente
// @Inject(method = "attack", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerInteractionManager;attackEntity(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/Entity;)V"), cancellable = true)
// private void onHit(Entity target, CallbackInfo info) {
// ShieldBypass shieldBypass = Modules.get().get(ShieldBypass.class);
// if (shieldBypass.isActive()) {
// Cancellable dummyEvent = new Cancellable();
// shieldBypass.bypass(target, dummyEvent);
// if (dummyEvent.isCancelled()) {
// hitTimer = 0;
// info.cancel();
// }
// }
// }
private double randomOffset() {
return Math.random() * 4 - 2;

View File

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

View File

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

View File

@@ -123,7 +123,7 @@ public class AntiVanish extends Module {
switch (mode.get()) {
case LeaveMessage -> {
Map<UUID, String> oldPlayers = Map.copyOf(playerCache);
playerCache = mc.getNetworkHandler().getPlayerList().stream().collect(Collectors.toMap(e -> e.getProfile().getId(), e -> e.getProfile().getName()));
playerCache = mc.getNetworkHandler().getPlayerList().stream().collect(Collectors.toMap(e -> e.getProfile().id(), e -> e.getProfile().name()));
for (UUID uuid : oldPlayers.keySet()) {
if (playerCache.containsKey(uuid)) continue;

View File

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

View File

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

View File

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

View File

@@ -83,7 +83,7 @@ public class AutoExtinguish extends Module {
private BlockPos blockPos = null;
private boolean doesWaterBucketWork = true;
private static final StatusEffect FIRE_RESISTANCE = Registries.STATUS_EFFECT.get(new Identifier("fire_resistance"));
private static final StatusEffect FIRE_RESISTANCE = Registries.STATUS_EFFECT.get(Identifier.of("fire_resistance"));
public AutoExtinguish() {
super(MeteorRejectsAddon.CATEGORY, "auto-extinguish", "Automatically extinguishes fire around you");
@@ -150,17 +150,17 @@ public class AutoExtinguish extends Module {
private void place(int slot) {
if (slot != -1) {
final int preSlot = mc.player.getInventory().selectedSlot;
final int preSlot = ((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).getSelectedSlot();
if (center.get()) {
PlayerUtils.centerPlayer();
}
mc.player.getInventory().selectedSlot = slot;
((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).setSelectedSlot(slot);
float yaw = mc.gameRenderer.getCamera().getYaw() % 360;
float pitch = mc.gameRenderer.getCamera().getPitch() % 360;
Rotations.rotate(yaw, 90);
mc.interactionManager.interactItem(mc.player, Hand.MAIN_HAND);
mc.player.getInventory().selectedSlot = preSlot;
((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).setSelectedSlot(preSlot);
Rotations.rotate(yaw, pitch);
}

View File

@@ -13,10 +13,13 @@ import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.registry.tag.EnchantmentTags;
import net.minecraft.screen.GrindstoneScreenHandler;
import java.util.List;
import java.util.Set;
public class AutoGrind extends Module {
private final SettingGroup sgGeneral = settings.getDefaultGroup();
@@ -38,7 +41,7 @@ public class AutoGrind extends Module {
.build()
);
private final Setting<List<Enchantment>> enchantmentBlacklist = sgGeneral.add(new EnchantmentListSetting.Builder()
private final Setting<Set<RegistryKey<Enchantment>>> enchantmentBlacklist = sgGeneral.add(new EnchantmentListSetting.Builder()
.name("enchantment-blacklist")
.description("Enchantments that should be ignored.")
.defaultValue()
@@ -80,7 +83,7 @@ public class AutoGrind extends Module {
for (RegistryEntry<Enchantment> enchantment : enchantments.getEnchantments()) {
availEnchs++;
if (enchantment.value().isCursed())
if (EnchantmentHelper.hasAnyEnchantmentsIn(stack, EnchantmentTags.CURSE))
availEnchs--;
if (enchantmentBlacklist.get().contains(enchantment.value()))
return false;

View File

@@ -67,7 +67,7 @@ public class AutoLogin extends Module {
btn.action = () -> {
String password = RejectsUtils.getRandomPassword(16);
MutableText text = Text.literal(Formatting.BOLD + "Click here to register securely.");
text.setStyle(text.getStyle().withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, String.format("/register %s %s", password, password))));
text.setStyle(text.getStyle().withClickEvent(new ClickEvent.RunCommand(String.format("/register %s %s", password, password))));
info(text);
};
return l;

View File

@@ -30,6 +30,7 @@ import java.util.ArrayList;
import java.util.List;
public class AutoPot extends Module {
@SuppressWarnings("unchecked")
private static final Class<? extends Module>[] AURAS = new Class[]{KillAura.class, CrystalAura.class, AnchorAura.class, BedAura.class};
private final SettingGroup sgGeneral = settings.getDefaultGroup();
@@ -166,7 +167,7 @@ public class AutoPot extends Module {
}
private void changeSlot(int slot) {
mc.player.getInventory().selectedSlot = slot;
((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).setSelectedSlot(slot);
this.slot = slot;
}
@@ -190,7 +191,7 @@ public class AutoPot extends Module {
}
private void startPotionUse() {
prevSlot = mc.player.getInventory().selectedSlot;
prevSlot = ((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).getSelectedSlot();
if (useSplashPots.get()) {
if (lookDown.get()) {

View File

@@ -130,23 +130,24 @@ public class AutoRename extends Module {
if (compound == null) {
return "";
}
compound = compound.getCompound("BlockEntityTag");
compound = compound.getCompound("BlockEntityTag").orElse(null);
if (compound == null) {
return "";
}
var list = compound.getList("Items", NbtElement.COMPOUND_TYPE);
var list = compound.getList("Items").orElse(null);
if (list == null) {
return "";
}
var minslot = Byte.MAX_VALUE;
var name = "";
for (int i = 0; i < list.size(); i++) {
var invItem = list.getCompound(i);
var invSlot = invItem.getByte("Slot");
var invItem = list.getCompound(i).orElse(null);
if (invItem == null) continue;
byte invSlot = invItem.getByte("Slot").orElse(Byte.MAX_VALUE);
if (minslot < invSlot) {
continue;
}
var itemId = invItem.getString("id");
String itemId = invItem.getString("id").orElse(null);
if (itemId == null) {
continue;
}

View File

@@ -14,15 +14,17 @@ import net.minecraft.block.CraftingTableBlock;
import net.minecraft.entity.Entity;
import net.minecraft.entity.passive.TameableEntity;
import net.minecraft.entity.passive.VillagerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.item.StewItem;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.hit.EntityHitResult;
import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
import java.util.List;
public class AutoSoup extends Module {
private static final String desc = "Automatically eats soup when your health is low on some servers.";
@@ -85,10 +87,10 @@ public class AutoSoup extends Module {
// save old slot
if (oldSlot == -1)
oldSlot = mc.player.getInventory().selectedSlot;
oldSlot = ((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).getSelectedSlot();
// set slot
mc.player.getInventory().selectedSlot = soupInHotbar;
((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).setSelectedSlot(soupInHotbar);
// eat soup
mc.options.useKey.setPressed(true);
@@ -108,10 +110,12 @@ public class AutoSoup extends Module {
}
private int findSoup(int startSlot, int endSlot) {
List<Item> stews = List.of(Items.RABBIT_STEW, Items.MUSHROOM_STEW, Items.BEETROOT_SOUP);
for (int i = startSlot; i < endSlot; i++) {
ItemStack stack = mc.player.getInventory().getStack(i);
if (stack != null && stack.getItem() instanceof StewItem)
if (stack != null && stews.contains(stack.getItem()))
return i;
}
@@ -128,16 +132,16 @@ public class AutoSoup extends Module {
}
private boolean isClickable(HitResult hitResult) {
if (hitResult == null)
switch (hitResult) {
case null -> {
return false;
if (hitResult instanceof EntityHitResult) {
}
case EntityHitResult entityHitResult -> {
Entity entity = ((EntityHitResult) mc.crosshairTarget).getEntity();
return entity instanceof VillagerEntity
|| entity instanceof TameableEntity;
}
if (hitResult instanceof BlockHitResult) {
case BlockHitResult blockHitResult -> {
BlockPos pos = ((BlockHitResult) mc.crosshairTarget).getBlockPos();
if (pos == null)
return false;
@@ -146,6 +150,9 @@ public class AutoSoup extends Module {
return block instanceof BlockWithEntity
|| block instanceof CraftingTableBlock;
}
default -> {
}
}
return false;
}
@@ -159,7 +166,7 @@ public class AutoSoup extends Module {
mc.options.useKey.setPressed(false);
// reset slot
mc.player.getInventory().selectedSlot = oldSlot;
((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).setSelectedSlot(oldSlot);
oldSlot = -1;
}

View File

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

View File

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

View File

@@ -67,7 +67,7 @@ public class BlockIn extends Module {
@Override
public void onActivate() {
sY = mc.player.getPos().getY();
sY = mc.player.getY();
}
@EventHandler

View File

@@ -120,7 +120,9 @@ public class BoatGlitch extends Module {
}
@EventHandler
private void onKey(KeyEvent event) {
if (event.key == mc.options.sneakKey.getDefaultKey().getCode() && event.action == KeyAction.Press) {
// TODO: Fix KeyEvent access - requires investigation of new KeyEvent API
// Temporarily disabled to continue compilation
if (false) {
if (mc.player.getVehicle() != null && mc.player.getVehicle() instanceof BoatEntity) {
dontPhase = false;
boat = null;

View File

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

View File

@@ -9,7 +9,6 @@ import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.NetworkState;
import net.minecraft.network.packet.c2s.handshake.ConnectionIntent;
import net.minecraft.network.packet.c2s.handshake.HandshakeC2SPacket;
@@ -64,7 +63,7 @@ public class BungeeCordSpoof extends Module {
}
private String getProperty() {
PropertyMap propertyMap = mc.getGameProfile().getProperties();
PropertyMap propertyMap = mc.getGameProfile().properties();
return "\0" + GSON.toJson(propertyMap.values().toArray());
}
}

View File

@@ -143,7 +143,9 @@ public class ChestAura extends Module {
@EventHandler(priority = EventPriority.HIGH)
private void onInventory(InventoryEvent event) {
ScreenHandler handler = mc.player.currentScreenHandler;
if (event.packet.getSyncId() == handler.syncId) {
// TODO: Fix sync ID access - may need different approach for 1.21.10
// if (event.packet.synchronizationId() == handler.syncId) {
if (true) {
switch (closeCondition.get()) {
case IfEmpty -> {
DefaultedList<ItemStack> stacks = DefaultedList.of();
@@ -152,7 +154,7 @@ public class ChestAura extends Module {
}
case Always -> mc.player.closeHandledScreen();
case AfterSteal ->
((IInventoryTweaks) Modules.get().get(InventoryTweaks.class)).stealCallback(() -> RenderSystem.recordRenderCall(() -> mc.player.closeHandledScreen()));
((IInventoryTweaks) Modules.get().get(InventoryTweaks.class)).stealCallback(() -> mc.player.closeHandledScreen());
}
}
MeteorClient.EVENT_BUS.unsubscribe(this);

View File

@@ -142,9 +142,10 @@ public class ChorusExploit extends Module {
if (event.packet instanceof PlayerPositionLookS2CPacket posPacket && ateChorus) {
event.setCancelled(true);
if (positionMode.get() == PositionMode.PosLook) {
cposX = posPacket.getX();
cposY = posPacket.getY();
cposZ = posPacket.getZ();
Vec3d pos = posPacket.change().position();
cposX = pos.x;
cposY = pos.y;
cposZ = pos.z;
gotPosition = true;
}
}
@@ -154,7 +155,7 @@ public class ChorusExploit extends Module {
private void onTick(TickEvent.Pre event) {
if (ateChorus) {
delay++;
if (!mc.player.getPos().equals(new Vec3d(posX, posY, posZ)) && renderActual.get()) {
if (!new Vec3d(mc.player.getX(), mc.player.getY(), mc.player.getZ()).equals(new Vec3d(posX, posY, posZ)) && renderActual.get()) {
mc.player.setPos(posX, posY, posZ);
}
@@ -162,7 +163,7 @@ public class ChorusExploit extends Module {
sendPackets();
}
if (onItemSwitch.get() && slot != mc.player.getInventory().selectedSlot) {
if (onItemSwitch.get() && slot != ((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).getSelectedSlot()) {
sendPackets();
}
}
@@ -175,7 +176,7 @@ public class ChorusExploit extends Module {
posY = mc.player.getY();
posZ = mc.player.getZ();
ateChorus = true;
slot = mc.player.getInventory().selectedSlot;
slot = ((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).getSelectedSlot();
}
}

View File

@@ -69,7 +69,7 @@ public class ColorSigns extends Module {
private void checkWarning() {
assert mc.player != null;
MinecraftServer server = mc.player.getServer();
MinecraftServer server = mc.getServer();
if (server == null) return;
String brand = server.getServerModName();
if (brand == null) return;

View File

@@ -125,8 +125,8 @@ public class Confuse extends Module {
if (target == null) return;
Vec3d entityPos = target.getPos();
Vec3d playerPos = mc.player.getPos();
Vec3d entityPos = target.getEntityPos();
Vec3d playerPos = mc.player.getEntityPos();
Random r = new Random();
BlockHitResult hit;
int halfRange = range.get() / 2;
@@ -142,14 +142,14 @@ public class Confuse extends Module {
goal = new Vec3d(x, playerPos.y, z);
}
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.getEntityPos(), goal, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.ANY, mc.player));
if (!moveThroughBlocks.get() && hit.isInsideBlock()) {
delayWaited = (int) (delay.get() - 1);
delayWaited = delay.get() - 1;
break;
}
mc.player.updatePosition(goal.x, goal.y, goal.z);
} else {
delayWaited = (int) (delay.get() - 1);
delayWaited = delay.get() - 1;
}
break;
@@ -157,9 +157,9 @@ public class Confuse extends Module {
Vec3d diff = entityPos.subtract(playerPos);
Vec3d diff1 = new Vec3d(MathHelper.clamp(diff.x, -halfRange, halfRange), MathHelper.clamp(diff.y, -halfRange, halfRange), MathHelper.clamp(diff.z, -halfRange, halfRange));
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.getEntityPos(), goal2, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.ANY, mc.player));
if (!moveThroughBlocks.get() && hit.isInsideBlock()) {
delayWaited = (int) (delay.get() - 1);
delayWaited = delay.get() - 1;
break;
}
mc.player.updatePosition(goal2.x, goal2.y, goal2.z);
@@ -173,7 +173,7 @@ public class Confuse extends Module {
double sin = Math.sin(rad) * 3;
double cos = Math.cos(rad) * 3;
Vec3d current = new Vec3d(entityPos.x + sin, playerPos.y, entityPos.z + cos);
hit = mc.world.raycast(new RaycastContext(mc.player.getPos(), current, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.ANY, mc.player));
hit = mc.world.raycast(new RaycastContext(mc.player.getEntityPos(), current, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.ANY, mc.player));
if (!moveThroughBlocks.get() && hit.isInsideBlock())
break;
mc.player.updatePosition(current.x, current.y, current.z);
@@ -201,7 +201,7 @@ public class Confuse extends Module {
double blue = seed == 2 ? current : (seed == 0 ? Math.abs(current - 255) : 0);
c1 = new Color((int) red, (int) green, (int) blue);
}
Vec3d tp = target.getPos();
Vec3d tp = target.getEntityPos();
double rad = Math.toRadians(i);
double sin = Math.sin(rad) * 3;
double cos = Math.cos(rad) * 3;

View File

@@ -99,12 +99,12 @@ public class CoordLogger extends Module {
EntityPositionS2CPacket packet = (EntityPositionS2CPacket) event.packet;
try {
Entity entity = mc.world.getEntityById(packet.getId());
Entity entity = mc.world.getEntityById(packet.entityId());
// Player teleport
if (entity.getType().equals(EntityType.PLAYER) && players.get()) {
Vec3d packetPosition = new Vec3d(packet.getX(), packet.getY(), packet.getZ());
Vec3d playerPosition = entity.getPos();
Vec3d packetPosition = packet.change().position();
Vec3d playerPosition = new Vec3d(entity.getX(), entity.getY(), entity.getZ());
if (playerPosition.distanceTo(packetPosition) >= minDistance.get()) {
info(formatMessage("Player '" + entity.getNameForScoreboard() + "' has teleported to ", packetPosition));
@@ -113,10 +113,11 @@ public class CoordLogger extends Module {
// World teleport
else if (entity.getType().equals(EntityType.WOLF) && wolves.get()) {
Vec3d packetPosition = new Vec3d(packet.getX(), packet.getY(), packet.getZ());
Vec3d wolfPosition = entity.getPos();
Vec3d packetPosition = packet.change().position();
Vec3d wolfPosition = new Vec3d(entity.getX(), entity.getY(), entity.getZ());
UUID ownerUuid = ((TameableEntity) entity).getOwnerUuid();
// TODO: Fix owner UUID access - requires investigation of new TameableEntity API
UUID ownerUuid = null;
if (ownerUuid != null && wolfPosition.distanceTo(packetPosition) >= minDistance.get()) {
info(formatMessage("Wolf has teleported to ", packetPosition));
@@ -152,7 +153,7 @@ public class CoordLogger extends Module {
public MutableText formatMessage(String message, Vec3d coords) {
MutableText text = Text.literal(message);
text.append(ChatUtils.formatCoords(coords));
text.append(Formatting.GRAY.toString()+".");
text.append(Formatting.GRAY +".");
return text;
}

View File

@@ -54,9 +54,10 @@ public class CustomPackets extends Module {
@EventHandler
private void onCustomPayloadPacket(PacketEvent.Receive event) {
if (event.packet instanceof CustomPayloadS2CPacket packet) {
switch (packet.payload().getId().toString()) {
case "badlion:mods" -> event.setCancelled(onBadlionModsPacket(packet));
default -> onUnknownPacket(packet);
if (packet.payload().getId().toString().equals("badlion:mods")) {
event.setCancelled(onBadlionModsPacket(packet));
} else {
onUnknownPacket(packet);
}
}
}
@@ -68,10 +69,9 @@ public class CustomPackets extends Module {
MutableText text = Text.literal(packet.payload().getId().toString());
buffer.clear();
text.setStyle(text.getStyle()
.withHoverEvent(new HoverEvent(
HoverEvent.Action.SHOW_TEXT,
Text.literal(readString(buffer)
))));
.withHoverEvent(new HoverEvent.ShowText(
Text.literal(readString(buffer))
)));
info(text);
}
@@ -111,8 +111,7 @@ public class CustomPackets extends Module {
modLine.append("\n");
if (data.extra_data != null) {
modLine.setStyle(modLine.getStyle()
.withHoverEvent(new HoverEvent(
HoverEvent.Action.SHOW_TEXT,
.withHoverEvent(new HoverEvent.ShowText(
Text.literal(data.extra_data.toString())
)));
}

View File

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

View File

@@ -1,12 +1,12 @@
package anticope.rejects.modules;
import anticope.rejects.MeteorRejectsAddon;
import anticope.rejects.mixin.ClientPlayerEntityAccessor;
import anticope.rejects.mixin.PlayerMoveC2SPacketAccessor;
import anticope.rejects.utils.RejectsUtils;
import com.google.common.collect.Streams;
import meteordevelopment.meteorclient.events.entity.player.PlayerMoveEvent;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.mixin.ClientPlayerEntityAccessor;
import meteordevelopment.meteorclient.mixin.PlayerMoveC2SPacketAccessor;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
@@ -64,7 +64,7 @@ public class FullFlight extends Module {
// Copied from ServerPlayNetworkHandler#isEntityOnAir
private boolean isEntityOnAir(Entity entity) {
return entity.getWorld().getStatesInBox(entity.getBoundingBox().expand(0.0625).stretch(0.0, -0.55, 0.0)).allMatch(AbstractBlock.AbstractBlockState::isAir);
return mc.world.getStatesInBox(entity.getBoundingBox().expand(0.0625).stretch(0.0, -0.55, 0.0)).allMatch(AbstractBlock.AbstractBlockState::isAir);
}
private int delayLeft = 20;
@@ -112,14 +112,16 @@ public class FullFlight extends Module {
mc.player.getZ(),
packet.getYaw(0),
packet.getPitch(0),
packet.isOnGround()
packet.isOnGround(),
packet.horizontalCollision()
);
} else {
fullPacket = new PlayerMoveC2SPacket.PositionAndOnGround(
mc.player.getX(),
mc.player.getY(),
mc.player.getZ(),
packet.isOnGround()
packet.isOnGround(),
packet.horizontalCollision()
);
}
event.cancel();
@@ -146,8 +148,8 @@ public class FullFlight extends Module {
if (blockCollisions.findAny().isPresent()) break;
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY() - 0.4, mc.player.getZ(), mc.player.isOnGround()));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround()));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY() - 0.4, mc.player.getZ(), mc.player.isOnGround(), mc.player.horizontalCollision));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround(), mc.player.horizontalCollision));
}
case Old -> {
Box box = mc.player.getBoundingBox();
@@ -161,20 +163,20 @@ public class FullFlight extends Module {
double groundExtra = ground + 0.1D;
for (double posY = mc.player.getY(); posY > groundExtra; posY -= 4D) {
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), posY, mc.player.getZ(), true));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), posY, mc.player.getZ(), true, mc.player.horizontalCollision));
if (posY - 4D < groundExtra) break; // Prevent next step
}
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), groundExtra, mc.player.getZ(), true));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), groundExtra, mc.player.getZ(), true, mc.player.horizontalCollision));
for (double posY = groundExtra; posY < mc.player.getY(); posY += 4D) {
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), posY, mc.player.getZ(), mc.player.isOnGround()));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), posY, mc.player.getZ(), mc.player.isOnGround(), mc.player.horizontalCollision));
if (posY + 4D > mc.player.getY()) break; // Prevent next step
}
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround()));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.isOnGround(), mc.player.horizontalCollision));
}
}

View File

@@ -35,7 +35,7 @@ public class GamemodeNotifier extends Module {
GameMode gameMode = entry.gameMode();
if (entry1.getGameMode() != gameMode) {
if (!gamemodes.get().contains(gameMode)) continue;
info("Player %s changed gamemode to %s", entry1.getProfile().getName(), entry.gameMode());
info("Player %s changed gamemode to %s", entry1.getProfile().name(), entry.gameMode());
}
}
}

View File

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

View File

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

View File

@@ -205,10 +205,10 @@ public class Lavacast extends Module {
toggle();
return;
}
int prevSlot = mc.player.getInventory().selectedSlot;
mc.player.getInventory().selectedSlot = findItemResult.slot();
int prevSlot = ((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).getSelectedSlot();
((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).setSelectedSlot(findItemResult.slot());
mc.interactionManager.interactItem(mc.player,Hand.MAIN_HAND);
mc.player.getInventory().selectedSlot = prevSlot;
((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).setSelectedSlot(prevSlot);
}
private void placeWater() {
@@ -218,10 +218,10 @@ public class Lavacast extends Module {
toggle();
return;
}
int prevSlot = mc.player.getInventory().selectedSlot;
mc.player.getInventory().selectedSlot = findItemResult.slot();
int prevSlot = ((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).getSelectedSlot();
((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).setSelectedSlot(findItemResult.slot());
mc.interactionManager.interactItem(mc.player,Hand.MAIN_HAND);
mc.player.getInventory().selectedSlot = prevSlot;
((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).setSelectedSlot(prevSlot);
}
private void pickupLiquid() {
@@ -231,10 +231,10 @@ public class Lavacast extends Module {
toggle();
return;
}
int prevSlot = mc.player.getInventory().selectedSlot;
mc.player.getInventory().selectedSlot = findItemResult.slot();
int prevSlot = ((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).getSelectedSlot();
((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).setSelectedSlot(findItemResult.slot());
mc.interactionManager.interactItem(mc.player,Hand.MAIN_HAND);
mc.player.getInventory().selectedSlot = prevSlot;
((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).setSelectedSlot(prevSlot);
}
private void updateBlockBreakingProgress() {

View File

@@ -57,9 +57,9 @@ public class LawnBot extends Module {
for (int i = 0; i < myceliumSpots.size(); i++) {
BlockPos pos = myceliumSpots.get(i);
Block block = mc.world.getBlockState(pos).getBlock();
double distance = mc.player.getPos().distanceTo(new Vec3d(pos.getX(), pos.getY(), pos.getZ()));
double distance = new Vec3d(mc.player.getX(), mc.player.getY(), mc.player.getZ()).distanceTo(new Vec3d(pos.getX(), pos.getY(), pos.getZ()));
if (block == Blocks.AIR && distance <= 5) {
mc.player.getInventory().selectedSlot = grassHotbarSlot;
((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).setSelectedSlot(grassHotbarSlot);
mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(new Vec3d(pos.getX(), pos.getY(), pos.getZ()), Direction.UP, pos, false));
return;
} else if (!blockWhitelist.get().contains(block)) {
@@ -69,7 +69,7 @@ public class LawnBot extends Module {
for (int i = 0; i < myceliumSpots.size(); i++) {
BlockPos pos = myceliumSpots.get(i);
Block block = mc.world.getBlockState(pos).getBlock();
double distance = mc.player.getPos().distanceTo(new Vec3d(pos.getX(), pos.getY(), pos.getZ()));
double distance = new Vec3d(mc.player.getX(), mc.player.getY(), mc.player.getZ()).distanceTo(new Vec3d(pos.getX(), pos.getY(), pos.getZ()));
if (blockWhitelist.get().contains(block) && distance <= 5) {
mc.interactionManager.updateBlockBreakingProgress(pos, Direction.UP);
return;

View File

@@ -18,6 +18,8 @@ import net.minecraft.util.math.Box;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import java.util.Map;
import net.minecraft.world.Heightmap;
import net.minecraft.world.chunk.WorldChunk;
import java.util.Collections;
@@ -180,15 +182,15 @@ public class NewChunks extends Module {
if (!newChunks.contains(pos) && mc.world.getChunkManager().getChunk(packet.getChunkX(), packet.getChunkZ()) == null) {
WorldChunk chunk = new WorldChunk(mc.world, pos);
try {
taskExecutor.execute(() -> chunk.loadFromPacket(packet.getChunkData().getSectionsDataBuf(), new NbtCompound(), packet.getChunkData().getBlockEntities(packet.getChunkX(), packet.getChunkZ())));
taskExecutor.execute(() -> chunk.loadFromPacket(packet.getChunkData().getSectionsDataBuf(), Map.of(), (visitor) -> {}));
} catch (ArrayIndexOutOfBoundsException e) {
return;
}
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 y = mc.world.getBottomY(); y < mc.world.getTopY(Heightmap.Type.MOTION_BLOCKING, x, z); y++) {
FluidState fluid = chunk.getFluidState(x, y, z);
if (!fluid.isEmpty() && !fluid.isStill()) {

View File

@@ -4,13 +4,8 @@ import anticope.rejects.MeteorRejectsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.mixin.LivingEntityAccessor;
import meteordevelopment.orbit.EventHandler;
import meteordevelopment.meteorclient.systems.modules.Categories;
import meteordevelopment.meteorclient.systems.modules.Module;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class NoJumpDelay extends Module {
public NoJumpDelay() {
@@ -19,6 +14,7 @@ public class NoJumpDelay extends Module {
@EventHandler
private void onTick(TickEvent.Post event) {
((LivingEntityAccessor) mc.player).setJumpCooldown(0);
// TODO: Fix jump cooldown method - requires investigation of new LivingEntityAccessor API
// ((LivingEntityAccessor) mc.player).setJumpingCooldown(0);
}
}

View File

@@ -52,7 +52,7 @@ public class ObsidianFarm extends Module {
return;
}
}
mc.player.getInventory().selectedSlot = pickAxe;
((anticope.rejects.mixin.PlayerInventoryAccessor) mc.player.getInventory()).setSelectedSlot(pickAxe);
}
BlockPos obsidian = findObsidian();

View File

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

View File

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

View File

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

View File

@@ -2,14 +2,13 @@ package anticope.rejects.modules;
import anticope.rejects.MeteorRejectsAddon;
import meteordevelopment.meteorclient.events.Cancellable;
import meteordevelopment.meteorclient.events.meteor.MouseButtonEvent;
import meteordevelopment.meteorclient.events.entity.player.AttackEntityEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.combat.KillAura;
import meteordevelopment.meteorclient.utils.misc.input.KeyAction;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.entity.Entity;
@@ -21,8 +20,6 @@ import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.util.hit.EntityHitResult;
import net.minecraft.util.math.Vec3d;
import static org.lwjgl.glfw.GLFW.GLFW_MOUSE_BUTTON_LEFT;
public class ShieldBypass extends Module {
private final SettingGroup sgGeneral = settings.getDefaultGroup();
@@ -38,17 +35,13 @@ public class ShieldBypass extends Module {
}
@EventHandler
private void onMouseButton(MouseButtonEvent event) {
private void onAttackEntity(AttackEntityEvent event) {
if (Modules.get().isActive(KillAura.class)) return;
if (mc.currentScreen == null && !mc.player.isUsingItem() && event.action == KeyAction.Press && event.button == GLFW_MOUSE_BUTTON_LEFT) {
if (mc.crosshairTarget instanceof EntityHitResult result) {
bypass(result.getEntity(), event);
}
}
bypass(event.entity, event);
}
private boolean isBlocked(Vec3d pos, LivingEntity target) {
Vec3d vec3d3 = pos.relativize(target.getPos()).normalize();
Vec3d vec3d3 = pos.relativize(new Vec3d(target.getX(), target.getY(), target.getZ())).normalize();
return new Vec3d(vec3d3.x, 0.0d, vec3d3.z).dotProduct(target.getRotationVec(1.0f)) >= 0.0d;
}
@@ -57,10 +50,10 @@ public class ShieldBypass extends Module {
if (ignoreAxe.get() && InvUtils.testInMainHand(i -> i.getItem() instanceof AxeItem)) return;
// Shield check
if (isBlocked(mc.player.getPos(), e)) return;
if (isBlocked(new Vec3d(mc.player.getX(), mc.player.getY(), mc.player.getZ()), e)) return;
Vec3d offset = Vec3d.fromPolar(0, mc.player.getYaw()).normalize().multiply(2);
Vec3d newPos = e.getPos().add(offset);
Vec3d newPos = new Vec3d(e.getX(), e.getY(), e.getZ()).add(offset);
// Move up to prevent tping into blocks
boolean inside = false;
@@ -81,13 +74,13 @@ public class ShieldBypass extends Module {
event.cancel();
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(newPos.getX(), newPos.getY(), newPos.getZ(), true));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(newPos.getX(), newPos.getY(), newPos.getZ(), true, false));
mc.getNetworkHandler().sendPacket(PlayerInteractEntityC2SPacket.attack(e, mc.player.isSneaking()));
mc.getNetworkHandler().sendPacket(new HandSwingC2SPacket(mc.player.getActiveHand()));
mc.player.resetLastAttackedTicks();
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), true));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), true, mc.player.horizontalCollision));
}
}
}

View File

@@ -17,12 +17,14 @@ import meteordevelopment.meteorclient.utils.render.color.Color;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gl.ShaderProgram;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.option.Perspective;
import net.minecraft.client.render.*;
import net.minecraft.client.render.entity.LivingEntityRenderer;
import net.minecraft.client.render.entity.PlayerEntityRenderer;
import net.minecraft.client.render.entity.model.PlayerEntityModel;
import net.minecraft.client.render.entity.state.PlayerEntityRenderState;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
@@ -61,7 +63,7 @@ public class SkeletonESP extends Module {
MatrixStack matrixStack = event.matrices;
float g = event.tickDelta;
RenderSystem.setShader(GameRenderer::getPositionColorProgram);
RenderSystem.setShader(ShaderProgram::getPositionColorProgram);
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.disableDepthTest();
@@ -79,8 +81,8 @@ public class SkeletonESP extends Module {
PlayerEntity playerEntity = (PlayerEntity) entity;
Vec3d footPos = getEntityRenderPosition(playerEntity, g);
PlayerEntityRenderer livingEntityRenderer = (PlayerEntityRenderer) (LivingEntityRenderer<?, ?>) mc.getEntityRenderDispatcher().getRenderer(playerEntity);
PlayerEntityModel<PlayerEntity> playerEntityModel = (PlayerEntityModel) livingEntityRenderer.getModel();
PlayerEntityRenderer livingEntityRenderer = (PlayerEntityRenderer) (LivingEntityRenderer<?, ?, ?>) mc.getEntityRenderDispatcher().getRenderer(playerEntity);
PlayerEntityModel playerEntityModel = livingEntityRenderer.getModel();
float h = MathHelper.lerpAngleDegrees(g, playerEntity.prevBodyYaw, playerEntity.bodyYaw);
if (mc.player == entity && Rotations.rotationTimer < rotationHoldTicks) h = Rotations.serverYaw;
@@ -94,12 +96,17 @@ public class SkeletonESP extends Module {
float m = playerEntity.getPitch(g);
if (mc.player == entity && Rotations.rotationTimer < rotationHoldTicks) m = Rotations.serverPitch;
playerEntityModel.animateModel(playerEntity, q, p, g);
playerEntityModel.setAngles(playerEntity, q, p, o, k, m);
PlayerEntityRenderState renderState = new PlayerEntityRenderState();
renderState.limbFrequency = q;
renderState.limbAmplitudeMultiplier = p;
renderState.age = o;
renderState.yawDegrees = k;
renderState.pitch = m;
playerEntityModel.setAngles(renderState);
boolean swimming = playerEntity.isInSwimmingPose();
boolean sneaking = playerEntity.isSneaking();
boolean flying = playerEntity.isFallFlying();
boolean flying = playerEntity.isGliding();
ModelPart head = playerEntityModel.head;
ModelPart leftArm = playerEntityModel.leftArm;
@@ -115,26 +122,26 @@ public class SkeletonESP extends Module {
matrixStack.multiply(new Quaternionf().setAngleAxis((90 + m) * Math.PI / 180F, -1, 0, 0));
if (swimming) matrixStack.translate(0, -0.95f, 0);
BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();
bufferBuilder.begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION_COLOR);
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder bufferBuilder = tessellator.begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION_COLOR);
Matrix4f matrix4f = matrixStack.peek().getPositionMatrix();
bufferBuilder.vertex(matrix4f, 0, sneaking ? 0.6f : 0.7f, sneaking ? 0.23f : 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
bufferBuilder.vertex(matrix4f, 0, sneaking ? 1.05f : 1.4f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();//spine
bufferBuilder.vertex(matrix4f, 0, sneaking ? 0.6f : 0.7f, sneaking ? 0.23f : 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);
bufferBuilder.vertex(matrix4f, 0, sneaking ? 1.05f : 1.4f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);//spine
bufferBuilder.vertex(matrix4f, -0.37f, sneaking ? 1.05f : 1.35f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();//shoulders
bufferBuilder.vertex(matrix4f, 0.37f, sneaking ? 1.05f : 1.35f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
bufferBuilder.vertex(matrix4f, -0.37f, sneaking ? 1.05f : 1.35f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);//shoulders
bufferBuilder.vertex(matrix4f, 0.37f, sneaking ? 1.05f : 1.35f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);
bufferBuilder.vertex(matrix4f, -0.15f, sneaking ? 0.6f : 0.7f, sneaking ? 0.23f : 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();//pelvis
bufferBuilder.vertex(matrix4f, 0.15f, sneaking ? 0.6f : 0.7f, sneaking ? 0.23f : 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
bufferBuilder.vertex(matrix4f, -0.15f, sneaking ? 0.6f : 0.7f, sneaking ? 0.23f : 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);//pelvis
bufferBuilder.vertex(matrix4f, 0.15f, sneaking ? 0.6f : 0.7f, sneaking ? 0.23f : 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);
// Head
matrixStack.push();
matrixStack.translate(0, sneaking ? 1.05f : 1.4f, 0);
rotate(matrixStack, head);
matrix4f = matrixStack.peek().getPositionMatrix();
bufferBuilder.vertex(matrix4f, 0, 0, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
bufferBuilder.vertex(matrix4f, 0, 0.15f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
bufferBuilder.vertex(matrix4f, 0, 0, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);
bufferBuilder.vertex(matrix4f, 0, 0.15f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);
matrixStack.pop();
// Right Leg
@@ -142,8 +149,8 @@ public class SkeletonESP extends Module {
matrixStack.translate(0.15f, sneaking ? 0.6f : 0.7f, sneaking ? 0.23f : 0);
rotate(matrixStack, rightLeg);
matrix4f = matrixStack.peek().getPositionMatrix();
bufferBuilder.vertex(matrix4f, 0, 0, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
bufferBuilder.vertex(matrix4f, 0, -0.6f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
bufferBuilder.vertex(matrix4f, 0, 0, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);
bufferBuilder.vertex(matrix4f, 0, -0.6f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);
matrixStack.pop();
// Left Leg
@@ -151,8 +158,8 @@ public class SkeletonESP extends Module {
matrixStack.translate(-0.15f, sneaking ? 0.6f : 0.7f, sneaking ? 0.23f : 0);
rotate(matrixStack, leftLeg);
matrix4f = matrixStack.peek().getPositionMatrix();
bufferBuilder.vertex(matrix4f, 0, 0, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
bufferBuilder.vertex(matrix4f, 0, -0.6f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
bufferBuilder.vertex(matrix4f, 0, 0, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);
bufferBuilder.vertex(matrix4f, 0, -0.6f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);
matrixStack.pop();
// Right Arm
@@ -160,8 +167,8 @@ public class SkeletonESP extends Module {
matrixStack.translate(0.37f, sneaking ? 1.05f : 1.35f, 0);
rotate(matrixStack, rightArm);
matrix4f = matrixStack.peek().getPositionMatrix();
bufferBuilder.vertex(matrix4f, 0, 0, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
bufferBuilder.vertex(matrix4f, 0, -0.55f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
bufferBuilder.vertex(matrix4f, 0, 0, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);
bufferBuilder.vertex(matrix4f, 0, -0.55f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);
matrixStack.pop();
// Left Arm
@@ -169,11 +176,11 @@ public class SkeletonESP extends Module {
matrixStack.translate(-0.37f, sneaking ? 1.05f : 1.35f, 0);
rotate(matrixStack, leftArm);
matrix4f = matrixStack.peek().getPositionMatrix();
bufferBuilder.vertex(matrix4f, 0, 0, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
bufferBuilder.vertex(matrix4f, 0, -0.55f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
bufferBuilder.vertex(matrix4f, 0, 0, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);
bufferBuilder.vertex(matrix4f, 0, -0.55f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a);
matrixStack.pop();
bufferBuilder.clear();
tessellator.clear();
BufferRenderer.drawWithGlobalProgram(bufferBuilder.end());
if (swimming) matrixStack.translate(0, 0.95f, 0);
@@ -189,7 +196,7 @@ public class SkeletonESP extends Module {
RenderSystem.disableBlend();
RenderSystem.enableDepthTest();
RenderSystem.depthMask(true);
RenderSystem.setShader(GameRenderer::getPositionColorProgram);
RenderSystem.setShader(ShaderProgram::getPositionColorProgram);
}
private void rotate(MatrixStack matrix, ModelPart modelPart) {

View File

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

View File

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

View File

@@ -22,7 +22,7 @@ public class GameModeListSetting extends Setting<List<GameMode>> {
String[] values = str.split(",");
List<GameMode> modes = new ArrayList<>(values.length);
for (String s : values) {
GameMode mode = GameMode.byName(s);
GameMode mode = GameMode.byId(s);
if (mode != null) modes.add(mode);
}
return modes;
@@ -42,7 +42,7 @@ public class GameModeListSetting extends Setting<List<GameMode>> {
public NbtCompound save(NbtCompound tag) {
NbtList valueTag = new NbtList();
for (GameMode mode : get()) {
valueTag.add(NbtString.of(mode.getName()));
valueTag.add(NbtString.of(mode.name()));
}
tag.put("value", valueTag);
@@ -53,9 +53,9 @@ public class GameModeListSetting extends Setting<List<GameMode>> {
public List<GameMode> load(NbtCompound tag) {
get().clear();
NbtList valueTag = tag.getList("value", 8);
NbtList valueTag = tag.getList("value").orElse(new NbtList());
for (NbtElement tagI : valueTag) {
GameMode mode = GameMode.byName(tagI.asString());
GameMode mode = GameMode.byId(tagI.asString().orElse(""));
if (mode != null)
get().add(mode);
}

View File

@@ -23,7 +23,7 @@ public class GameModeListSettingScreen extends WindowScreen {
public void initWidgets() {
List<GameMode> gms = setting.get();
for (GameMode gameMode : GameMode.values()) {
table.add(theme.label(Utils.nameToTitle(gameMode.getName()))).expandCellX();
table.add(theme.label(Utils.nameToTitle(gameMode.name()))).expandCellX();
boolean contains = setting.get().contains(gameMode);
WCheckbox checkbox = table.add(theme.checkbox(contains)).widget();

View File

@@ -72,9 +72,9 @@ public class StringMapSetting extends Setting<Map<String, String>> {
protected Map<String, String> load(NbtCompound tag) {
get().clear();
NbtCompound valueTag = tag.getCompound("map");
NbtCompound valueTag = tag.getCompound("map").orElse(new NbtCompound());
for (String key : valueTag.getKeys()) {
get().put(key, valueTag.getString(key));
get().put(key, valueTag.getString(key).orElse(""));
}
return get();

View File

@@ -5,6 +5,7 @@ import it.unimi.dsi.fastutil.ints.IntList;
import net.minecraft.component.ComponentChanges;
import net.minecraft.component.DataComponentTypes;
import net.minecraft.component.type.*;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.effect.StatusEffect;
import net.minecraft.entity.effect.StatusEffectInstance;
@@ -15,6 +16,8 @@ import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtList;
import net.minecraft.nbt.StringNbtReader;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
@@ -25,7 +28,7 @@ import java.util.function.Function;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
import org.apache.commons.lang3.text.WordUtils;
import org.apache.commons.text.WordUtils;
import org.apache.commons.lang3.tuple.Triple;
import static meteordevelopment.meteorclient.MeteorClient.mc;
@@ -38,13 +41,13 @@ public class GiveUtils {
private final static SimpleCommandExceptionType NO_SPACE = new SimpleCommandExceptionType(Text.literal("No space in hotbar."));
private static final List<Identifier> HIDDEN_ENTITIES = Arrays.asList(
new Identifier("giant"),
new Identifier("ender_dragon"),
new Identifier("wither"),
new Identifier("iron_golem"),
new Identifier("ender_dragon"),
new Identifier("tnt_minecart"),
new Identifier("lightning_bolt"));
Identifier.of("giant"),
Identifier.of("ender_dragon"),
Identifier.of("wither"),
Identifier.of("iron_golem"),
Identifier.of("ender_dragon"),
Identifier.of("tnt_minecart"),
Identifier.of("lightning_bolt"));
// Some ported from: https://github.com/BleachDrinker420/BleachHack/blob/master/BleachHack-Fabric-1.16/src/main/java/bleach/hack/command/commands/CmdGive.java
private static final List<Triple<String, Item, String>> ENTITY_PRESETS = Arrays.asList(
@@ -65,9 +68,20 @@ public class GiveUtils {
);
private static final Random random = new Random();
private static Registry<Enchantment> enchantmentRegistry;
private static NbtCompound parseNbtString(String nbtString) {
try {
return StringNbtReader.readCompound(nbtString);
} catch (CommandSyntaxException e) {
return new NbtCompound();
}
}
public static void giveItem(ItemStack item) throws CommandSyntaxException {
if (!mc.player.getAbilities().creativeMode) throw NOT_IN_CREATIVE.create();
if (mc.player == null || !mc.player.getAbilities().creativeMode) {
throw NOT_IN_CREATIVE.create();
}
if (!mc.player.getInventory().insertStack(item)) {
throw NO_SPACE.create();
@@ -75,78 +89,88 @@ public class GiveUtils {
}
static {
ENTITY_PRESETS.forEach((preset) -> {
PRESETS.put(preset.getLeft(), (preview) -> {
if (preview) preset.getMiddle().getDefaultStack();
ENTITY_PRESETS.forEach((preset) -> PRESETS.put(preset.getLeft(), (preview) -> {
if (preview) return preset.getMiddle().getDefaultStack();
ItemStack item = preset.getMiddle().getDefaultStack();
try {
item.set(DataComponentTypes.ENTITY_DATA, NbtComponent.of(StringNbtReader.parse(preset.getRight())));
} catch (CommandSyntaxException e) { }
item.set(DataComponentTypes.CUSTOM_NAME, Text.literal(toName(preset.getLeft())));
return item;
});
});
BLOCK_PRESETS.forEach((preset) -> {
PRESETS.put(preset.getLeft(), (preview) -> {
if (preview) preset.getMiddle().getDefaultStack();
ItemStack item = preset.getMiddle().getDefaultStack();
try {
item.set(DataComponentTypes.BLOCK_ENTITY_DATA, NbtComponent.of(StringNbtReader.parse(preset.getRight())));
} catch (CommandSyntaxException e) { }
item.set(DataComponentTypes.CUSTOM_NAME, Text.literal(toName(preset.getLeft())));
var changes = ComponentChanges.builder()
.add(DataComponentTypes.CUSTOM_DATA, NbtComponent.of(parseNbtString(preset.getRight())))
.add(DataComponentTypes.CUSTOM_NAME, Text.literal(toName(preset.getLeft())))
.build();
item.applyChanges(changes);
return item;
});
});
}));
BLOCK_PRESETS.forEach((preset) -> PRESETS.put(preset.getLeft(), (preview) -> {
if (preview) return preset.getMiddle().getDefaultStack();
ItemStack item = preset.getMiddle().getDefaultStack();
var changes = ComponentChanges.builder()
.add(DataComponentTypes.CUSTOM_DATA, NbtComponent.of(parseNbtString(preset.getRight())))
.add(DataComponentTypes.CUSTOM_NAME, Text.literal(toName(preset.getLeft())))
.build();
item.applyChanges(changes);
return item;
}));
// TODO update
PRESETS.put("force_op", (preview) -> {
if (preview) Items.SPIDER_SPAWN_EGG.getDefaultStack();
if (preview) return Items.SPIDER_SPAWN_EGG.getDefaultStack();
if (mc.player == null) return Items.SPIDER_SPAWN_EGG.getDefaultStack();
ItemStack item = Items.SPIDER_SPAWN_EGG.getDefaultStack();
String nick = mc.player.getName().getString();
try {
item.set(DataComponentTypes.ENTITY_DATA, NbtComponent.of(StringNbtReader.parse("{Time:1,BlockState:{Name:\"minecraft:spawner\"},id:\"minecraft:falling_block\",TileEntityData:{SpawnCount:20,SpawnData:{id:\"minecraft:villager\",Passengers:[{Time:1,BlockState:{Name:\"minecraft:redstone_block\"},id:\"minecraft:falling_block\",Passengers:[{id:\"minecraft:fox\",Passengers:[{Time:1,BlockState:{Name:\"minecraft:activator_rail\"},id:\"minecraft:falling_block\",Passengers:[{Command:\"execute as @e run op "+nick+"\",id:\"minecraft:command_block_minecart\"}]}],NoAI:1b,Health:1.0f,ActiveEffects:[{Duration:1000,Id:20b,Amplifier:4b}]}]}],NoAI:1b,Health:1.0f,ActiveEffects:[{Duration:1000,Id:20b,Amplifier:4b}]},MaxSpawnDelay:100,SpawnRange:10,Delay:1,MinSpawnDelay:100}}")));
} catch (CommandSyntaxException e) { }
item.set(DataComponentTypes.CUSTOM_NAME, Text.of("Force OP"));
var changes = ComponentChanges.builder()
.add(DataComponentTypes.CUSTOM_DATA, NbtComponent.of(parseNbtString("{Time:1,BlockState:{Name:\"minecraft:spawner\"},id:\"minecraft:falling_block\",TileEntityData:{SpawnCount:20,SpawnData:{id:\"minecraft:villager\",Passengers:[{Time:1,BlockState:{Name:\"minecraft:redstone_block\"},id:\"minecraft:falling_block\",Passengers:[{id:\"minecraft:fox\",Passengers:[{Time:1,BlockState:{Name:\"minecraft:activator_rail\"},id:\"minecraft:falling_block\",Passengers:[{Command:\"execute as @e run op "+nick+"\",id:\"minecraft:command_block_minecart\"}]}],NoAI:1b,Health:1.0f,ActiveEffects:[{Duration:1000,Id:20b,Amplifier:4b}]}]}],NoAI:1b,Health:1.0f,ActiveEffects:[{Duration:1000,Id:20b,Amplifier:4b}]},MaxSpawnDelay:100,SpawnRange:10,Delay:1,MinSpawnDelay:100}}")))
.add(DataComponentTypes.CUSTOM_NAME, Text.of("Force OP"))
.build();
item.applyChanges(changes);
return item;
});
// Thanks wurst !
PRESETS.put("troll_potion", (preview) -> {
if (preview) Items.LINGERING_POTION.getDefaultStack();
if (preview) return Items.LINGERING_POTION.getDefaultStack();
ItemStack stack = Items.LINGERING_POTION.getDefaultStack();
ArrayList<StatusEffectInstance> effects = new ArrayList<>();
for(int i = 1; i <= 31; i++)
{
StatusEffect effect =
Registries.STATUS_EFFECT.getEntry(i).get().value();
RegistryEntry<StatusEffect> entry =
Registries.STATUS_EFFECT.getEntry(effect);
effects.add(new StatusEffectInstance(entry, Integer.MAX_VALUE,
Integer.MAX_VALUE));
Optional<RegistryEntry.Reference<StatusEffect>> effectOpt = Registries.STATUS_EFFECT.getEntry(i);
if (effectOpt.isPresent()) {
StatusEffect effect = effectOpt.get().value();
RegistryEntry<StatusEffect> entry = Registries.STATUS_EFFECT.getEntry(effect);
effects.add(new StatusEffectInstance(entry, Integer.MAX_VALUE, Integer.MAX_VALUE));
}
}
stack.set(DataComponentTypes.POTION_CONTENTS, new PotionContentsComponent(Optional.empty(), Optional.empty(),
effects));
effects, Optional.empty()));
stack.set(DataComponentTypes.CUSTOM_NAME, Text.literal("Lingering Potion of Trolling"));
return stack;
});
PRESETS.put("32k", (preview) -> {
if (preview) return Items.DIAMOND_SWORD.getDefaultStack();
if (mc.world != null) {
enchantmentRegistry = mc.world.getRegistryManager().getOrThrow(RegistryKeys.ENCHANTMENT);
}
if (preview || enchantmentRegistry == null) return Items.DIAMOND_SWORD.getDefaultStack();
ItemStack stack = Items.DIAMOND_SWORD.getDefaultStack();
stack.apply(DataComponentTypes.ENCHANTMENTS, ItemEnchantmentsComponent.DEFAULT, component -> {
ItemEnchantmentsComponent.Builder builder = new ItemEnchantmentsComponent.Builder(component);
builder.add(Enchantments.SHARPNESS, 255);
builder.add(Enchantments.KNOCKBACK, 255);
builder.add(Enchantments.FIRE_ASPECT, 255);
builder.add(Enchantments.LOOTING, 10);
builder.add(Enchantments.SWEEPING_EDGE, 3);
builder.add(Enchantments.UNBREAKING, 255);
builder.add(Enchantments.MENDING, 1);
builder.add(Enchantments.VANISHING_CURSE, 1);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.SHARPNESS), 255);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.KNOCKBACK), 255);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.FIRE_ASPECT), 255);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.LOOTING), 10);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.SWEEPING_EDGE), 3);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.UNBREAKING), 255);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.MENDING), 1);
builder.add(enchantmentRegistry.getOrThrow(Enchantments.VANISHING_CURSE), 1);
return builder.build();
});
@@ -185,8 +209,7 @@ public class GiveUtils {
return firework;
});
HIDDEN_ENTITIES.forEach((id) -> {
PRESETS.put(id.getPath()+"_spawn_egg", (preview) -> {
HIDDEN_ENTITIES.forEach((id) -> PRESETS.put(id.getPath()+"_spawn_egg", (preview) -> {
if (preview) return Items.PIG_SPAWN_EGG.getDefaultStack();
ItemStack egg = Items.PIG_SPAWN_EGG.getDefaultStack();
@@ -195,13 +218,12 @@ public class GiveUtils {
var changes = ComponentChanges.builder()
.add(DataComponentTypes.CUSTOM_NAME, Text.literal(String.format("%s", toName(id.getPath()))))
.add(DataComponentTypes.ENTITY_DATA, NbtComponent.of(entityTag))
.add(DataComponentTypes.CUSTOM_DATA, NbtComponent.of(entityTag))
.build();
egg.applyChanges(changes);
return egg;
});
});
}));
}
public static ItemStack getPreset(String name, boolean preview) {

View File

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

View File

@@ -80,15 +80,21 @@ public class RejectsConfig extends System<RejectsConfig> {
@Override
public RejectsConfig fromTag(NbtCompound tag) {
httpAllowed = HttpAllowed.valueOf(tag.getString("httpAllowed"));
httpUserAgent = tag.getString("httpUserAgent");
loadSystemFonts = tag.getBoolean("loadSystemFonts");
duplicateModuleNames = tag.getBoolean("duplicateModuleNames");
tag.getString("httpAllowed").ifPresent(s -> {
try {
httpAllowed = HttpAllowed.valueOf(s);
} catch (IllegalArgumentException ignored) {}
});
NbtList valueTag = tag.getList("hiddenModules", 8);
httpUserAgent = tag.getString("httpUserAgent").orElse("Meteor Client");
loadSystemFonts = tag.getBoolean("loadSystemFonts").orElse(true);
duplicateModuleNames = tag.getBoolean("duplicateModuleNames").orElse(false);
tag.getList("hiddenModules").ifPresent(valueTag -> {
for (NbtElement tagI : valueTag) {
hiddenModules.add(tagI.asString());
tagI.asString().ifPresent(hiddenModules::add);
}
});
return this;
}

Some files were not shown because too many files have changed in this diff Show More