From e2b851c0d25a719460b86a76e6a9e67de8b577a3 Mon Sep 17 00:00:00 2001 From: core Date: Sat, 22 Jul 2023 12:33:28 -0400 Subject: [PATCH] the final coreclient commit --- .../dev/coredoes/coreclient/CoreClient.java | 22 +++++- .../coreclient/module/exploit/Instabreak.java | 74 +++++++++++++++++++ .../coreclient/module/exploit/Sink.java | 65 ++++++++++++++++ .../module/movement/CreativeFlight.java | 11 ++- .../coreclient/module/movement/Phase.java | 65 ++++++++++++++++ 5 files changed, 233 insertions(+), 4 deletions(-) create mode 100644 src/main/java/dev/coredoes/coreclient/module/exploit/Instabreak.java create mode 100644 src/main/java/dev/coredoes/coreclient/module/exploit/Sink.java create mode 100644 src/main/java/dev/coredoes/coreclient/module/movement/Phase.java diff --git a/src/main/java/dev/coredoes/coreclient/CoreClient.java b/src/main/java/dev/coredoes/coreclient/CoreClient.java index bacf1c0..f724445 100644 --- a/src/main/java/dev/coredoes/coreclient/CoreClient.java +++ b/src/main/java/dev/coredoes/coreclient/CoreClient.java @@ -7,10 +7,10 @@ import dev.coredoes.coreclient.gui.ClickGUI; import dev.coredoes.coreclient.gui.module.*; import dev.coredoes.coreclient.module.bypass.*; import dev.coredoes.coreclient.module.bypass.ButtonClicker; -import dev.coredoes.coreclient.module.movement.CreativeFlight; -import dev.coredoes.coreclient.module.movement.Jetpack; +import dev.coredoes.coreclient.module.movement.*; import dev.coredoes.coreclient.module.misc.PacketLogger; -import dev.coredoes.coreclient.module.movement.NoFall; +import dev.coredoes.coreclient.module.movement.Instabreak; +import dev.coredoes.coreclient.module.movement.Sink; import meteordevelopment.orbit.EventBus; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback; @@ -20,6 +20,8 @@ import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback; import net.fabricmc.fabric.api.networking.v1.PacketByteBufs; import net.minecraft.client.MinecraftClient; import net.minecraft.network.PacketByteBuf; +import net.minecraft.text.Text; +import net.minecraft.text.TextColor; import org.lwjgl.glfw.GLFW; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -63,8 +65,11 @@ public class CoreClient implements ClientModInitializer { Category.MOVEMENT.modules.add(new CreativeFlight()); Category.MOVEMENT.modules.add(new Jetpack()); Category.MOVEMENT.modules.add(new NoFall()); + Category.MOVEMENT.modules.add(new Phase()); Category.EXPLOITS.modules.add(new ButtonClicker()); + Category.EXPLOITS.modules.add(new Instabreak()); + Category.EXPLOITS.modules.add(new Sink()); Category.MISCELLANEOUS.modules.add(new PacketLogger()); @@ -96,6 +101,17 @@ public class CoreClient implements ClientModInitializer { if (i == NoFall.keybind.getKey()) { NoFall.getInstance().isEnabled().toggle(); } + + if (i == Phase.keybind.getKey()) { + if (MinecraftClient.getInstance().player != null) { + Phase.getInstance().isEnabled().toggle(); + if (Phase.getInstance().isEnabled().isOn()) { + MinecraftClient.getInstance().player.sendMessage(Text.of("[CoreClient] Phase Enabled")); + } else { + MinecraftClient.getInstance().player.sendMessage(Text.of("[CoreClient] Phase Disabled")); + } + } + } } } } diff --git a/src/main/java/dev/coredoes/coreclient/module/exploit/Instabreak.java b/src/main/java/dev/coredoes/coreclient/module/exploit/Instabreak.java new file mode 100644 index 0000000..548516d --- /dev/null +++ b/src/main/java/dev/coredoes/coreclient/module/exploit/Instabreak.java @@ -0,0 +1,74 @@ +package dev.coredoes.coreclient.module.movement; + +import com.lukflug.panelstudio.base.IToggleable; +import dev.coredoes.coreclient.CoreClient; +import dev.coredoes.coreclient.event.PacketEvent; +import dev.coredoes.coreclient.event.TickEvent; +import dev.coredoes.coreclient.gui.module.Module; +import dev.coredoes.coreclient.gui.setting.BooleanSetting; +import dev.coredoes.coreclient.gui.setting.DoubleSetting; +import dev.coredoes.coreclient.gui.setting.IntegerSetting; +import dev.coredoes.coreclient.gui.setting.KeybindSetting; +import dev.coredoes.coreclient.mixin.ClientPlayerEntityAccessor; +import dev.coredoes.coreclient.mixin.PlayerMoveC2SPacketAccessor; +import meteordevelopment.orbit.EventHandler; +import net.minecraft.block.AbstractBlock; +import net.minecraft.client.MinecraftClient; +import net.minecraft.entity.Entity; +import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket; +import org.lwjgl.glfw.GLFW; + +import java.util.Objects; + +public class Instabreak extends Module { + private static Instabreak instance; + private static boolean enabled; + + public static final KeybindSetting keybind=new KeybindSetting("Keybind","keybind","The key to toggle the module.",()->true, GLFW.GLFW_KEY_F25); + + public Instabreak() { + super("Instabreak", "Instantly break blocks", () -> true, true, false); + + settings.add(keybind); + + enabled = false; + instance = this; + + CoreClient.eventBus.subscribe(this); + } + + @EventHandler + private void onPostTick(TickEvent.Post e) { + if (MinecraftClient.getInstance().player == null) { + return; + } + + if (isEnabled().isOn()) { + MinecraftClient.getInstance().player.getAbilities().creativeMode = true; + } else { + MinecraftClient.getInstance().player.getAbilities().creativeMode = false; + } + + } + + public static Instabreak getInstance() { + return instance; + } + + @Override + public IToggleable isEnabled() { + return new IToggleable() { + @Override + public boolean isOn() { + return enabled; + } + + @Override + public void toggle() { + if (toggleable) { + enabled=!enabled; + } + } + }; + } +} diff --git a/src/main/java/dev/coredoes/coreclient/module/exploit/Sink.java b/src/main/java/dev/coredoes/coreclient/module/exploit/Sink.java new file mode 100644 index 0000000..b87e689 --- /dev/null +++ b/src/main/java/dev/coredoes/coreclient/module/exploit/Sink.java @@ -0,0 +1,65 @@ +package dev.coredoes.coreclient.module.movement; + +import com.lukflug.panelstudio.base.IToggleable; +import dev.coredoes.coreclient.CoreClient; +import dev.coredoes.coreclient.event.TickEvent; +import dev.coredoes.coreclient.gui.module.Module; +import dev.coredoes.coreclient.gui.setting.*; +import meteordevelopment.orbit.EventHandler; +import net.minecraft.client.MinecraftClient; +import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket; +import org.lwjgl.glfw.GLFW; + +import java.util.Objects; + +public class Sink extends Module { + private static Sink instance; + private static boolean enabled; + + public static final KeybindSetting keybind=new KeybindSetting("Keybind","keybind","The key to toggle the module.",()->true, GLFW.GLFW_KEY_F25); + + public Sink() { + super("Sink", "Sink into the ground", () -> true, true, false); + + settings.add(keybind); + + enabled = false; + instance = this; + + CoreClient.eventBus.subscribe(this); + } + + public static Sink getInstance() { + return instance; + } + + @EventHandler + private void onPostTick(TickEvent.Post e) { + return; + if (enabled) { + for (double i = 0; i < 33.0D; i += 01) { + assert MinecraftClient.getInstance().player != null; + MinecraftClient.getInstance().player.setPos(MinecraftClient.getInstance().player.getX(), MinecraftClient.getInstance().player.getY() - i, MinecraftClient.getInstance().player.getZ()); + Objects.requireNonNull(MinecraftClient.getInstance().getNetworkHandler()).sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(MinecraftClient.getInstance().player.getX(), MinecraftClient.getInstance().player.getY() - 0.000001, MinecraftClient.getInstance().player.getZ(), NoFall.getInstance().isEnabled().isOn() || MinecraftClient.getInstance().player.isOnGround())); + CoreClient.LOGGER.info("at {}", i); + } + } + } + + @Override + public IToggleable isEnabled() { + return new IToggleable() { + @Override + public boolean isOn() { + return enabled; + } + + @Override + public void toggle() { + if (toggleable) { + enabled=!enabled; + } + } + }; + } +} diff --git a/src/main/java/dev/coredoes/coreclient/module/movement/CreativeFlight.java b/src/main/java/dev/coredoes/coreclient/module/movement/CreativeFlight.java index ee8e1ca..731602a 100644 --- a/src/main/java/dev/coredoes/coreclient/module/movement/CreativeFlight.java +++ b/src/main/java/dev/coredoes/coreclient/module/movement/CreativeFlight.java @@ -28,6 +28,7 @@ public class CreativeFlight extends Module { public static final BooleanSetting antikick = new BooleanSetting("Anti-Kick", "antikick", "Prevent vanilla antifly", () -> true, true); public static final IntegerSetting delay = new IntegerSetting("Delay", "delay", "The amount of delay in ticks between flying down a bit and returning to original position", () -> true, 1, 200, 20); public static final IntegerSetting offTime = new IntegerSetting("Off Time", "offtime", "The amount of delay, in milliseconds, to fly down a bit to reset floating ticks.", () -> true, 1, 20, 1); + public static final DoubleSetting speed = new DoubleSetting("Speed", "speed", "Your speed when flying", () -> true, 0.0D, 1.0D, 0.1D); private int delayLeft = delay.getValue(); private int offLeft = offTime.getValue(); @@ -42,6 +43,7 @@ public class CreativeFlight extends Module { settings.add(antikick); settings.add(delay); settings.add(offTime); + settings.add(speed); enabled=false; instance = this; @@ -69,7 +71,14 @@ public class CreativeFlight extends Module { return; } - MinecraftClient.getInstance().player.getAbilities().allowFlying = enabled; + double flySpeed = speed.getValue(); + + if (isEnabled().isOn()) { + MinecraftClient.getInstance().player.getAbilities().allowFlying = enabled; + MinecraftClient.getInstance().player.getAbilities().setFlySpeed((float) flySpeed); + } else { + MinecraftClient.getInstance().player.getAbilities().allowFlying = false; + } if (delayLeft > 0) delayLeft--; diff --git a/src/main/java/dev/coredoes/coreclient/module/movement/Phase.java b/src/main/java/dev/coredoes/coreclient/module/movement/Phase.java new file mode 100644 index 0000000..b286cf1 --- /dev/null +++ b/src/main/java/dev/coredoes/coreclient/module/movement/Phase.java @@ -0,0 +1,65 @@ +package dev.coredoes.coreclient.module.movement; + +import com.lukflug.panelstudio.base.IToggleable; +import dev.coredoes.coreclient.CoreClient; +import dev.coredoes.coreclient.event.PacketEvent; +import dev.coredoes.coreclient.gui.module.Module; +import dev.coredoes.coreclient.gui.setting.KeybindSetting; +import dev.coredoes.coreclient.mixin.PlayerMoveC2SPacketAccessor; +import dev.coredoes.coreclient.module.misc.PacketLogger; +import meteordevelopment.orbit.EventHandler; +import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket; +import net.minecraft.network.packet.s2c.play.*; +import org.lwjgl.glfw.GLFW; + +public class Phase extends Module { + private static Phase instance; + private boolean enabled = false; + + public static final KeybindSetting keybind=new KeybindSetting("Keybind","keybind","The key to toggle the module.",()->true, GLFW.GLFW_KEY_V); + + + public Phase() { + super("Phase", "Walk through walls!", () -> true, true, false); + + CoreClient.eventBus.subscribe(this); + + settings.add(keybind); + + instance = this; + } + + @EventHandler + public void onPacketSend(PacketEvent.Send e) { + if (isEnabled().isOn()) { + if (e.packet instanceof PlayerMoveC2SPacket) { + e.setCancelled(true); + } + } + } + + public static Phase getInstance() { + return instance; + } + + @Override + public IToggleable isEnabled() { + return new IToggleable() { + @Override + public boolean isOn() { + return enabled; + } + + @Override + public void toggle() { + if (toggleable) { + enabled=!enabled; + + if (enabled) { + + } + } + } + }; + } +}