Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/meteor/master' into master…
Browse files Browse the repository at this point in the history
…-ame

# Conflicts:
#	README.md
#	build.gradle
#	gradle/wrapper/gradle-wrapper.properties
#	src/main/java/meteordevelopment/meteorclient/commands/commands/NameHistoryCommand.java
#	src/main/java/meteordevelopment/meteorclient/commands/commands/NbtCommand.java
#	src/main/java/meteordevelopment/meteorclient/mixin/ChatInputSuggestorMixin.java
#	src/main/java/meteordevelopment/meteorclient/mixin/InGameHudMixin.java
#	src/main/java/meteordevelopment/meteorclient/mixin/TitleScreenMixin.java
#	src/main/java/meteordevelopment/meteorclient/utils/network/Capes.java
#	src/main/java/meteordevelopment/meteorclient/utils/network/OnlinePlayers.java
  • Loading branch information
JFronny committed Jul 25, 2024
2 parents 4b640ef + 271a0e5 commit 6beeec8
Show file tree
Hide file tree
Showing 212 changed files with 2,513 additions and 1,283 deletions.
9 changes: 7 additions & 2 deletions 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"
id "maven-publish"
id "com.github.johnrengelman.shadow" version "8.1.1"
}
Expand Down Expand Up @@ -34,6 +34,10 @@ repositories {
name = "vram"
url = "https://maven.vram.io/"
}
maven {
name = "ViaVersion"
url = "https://repo.viaversion.com"
}
mavenCentral()
}

