Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 1.21 #365

Merged
merged 4 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
prerelease: false
title: "1.20.6 Build"
title: "1.21 Build"
files: |
./build/libs/*.jar

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'fabric-loom' version '1.7-SNAPSHOT'
}

sourceCompatibility = targetCompatibility = JavaVersion.VERSION_21
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
org.gradle.jvmargs=-Xmx2G

# Fabric Properties
minecraft_version=1.20.6
yarn_version=1.20.6+build.1
minecraft_version=1.21
yarn_version=1.21+build.2
loader_version=0.15.11

# 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
meteor_version=0.5.8
baritone_version=1.20.6
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
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;

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/anticope/rejects/commands/CenterCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
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.");
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/anticope/rejects/commands/ClearChatCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
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");
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/anticope/rejects/commands/GhostCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
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");
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/anticope/rejects/commands/HeadsCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
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() {
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/anticope/rejects/commands/KickCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
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() {
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/anticope/rejects/commands/LocateCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
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 -> {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/anticope/rejects/commands/PanicCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

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");
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/anticope/rejects/commands/ReconnectCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
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;

public class ReconnectCommand extends Command {
public ReconnectCommand() {
super("reconnect", "Reconnects server.");
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/anticope/rejects/commands/SaveSkinCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
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"));
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/anticope/rejects/commands/SeedCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
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."));

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/anticope/rejects/commands/ServerCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
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
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/anticope/rejects/commands/SetBlockCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
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");
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/anticope/rejects/commands/TeleportCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
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 {


Expand Down
3 changes: 0 additions & 3 deletions src/main/java/anticope/rejects/commands/TerrainExport.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
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"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
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;
Expand All @@ -15,11 +16,11 @@
@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();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
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;
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/anticope/rejects/mixin/GameRendererMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import meteordevelopment.meteorclient.systems.modules.Modules;

import net.minecraft.client.gl.PostEffectProcessor;
import net.minecraft.client.render.RenderTickCounter;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
Expand All @@ -19,14 +20,14 @@ public class GameRendererMixin {
@Shadow @Final MinecraftClient client;

@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.render(tickCounter.getTickDelta(tick));
}
}
}
1 change: 0 additions & 1 deletion src/main/java/anticope/rejects/modules/AutoCraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
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.screen.CraftingScreenHandler;
import net.minecraft.screen.slot.SlotActionType;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/anticope/rejects/modules/AutoExtinguish.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/anticope/rejects/modules/AutoGrind.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
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();
Expand All @@ -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()
Expand Down Expand Up @@ -80,7 +83,7 @@ private boolean canGrind(ItemStack stack) {

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;
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/anticope/rejects/modules/AutoSoup.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@
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.";

Expand Down Expand Up @@ -108,10 +110,12 @@ private void onTick(TickEvent.Post event) {
}

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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
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;

Expand Down
5 changes: 0 additions & 5 deletions src/main/java/anticope/rejects/modules/NoJumpDelay.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
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() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/anticope/rejects/modules/Rendering.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void onChanged(Shader s) {
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));
Identifier shaderID = Identifier.of(String.format("shaders/post/%s.json", name));
try {
PostEffectProcessor shader = new PostEffectProcessor(mc.getTextureManager(), mc.getResourceManager(), mc.getFramebuffer(), shaderID);
this.shader = shader;
Expand Down
Loading
Loading