Skip to content
Open
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 build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id("fabric-loom") version "1.10-SNAPSHOT"
id("fabric-loom") version "1.11-SNAPSHOT"
id("maven-publish")
id("com.gradleup.shadow") version "9.0.0-beta11"
id("com.gradleup.shadow") version "9.2.2"
}

base {
Expand Down
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ org.gradle.jvmargs=-Xmx2G
org.gradle.configuration-cache=true

# Fabric (https://fabricmc.net/develop)
minecraft_version=1.21.8
yarn_mappings=1.21.8+build.1
loader_version=0.16.14
fapi_version=0.129.0+1.21.8
minecraft_version=1.21.10
yarn_mappings=1.21.10+build.1
loader_version=0.17.2
fapi_version=0.134.1+1.21.10

# Mod Properties
maven_group=meteordevelopment
Expand All @@ -17,16 +17,16 @@ archives_base_name=meteor-client
baritone_version=1.21.5

# Sodium (https://github.com/CaffeineMC/sodium-fabric)
sodium_version=mc1.21.6-0.6.13-fabric
sodium_version=mc1.21.9-0.7.0-fabric

# Lithium (https://github.com/CaffeineMC/lithium-fabric)
lithium_version=mc1.21.6-0.17.0-fabric
lithium_version=mc1.21.9-0.19.0-fabric

# Iris (https://github.com/IrisShaders/Iris)
iris_version=1.9.0+1.21.6-fabric

# ModMenu (https://github.com/TerraformersMC/ModMenu)
modmenu_version=15.0.0-beta.3
modmenu_version=15.0.0

# Orbit (https://github.com/MeteorDevelopment/orbit)
orbit_version=0.2.4
Expand All @@ -44,7 +44,7 @@ reflections_version=0.10.2
netty_version=4.1.118.Final

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

# WaybackAuthLib (https://github.com/FlorianMichael/WaybackAuthLib)
waybackauthlib_version=1.0.1
10 changes: 5 additions & 5 deletions src/main/java/meteordevelopment/meteorclient/MeteorClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import meteordevelopment.meteorclient.addons.MeteorAddon;
import meteordevelopment.meteorclient.events.game.OpenScreenEvent;
import meteordevelopment.meteorclient.events.meteor.KeyEvent;
import meteordevelopment.meteorclient.events.meteor.MouseButtonEvent;
import meteordevelopment.meteorclient.events.meteor.MouseClickEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.gui.GuiThemes;
import meteordevelopment.meteorclient.gui.WidgetScreen;
Expand Down Expand Up @@ -150,20 +150,20 @@ public void onInitializeClient() {
@EventHandler
private void onTick(TickEvent.Post event) {
if (mc.currentScreen == null && mc.getOverlay() == null && KeyBinds.OPEN_COMMANDS.wasPressed()) {
mc.setScreen(new ChatScreen(Config.get().prefix.get()));
mc.setScreen(new ChatScreen(Config.get().prefix.get(), true));
}
}

@EventHandler
private void onKey(KeyEvent event) {
if (event.action == KeyAction.Press && KeyBinds.OPEN_GUI.matchesKey(event.key, 0)) {
if (event.action == KeyAction.Press && KeyBinds.OPEN_GUI.matchesKey(event.input)) {
toggleGui();
}
}

@EventHandler
private void onMouseButton(MouseButtonEvent event) {
if (event.action == KeyAction.Press && KeyBinds.OPEN_GUI.matchesMouse(event.button)) {
private void onMouseClick(MouseClickEvent event) {
if (event.action == KeyAction.Press && KeyBinds.OPEN_GUI.matchesMouse(event.click)) {
toggleGui();
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/meteordevelopment/meteorclient/asm/Asm.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ public boolean transformClass(MixinEnvironment environment, String name, ClassNo
return delegate.transformClass(environment, name, classNode);
}

@Override
public boolean couldTransformClass(MixinEnvironment environment, String name) {
return delegate.couldTransformClass(environment, name);
}

@Override
public byte[] generateClass(MixinEnvironment environment, String name) {
return delegate.generateClass(environment, name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public PlayerListEntry parse(StringReader reader) throws CommandSyntaxException
PlayerListEntry playerListEntry = null;

for (PlayerListEntry p : mc.getNetworkHandler().getPlayerList()) {
if (p.getProfile().getName().equalsIgnoreCase(argument)) {
if (p.getProfile().name().equalsIgnoreCase(argument)) {
playerListEntry = p;
break;
}
Expand All @@ -56,7 +56,7 @@ public PlayerListEntry parse(StringReader reader) throws CommandSyntaxException

@Override
public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) {
return CommandSource.suggestMatching(mc.getNetworkHandler().getPlayerList().stream().map(playerListEntry -> playerListEntry.getProfile().getName()), builder);
return CommandSource.suggestMatching(mc.getNetworkHandler().getPlayerList().stream().map(playerListEntry -> playerListEntry.getProfile().name()), builder);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private void damagePlayer(int amount) {
boolean antiHunger = Modules.get().isActive(AntiHunger.class);
if (antiHunger) Modules.get().get(AntiHunger.class).toggle();

Vec3d pos = mc.player.getPos();
Vec3d pos = mc.player.getEntityPos();

for(int i = 0; i < 80; i++) {
sendPositionPacket(pos.x, pos.y + amount + 2.1, pos.z, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
.then(argument("player", PlayerListEntryArgumentType.create())
.executes(context -> {
GameProfile profile = PlayerListEntryArgumentType.get(context).getProfile();
Friend friend = new Friend(profile.getName(), profile.getId());
Friend friend = new Friend(profile.name(), profile.id());

if (Friends.get().add(friend)) {
ChatUtils.sendMsg(friend.hashCode(), Formatting.GRAY, "Added (highlight)%s (default)to friends.".formatted(friend.getName()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
}

for (KeyBinding keyBinding : mc.options.hotbarKeys) {
builder.then(literal(keyBinding.getTranslationKey().substring(4))
builder.then(literal(keyBinding.getId().substring(4))
.executes(context -> {
press(keyBinding);
return SINGLE_SUCCESS;
Expand All @@ -91,7 +91,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
info("Active keypress handlers: ");
for (int i = 0; i < activeHandlers.size(); i++) {
KeypressHandler handler = activeHandlers.get(i);
info("(highlight)%d(default) - (highlight)%s %d(default) ticks left out of (highlight)%d(default).", i, I18n.translate(handler.key.getTranslationKey()), handler.ticks, handler.totalTicks);
info("(highlight)%d(default) - (highlight)%s %d(default) ticks left out of (highlight)%d(default).", i, I18n.translate(handler.key.getId()), handler.ticks, handler.totalTicks);
}
}
return SINGLE_SUCCESS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.then(argument("player", PlayerListEntryArgumentType.create()).executes(context -> {
MeteorExecutor.execute(() -> {
PlayerListEntry lookUpTarget = PlayerListEntryArgumentType.get(context);
UUID uuid = lookUpTarget.getProfile().getId();
UUID uuid = lookUpTarget.getProfile().id();

NameHistory history = Http.get("https://laby.net/api/v2/user/" + uuid + "/get-profile")
.exceptionHandler(e -> error("There was an error fetching that users name history."))
Expand All @@ -47,7 +47,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
error("There was an error fetching that users name history.");
}

String name = lookUpTarget.getProfile().getName();
String name = lookUpTarget.getProfile().name();
MutableText initial = Text.literal(name);
initial.append(Text.literal(name.endsWith("s") ? "'" : "'s"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import meteordevelopment.meteorclient.commands.Command;
import meteordevelopment.meteorclient.commands.arguments.PlayerArgumentType;
import meteordevelopment.meteorclient.events.meteor.KeyEvent;
import meteordevelopment.meteorclient.events.meteor.MouseClickEvent;
import meteordevelopment.meteorclient.utils.misc.input.Input;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.command.CommandSource;
import net.minecraft.text.Text;
Expand Down Expand Up @@ -40,7 +42,16 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
private static class StaticListener {
@EventHandler
private void onKey(KeyEvent event) {
if (mc.options.sneakKey.matchesKey(event.key, 0) || mc.options.sneakKey.matchesMouse(event.key)) {
if (Input.isPressed(mc.options.sneakKey)) {
mc.setCameraEntity(mc.player);
event.cancel();
MeteorClient.EVENT_BUS.unsubscribe(this);
}
}

@EventHandler
private void onMouse(MouseClickEvent event) {
if (Input.isPressed(mc.options.sneakKey)) {
mc.setCameraEntity(mc.player);
event.cancel();
MeteorClient.EVENT_BUS.unsubscribe(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
import net.minecraft.util.math.BlockPos;
import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.Random;
import java.util.Set;

public class SwarmCommand extends Command {

Expand Down Expand Up @@ -212,7 +212,7 @@ else if (swarm.isWorker()) {
swarm.host.sendMessage(context.getInput());
}
else if (swarm.isWorker()) {
Modules.get().get(InfinityMiner.class).targetBlocks.set(List.of(context.getArgument("target", BlockStateArgument.class).getBlockState().getBlock()));
Modules.get().get(InfinityMiner.class).targetBlocks.set(Set.of(context.getArgument("target", BlockStateArgument.class).getBlockState().getBlock()));
runInfinityMiner();
}
}
Expand All @@ -228,8 +228,8 @@ else if (swarm.isWorker()) {
swarm.host.sendMessage(context.getInput());
}
else if (swarm.isWorker()) {
Modules.get().get(InfinityMiner.class).targetBlocks.set(List.of(context.getArgument("target", BlockStateArgument.class).getBlockState().getBlock()));
Modules.get().get(InfinityMiner.class).repairBlocks.set(List.of(context.getArgument("repair", BlockStateArgument.class).getBlockState().getBlock()));
Modules.get().get(InfinityMiner.class).targetBlocks.set(Set.of(context.getArgument("target", BlockStateArgument.class).getBlockState().getBlock()));
Modules.get().get(InfinityMiner.class).repairBlocks.set(Set.of(context.getArgument("repair", BlockStateArgument.class).getBlockState().getBlock()));
runInfinityMiner();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Getting the pose calls {@link meteordevelopment.meteorclient.mixin.EntityMixin#modifyGetPose(net.minecraft.entity.EntityPose)},
* which calls {@link PlayerEntity#canChangeIntoPose(net.minecraft.entity.EntityPose)}, which
* calculates whether there is enough space to fit your bounding box if you change into that pose. This method ends up
* calling {@link LivingEntity#canWalkOnFluid(net.minecraft.fluid.FluidState)}, causing this event to fire
* calling {@link LivingEntity#canWalkOnFluid(FluidState)}, causing this event to fire
* again and leading to a stack overflow crash. Introduced in
* <a href="https://github.com/MeteorDevelopment/meteor-client/pull/5449">this pull request</a>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ public class SendMovementPacketsEvent {
public static class Pre {
private static final Pre INSTANCE = new Pre();

public static SendMovementPacketsEvent.Pre get() {
public static Pre get() {
return INSTANCE;
}
}

public static class Post {
private static final Post INSTANCE = new Post();

public static SendMovementPacketsEvent.Post get() {
public static Post get() {
return INSTANCE;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@

import meteordevelopment.meteorclient.events.Cancellable;
import meteordevelopment.meteorclient.utils.misc.input.KeyAction;
import net.minecraft.client.input.KeyInput;

public class KeyEvent extends Cancellable {
private static final KeyEvent INSTANCE = new KeyEvent();

public int key, modifiers;
public KeyInput input;
public KeyAction action;

public static KeyEvent get(int key, int modifiers, KeyAction action) {
public static KeyEvent get(KeyInput keyInput, KeyAction action) {
INSTANCE.setCancelled(false);
INSTANCE.key = key;
INSTANCE.modifiers = modifiers;
INSTANCE.input = keyInput;
INSTANCE.action = action;
return INSTANCE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@

import meteordevelopment.meteorclient.events.Cancellable;
import meteordevelopment.meteorclient.utils.misc.input.KeyAction;
import net.minecraft.client.gui.Click;
import net.minecraft.client.input.MouseInput;

public class MouseButtonEvent extends Cancellable {
private static final MouseButtonEvent INSTANCE = new MouseButtonEvent();
public class MouseClickEvent extends Cancellable {
private static final MouseClickEvent INSTANCE = new MouseClickEvent();

public int button;
public MouseInput input;
public Click click;
public KeyAction action;

public static MouseButtonEvent get(int button, KeyAction action) {
public static MouseClickEvent get(MouseInput mouseInput, Click click, KeyAction action) {
INSTANCE.setCancelled(false);
INSTANCE.button = button;
INSTANCE.input = mouseInput;
INSTANCE.click = click;
INSTANCE.action = action;
return INSTANCE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
package meteordevelopment.meteorclient.events.render;

import meteordevelopment.meteorclient.events.Cancellable;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.client.render.block.entity.state.BlockEntityRenderState;

public class RenderBlockEntityEvent extends Cancellable {
private static final RenderBlockEntityEvent INSTANCE = new RenderBlockEntityEvent();

public BlockEntity blockEntity;
public BlockEntityRenderState blockEntityState;

public static RenderBlockEntityEvent get(BlockEntity blockEntity) {
public static RenderBlockEntityEvent get(BlockEntityRenderState blockEntityState) {
INSTANCE.setCancelled(false);
INSTANCE.blockEntity = blockEntity;
INSTANCE.blockEntityState = blockEntityState;
return INSTANCE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import meteordevelopment.meteorclient.mixininterface.IEntityRenderState;
import net.minecraft.client.item.ItemModelManager;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.command.OrderedRenderCommandQueue;
import net.minecraft.client.render.entity.state.ItemEntityRenderState;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.ItemEntity;
Expand All @@ -23,8 +24,9 @@ public class RenderItemEntityEvent extends Cancellable {
public VertexConsumerProvider vertexConsumerProvider;
public int light;
public ItemModelManager itemModelManager;
public OrderedRenderCommandQueue renderCommandQueue;

public static RenderItemEntityEvent get(ItemEntityRenderState renderState, float tickDelta, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int light, ItemModelManager itemModelManager) {
public static RenderItemEntityEvent get(ItemEntityRenderState renderState, float tickDelta, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int light, ItemModelManager itemModelManager, OrderedRenderCommandQueue renderCommandQueue) {
INSTANCE.setCancelled(false);
INSTANCE.itemEntity = (ItemEntity) ((IEntityRenderState) renderState).meteor$getEntity();
INSTANCE.renderState = renderState;
Expand All @@ -33,6 +35,7 @@ public static RenderItemEntityEvent get(ItemEntityRenderState renderState, float
INSTANCE.vertexConsumerProvider = vertexConsumerProvider;
INSTANCE.light = light;
INSTANCE.itemModelManager = itemModelManager;
INSTANCE.renderCommandQueue = renderCommandQueue;
return INSTANCE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

package meteordevelopment.meteorclient.events.render;

import net.minecraft.item.tooltip.TooltipData;
import net.minecraft.item.ItemStack;
import net.minecraft.item.tooltip.TooltipData;


public class TooltipDataEvent {
Expand Down
Loading