Expand Down Expand Up @@ -61,6 +65,7 @@ dependencies {
modCompileOnly("maven.modrinth:iris:${project.iris_version}") { transitive = false }
//modCompileOnly("io.vram:canvas-fabric-mc119:1.0.+") { transitive = false } // TODO: 1.19.3
modCompileOnly("maven.modrinth:indium:${project.indium_version}") { transitive = false }
modCompileOnly("de.florianmichael:ViaFabricPlus:${project.viafabricplus_version}") { transitive = false }

// Baritone (https://github.com/MeteorDevelopment/baritone)
modCompileOnly "meteordevelopment:baritone:${project.baritone_version}-SNAPSHOT"
Expand All @@ -72,7 +77,7 @@ dependencies {
modInclude "org.javassist:javassist:3.28.0-GA" // dependency of reflections, ordinarily shadowed
modInclude("io.netty:netty-handler-proxy:${project.netty_version}") { transitive = false }
modInclude("io.netty:netty-codec-socks:${project.netty_version}") { transitive = false }
modInclude "de.florianmichael:WaybackAuthLib:1.0.0"
modInclude "de.florianmichael:WaybackAuthLib:${project.waybackauthlib_version}"

modInclude "io.gitlab.jfronny.libjf:libjf-unsafe-v0:${project.libjf_version}"
include "io.gitlab.jfronny.libjf:libjf-base:${project.libjf_version}"
Expand Down
27 changes: 17 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
org.gradle.jvmargs=-Xmx2G

# Fabric (https://fabricmc.net/develop)
minecraft_version=1.20.6
yarn_mappings=1.20.6+build.1
loader_version=0.15.10
fapi_version=0.97.8+1.20.6
minecraft_version=1.21
yarn_mappings=1.21+build.2
loader_version=0.15.11
fapi_version=0.100.3+1.21

# Mod Properties
mod_version=0.5.7
mod_version=0.5.8
maven_group=meteordevelopment
archives_base_name=meteor-client

# Dependency Versions

# Baritone (https://github.com/MeteorDevelopment/baritone)
baritone_version=1.20.4
baritone_version=1.21

# Sodium (https://github.com/CaffeineMC/sodium-fabric)
sodium_version=mc1.20.6-0.5.8
sodium_version=mc1.21-0.5.9

# Lithium (https://github.com/CaffeineMC/lithium-fabric)
lithium_version=mc1.20.6-0.12.3
lithium_version=mc1.21-0.12.7

# Iris (https://github.com/IrisShaders/Iris)
iris_version=1.7.0+1.20.6
iris_version=1.7.1+1.20.6
# 1.7.1+1.21 seems to cause loom remapping issues atm

# Indium (https://github.com/comp500/Indium)
indium_version=1.0.30+mc1.20.4
indium_version=1.0.33+mc1.21

# Orbit (https://github.com/MeteorDevelopment/orbit)
orbit_version=0.2.4
Expand All @@ -42,3 +43,9 @@ reflections_version=0.10.2

# Netty (https://github.com/netty/netty)
netty_version=4.1.90.Final

# ViaFabricPlus (https://github.com/ViaVersion/ViaFabricPlus)
viafabricplus_version=3.4.1

# WaybackAuthLib (https://github.com/FlorianMichael/WaybackAuthLib)
waybackauthlib_version=1.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import net.fabricmc.loader.api.metadata.ModMetadata;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.util.Identifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -173,4 +174,8 @@ private void onOpenScreen(OpenScreenEvent event) {

wasWidgetScreen = event.screen instanceof WidgetScreen;
}

public static Identifier identifier(String path) {
return Identifier.of(MeteorClient.MOD_ID, path);
}
}
5 changes: 5 additions & 0 deletions src/main/java/meteordevelopment/meteorclient/MixinPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class MixinPlugin implements IMixinConfigPlugin {
private static boolean isLithiumPresent;
public static boolean isIrisPresent;
private static boolean isIndiumPresent;
private static boolean isVFPPresent;

@Override
public void onLoad(String mixinPackage) {
Expand All @@ -35,6 +36,7 @@ public void onLoad(String mixinPackage) {
isLithiumPresent = FabricLoader.getInstance().isModLoaded("lithium");
isIrisPresent = FabricLoader.getInstance().isModLoaded("iris");
isIndiumPresent = FabricLoader.getInstance().isModLoaded("indium");
isVFPPresent = FabricLoader.getInstance().isModLoaded("viafabricplus");

loaded = true;
}
Expand Down Expand Up @@ -64,6 +66,9 @@ else if (mixinClassName.startsWith(mixinPackage + ".lithium")) {
else if (mixinClassName.startsWith(mixinPackage + ".indium")) {
return isIndiumPresent;
}
else if (mixinClassName.startsWith(mixinPackage + ".viafabricplus")) {
return isVFPPresent;
}


return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public static void init() {
add(new RotationCommand());
add(new WaypointCommand());
add(new InputCommand());
add(new WaspCommand());
add(new LocateCommand());

COMMANDS.sort(Comparator.comparing(Command::getName));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
* Copyright (c) Meteor Development.
*/

package meteordevelopment.meteorclient.commands.arguments;

import com.mojang.brigadier.StringReader;
import com.mojang.brigadier.arguments.ArgumentType;
import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import com.mojang.brigadier.suggestion.Suggestions;
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
import meteordevelopment.meteorclient.utils.misc.ComponentMapReader;
import net.minecraft.command.CommandRegistryAccess;
import net.minecraft.command.CommandSource;
import net.minecraft.component.ComponentMap;

import java.util.Collection;
import java.util.List;
import java.util.concurrent.CompletableFuture;

public class ComponentMapArgumentType implements ArgumentType<ComponentMap> {
private static final Collection<String> EXAMPLES = List.of("{foo=bar}");
private final ComponentMapReader reader;

public ComponentMapArgumentType(CommandRegistryAccess commandRegistryAccess) {
this.reader = new ComponentMapReader(commandRegistryAccess);
}

public static ComponentMapArgumentType componentMap(CommandRegistryAccess commandRegistryAccess) {
return new ComponentMapArgumentType(commandRegistryAccess);
}

public static <S extends CommandSource> ComponentMap getComponentMap(CommandContext<S> context, String name) {
return context.getArgument(name, ComponentMap.class);
}

@Override
public ComponentMap parse(StringReader reader) throws CommandSyntaxException {
return this.reader.consume(reader);
}

@Override
public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) {
return this.reader.getSuggestions(builder);
}

@Override
public Collection<String> getExamples() {
return EXAMPLES;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import meteordevelopment.meteorclient.systems.modules.Modules;
import net.minecraft.command.CommandSource;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;

public class BindCommand extends Command {
public BindCommand() {
super("bind", "Binds a specified module to the next pressed key.");
Expand All @@ -24,6 +22,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.then(argument("module", ModuleArgumentType.create()).executes(context -> {
Module module = context.getArgument("module", Module.class);
Modules.get().setModuleToBind(module);
Modules.get().awaitKeyRelease();
module.info("Press a key to bind the module to.");
return SINGLE_SUCCESS;
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

import java.util.List;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;

public class BindsCommand extends Command {
public BindsCommand() {
super("binds", "List of all bound modules.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;

public class CommandsCommand extends Command {
public CommandsCommand() {
super("commands", "List of all commands.", "help");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
import net.minecraft.text.Text;
import net.minecraft.util.math.Vec3d;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;

public class DamageCommand extends Command {
private final static SimpleCommandExceptionType INVULNERABLE = new SimpleCommandExceptionType(Text.literal("You are invulnerable."));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;

public class DisconnectCommand extends Command {
public DisconnectCommand() {
super("disconnect", "Disconnect from the server", "dc");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
import net.minecraft.command.CommandSource;
import net.minecraft.network.packet.c2s.play.PlayerInputC2SPacket;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;

public class DismountCommand extends Command {
public DismountCommand() {
super("dismount", "Dismounts you from entity you are riding.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
import net.minecraft.item.Items;
import net.minecraft.text.Text;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;

public class DropCommand extends Command {
private static final SimpleCommandExceptionType NOT_SPECTATOR = new SimpleCommandExceptionType(Text.literal("Can't drop items while in spectator."));
private static final SimpleCommandExceptionType NO_SUCH_ITEM = new SimpleCommandExceptionType(Text.literal("Could not find an item with that name!"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@
import net.minecraft.command.argument.RegistryEntryReferenceArgumentType;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.item.ItemStack;
import net.minecraft.registry.Registries;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.text.Text;

import java.util.function.ToIntFunction;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;

public class EnchantCommand extends Command {
private static final SimpleCommandExceptionType NOT_IN_CREATIVE = new SimpleCommandExceptionType(Text.literal("You must be in creative mode to use this."));
private static final SimpleCommandExceptionType NOT_HOLDING_ITEM = new SimpleCommandExceptionType(Text.literal("You need to hold some item to enchant."));
Expand Down Expand Up @@ -92,19 +88,19 @@ private void one(CommandContext<CommandSource> context, ToIntFunction<Enchantmen
ItemStack itemStack = tryGetItemStack();

RegistryEntry.Reference<Enchantment> enchantment = context.getArgument("enchantment", RegistryEntry.Reference.class);
Utils.addEnchantment(itemStack, enchantment.value(), level.applyAsInt(enchantment.value()));
Utils.addEnchantment(itemStack, enchantment, level.applyAsInt(enchantment.value()));

syncItem();
}

private void all(boolean onlyPossible, ToIntFunction<Enchantment> level) throws CommandSyntaxException {
ItemStack itemStack = tryGetItemStack();

for (Enchantment enchantment : Registries.ENCHANTMENT) {
if (!onlyPossible || enchantment.isAcceptableItem(itemStack)) {
Utils.addEnchantment(itemStack, enchantment, level.applyAsInt(enchantment));
}
}
REGISTRY_ACCESS.getOptionalWrapper(RegistryKeys.ENCHANTMENT).ifPresent(registry -> {
registry.streamEntries().forEach(enchantment -> {
Utils.addEnchantment(itemStack, enchantment, level.applyAsInt(enchantment.value()));
});
});

syncItem();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;

public class EnderChestCommand extends Command {
public EnderChestCommand() {
super("ender-chest", "Allows you to preview memory of your ender chest.", "ec", "echest");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import net.minecraft.command.CommandSource;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;

public class FakePlayerCommand extends Command {
public FakePlayerCommand() {
super("fake-player", "Manages fake players that you can use for testing.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
import meteordevelopment.meteorclient.mixininterface.ISimpleOption;
import net.minecraft.command.CommandSource;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;

public class FovCommand extends Command {
public FovCommand() {
super("fov", "Changes your fov.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import net.minecraft.command.CommandSource;
import net.minecraft.util.Formatting;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;

public class FriendsCommand extends Command {
public FriendsCommand() {
super("friends", "Manages friends.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
import net.minecraft.command.CommandSource;
import net.minecraft.world.GameMode;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;

public class GamemodeCommand extends Command {
public GamemodeCommand() {
super("gamemode", "Changes your gamemode client-side.", "gm");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
import net.minecraft.text.Text;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;

public class GiveCommand extends Command {
private final static SimpleCommandExceptionType NOT_IN_CREATIVE = new SimpleCommandExceptionType(Text.literal("You must be in creative mode to use this."));
private final static SimpleCommandExceptionType NO_SPACE = new SimpleCommandExceptionType(Text.literal("No space in hotbar."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
import net.minecraft.entity.Entity;
import net.minecraft.util.math.Vec3d;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;

public class HClipCommand extends Command {
public HClipCommand() {
super("hclip", "Lets you clip through blocks horizontally.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
import java.util.List;
import java.util.Map;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
import static meteordevelopment.meteorclient.MeteorClient.mc;

public class InputCommand extends Command {
private static final List<KeypressHandler> activeHandlers = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import net.minecraft.client.gui.screen.ingame.InventoryScreen;
import net.minecraft.command.CommandSource;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;

public class InventoryCommand extends Command {
public InventoryCommand() {
super("inventory", "Allows you to see parts of another player's inventory.", "inv", "invsee");
Expand Down
Loading

0 comments on commit 6beeec8

Please sign in to comment.