diff --git a/src/main/java/meteordevelopment/meteorclient/mixin/LivingEntityMixin.java b/src/main/java/meteordevelopment/meteorclient/mixin/LivingEntityMixin.java index be23fd8fc5..10decd2325 100644 --- a/src/main/java/meteordevelopment/meteorclient/mixin/LivingEntityMixin.java +++ b/src/main/java/meteordevelopment/meteorclient/mixin/LivingEntityMixin.java @@ -16,7 +16,6 @@ import meteordevelopment.meteorclient.systems.modules.movement.elytrafly.ElytraFly; import meteordevelopment.meteorclient.systems.modules.movement.elytrafly.modes.Bounce; import meteordevelopment.meteorclient.systems.modules.player.NoStatusEffects; -import meteordevelopment.meteorclient.systems.modules.player.OffhandCrash; import meteordevelopment.meteorclient.systems.modules.render.HandView; import meteordevelopment.meteorclient.systems.modules.render.NoRender; import net.minecraft.core.Holder; @@ -58,15 +57,6 @@ private void spawnItemParticles(ItemStack itemStack, int count, CallbackInfo ci) if (noRender.noEatParticles() && itemStack.getComponents().has(DataComponents.FOOD)) ci.cancel(); } - @Inject(method = "onEquipItem", at = @At("HEAD"), cancellable = true) - private void onEquipStack(EquipmentSlot slot, ItemStack oldStack, ItemStack stack, CallbackInfo ci) { - if ((Object) this != mc.player) return; - - if (Modules.get().get(OffhandCrash.class).isAntiCrash()) { - ci.cancel(); - } - } - @ModifyVariable(method = "swing(Lnet/minecraft/world/InteractionHand;)V", at = @At("HEAD"), argsOnly = true, name = "hand") private InteractionHand setHand(InteractionHand hand) { if ((Object) this != mc.player) return hand; diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/Modules.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/Modules.java index 2e7aaf7500..e16022894b 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/Modules.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/Modules.java @@ -449,7 +449,6 @@ private void initPlayer() { add(new NoMiningTrace()); add(new NoRotate()); add(new NoStatusEffects()); - add(new OffhandCrash()); add(new Portals()); add(new PotionSaver()); add(new Reach()); @@ -548,7 +547,6 @@ private void initWorld() { add(new Flamethrower()); add(new HighwayBuilder()); add(new LiquidFiller()); - add(new MountBypass()); add(new NoGhostBlocks()); add(new Nuker()); add(new PacketMine()); diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/player/OffhandCrash.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/player/OffhandCrash.java deleted file mode 100644 index ad48cecbf2..0000000000 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/player/OffhandCrash.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client). - * Copyright (c) Meteor Development. - */ - -package meteordevelopment.meteorclient.systems.modules.player; - -import io.netty.channel.Channel; -import meteordevelopment.meteorclient.events.world.TickEvent; -import meteordevelopment.meteorclient.mixin.ConnectionAccessor; -import meteordevelopment.meteorclient.settings.BoolSetting; -import meteordevelopment.meteorclient.settings.IntSetting; -import meteordevelopment.meteorclient.settings.Setting; -import meteordevelopment.meteorclient.settings.SettingGroup; -import meteordevelopment.meteorclient.systems.modules.Categories; -import meteordevelopment.meteorclient.systems.modules.Module; -import meteordevelopment.orbit.EventHandler; -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.network.protocol.game.ServerboundPlayerActionPacket; - -public class OffhandCrash extends Module { - private static final ServerboundPlayerActionPacket PACKET = new ServerboundPlayerActionPacket(ServerboundPlayerActionPacket.Action.SWAP_ITEM_WITH_OFFHAND, new BlockPos(0, 0, 0), Direction.UP); - - private final SettingGroup sgGeneral = settings.getDefaultGroup(); - - private final Setting doCrash = sgGeneral.add(new BoolSetting.Builder() - .name("do-crash") - .description("Sends X number of offhand swap sound packets to the server per tick.") - .defaultValue(true) - .build() - ); - - private final Setting speed = sgGeneral.add(new IntSetting.Builder() - .name("speed") - .description("The amount of swaps per tick.") - .defaultValue(2000) - .min(1) - .sliderRange(1, 10000) - .visible(doCrash::get) - .build() - ); - - private final Setting antiCrash = sgGeneral.add(new BoolSetting.Builder() - .name("anti-crash") - .description("Attempts to prevent you from crashing yourself.") - .defaultValue(true) - .build() - ); - - public OffhandCrash() { - super(Categories.Misc, "offhand-crash", "An exploit that can crash other players by swapping back and forth between your main hand and offhand."); - } - - @EventHandler - private void onTick(TickEvent.Post event) { - if (!doCrash.get()) return; - - Channel channel = ((ConnectionAccessor) mc.player.connection.getConnection()).meteor$getChannel(); - for (int i = 0; i < speed.get(); ++i) channel.write(PACKET); - channel.flush(); - } - - public boolean isAntiCrash() { - return isActive() && antiCrash.get(); - } -} diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/world/MountBypass.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/world/MountBypass.java deleted file mode 100644 index 240755c9b7..0000000000 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/world/MountBypass.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client). - * Copyright (c) Meteor Development. - */ - -package meteordevelopment.meteorclient.systems.modules.world; - -import meteordevelopment.meteorclient.events.packets.PacketEvent; -import meteordevelopment.meteorclient.systems.modules.Categories; -import meteordevelopment.meteorclient.systems.modules.Module; -import meteordevelopment.orbit.EventHandler; -import net.minecraft.network.protocol.game.ServerboundAttackPacket; -import net.minecraft.world.entity.animal.equine.AbstractChestedHorse; - -public class MountBypass extends Module { - private boolean dontCancel; - - public MountBypass() { - super(Categories.World, "mount-bypass", "Allows you to bypass the IllegalStacks plugin and put chests on entities."); - } - - @EventHandler - public void onSendPacket(PacketEvent.Send event) { - if (dontCancel) { - dontCancel = false; - return; - } - - if (event.packet instanceof ServerboundAttackPacket(int entityId) - && mc.level.getEntity(entityId) instanceof AbstractChestedHorse) event.cancel(); - } -}