diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/Modules.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/Modules.java index 2264984cf4..c34cc6f58b 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/Modules.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/Modules.java @@ -423,7 +423,6 @@ private void initPlayer() { add(new FakePlayer()); add(new FastUse()); add(new GhostHand()); - add(new InstaMine()); add(new LiquidInteract()); add(new MiddleClickExtra()); add(new NoBreakDelay()); diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/player/InstaMine.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/player/InstaMine.java deleted file mode 100644 index 3e7da580a0..0000000000 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/player/InstaMine.java +++ /dev/null @@ -1,136 +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 meteordevelopment.meteorclient.events.entity.player.StartBreakingBlockEvent; -import meteordevelopment.meteorclient.events.render.Render3DEvent; -import meteordevelopment.meteorclient.events.world.TickEvent; -import meteordevelopment.meteorclient.renderer.ShapeMode; -import meteordevelopment.meteorclient.settings.*; -import meteordevelopment.meteorclient.systems.modules.Categories; -import meteordevelopment.meteorclient.systems.modules.Module; -import meteordevelopment.meteorclient.utils.player.Rotations; -import meteordevelopment.meteorclient.utils.render.color.SettingColor; -import meteordevelopment.meteorclient.utils.world.BlockUtils; -import meteordevelopment.orbit.EventHandler; -import net.minecraft.item.Items; -import net.minecraft.network.packet.c2s.play.HandSwingC2SPacket; -import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Direction; - -public class InstaMine extends Module { - - private final SettingGroup sgGeneral = settings.getDefaultGroup(); - private final SettingGroup sgRender = settings.createGroup("Render"); - - private final Setting tickDelay = sgGeneral.add(new IntSetting.Builder() - .name("delay") - .description("The delay between breaks.") - .defaultValue(0) - .min(0) - .sliderMax(20) - .build() - ); - - private final Setting pick = sgGeneral.add(new BoolSetting.Builder() - .name("only-pick") - .description("Only tries to mine the block if you are holding a pickaxe.") - .defaultValue(true) - .build() - ); - - private final Setting rotate = sgGeneral.add(new BoolSetting.Builder() - .name("rotate") - .description("Faces the blocks being mined server side.") - .defaultValue(true) - .build() - ); - - // Render - - private final Setting render = sgRender.add(new BoolSetting.Builder() - .name("render") - .description("Renders a block overlay on the block being broken.") - .defaultValue(true) - .build() - ); - - private final Setting shapeMode = sgRender.add(new EnumSetting.Builder() - .name("shape-mode") - .description("How the shapes are rendered.") - .defaultValue(ShapeMode.Both) - .build() - ); - - private final Setting sideColor = sgRender.add(new ColorSetting.Builder() - .name("side-color") - .description("The color of the sides of the blocks being rendered.") - .defaultValue(new SettingColor(204, 0, 0, 10)) - .build() - ); - - private final Setting lineColor = sgRender.add(new ColorSetting.Builder() - .name("line-color") - .description("The color of the lines of the blocks being rendered.") - .defaultValue(new SettingColor(204, 0, 0, 255)) - .build() - ); - - private int ticks; - - private final BlockPos.Mutable blockPos = new BlockPos.Mutable(0, -1, 0); - private Direction direction; - - public InstaMine() { - super(Categories.Player, "insta-mine", "Attempts to instantly mine blocks."); - } - - @Override - public void onActivate() { - ticks = 0; - blockPos.set(0, -1, 0); - } - - @EventHandler - private void onStartBreakingBlock(StartBreakingBlockEvent event) { - direction = event.direction; - blockPos.set(event.blockPos); - } - - @EventHandler - private void onTick(TickEvent.Pre event) { - if (ticks >= tickDelay.get()) { - ticks = 0; - - if (shouldMine()) { - if (rotate.get()) { - Rotations.rotate(Rotations.getYaw(blockPos), Rotations.getPitch(blockPos), () -> mc.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_DESTROY_BLOCK, blockPos, direction))); - } else { - mc.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_DESTROY_BLOCK, blockPos, direction)); - } - - mc.getNetworkHandler().sendPacket(new HandSwingC2SPacket(Hand.MAIN_HAND)); - - } - } else { - ticks++; - } - } - - private boolean shouldMine() { - if (blockPos.getY() == -1) return false; - if (!BlockUtils.canBreak(blockPos)) return false; - return !pick.get() || (mc.player.getMainHandStack().getItem() == Items.DIAMOND_PICKAXE || mc.player.getMainHandStack().getItem() == Items.NETHERITE_PICKAXE); - } - - @EventHandler - private void onRender(Render3DEvent event) { - if (!render.get() || !shouldMine()) return; - event.renderer.box(blockPos, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - } -}