mirror of
https://github.com/Miasmusa/Shadow.git
synced 2025-04-22 01:03:26 -04:00
Merge branch 'master' of https://github.com/Moles-LLC/Shadow
This commit is contained in:
commit
86b6310aa7
15 changed files with 177 additions and 77 deletions
src/main/java/net/shadow/client
|
@ -8,12 +8,10 @@ import coffeeprotect.SkipObfuscation;
|
|||
import net.fabricmc.api.ModInitializer;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.Element;
|
||||
import net.minecraft.util.Util;
|
||||
import net.shadow.client.feature.addon.AddonManager;
|
||||
import net.shadow.client.feature.command.CommandRegistry;
|
||||
import net.shadow.client.feature.gui.FastTickable;
|
||||
import net.shadow.client.feature.gui.notifications.NotificationRenderer;
|
||||
import net.shadow.client.feature.gui.screen.HomeScreen;
|
||||
import net.shadow.client.feature.itemMenu.ItemGroupRegistry;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleRegistry;
|
||||
|
@ -34,8 +32,6 @@ import java.awt.Font;
|
|||
import java.awt.FontFormatException;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
|
@ -47,16 +43,6 @@ public class ShadowMain implements ModInitializer {
|
|||
public static final Logger LOGGER = LogManager.getLogger();
|
||||
public static final MinecraftClient client = MinecraftClient.getInstance();
|
||||
public static final File BASE = new File(MinecraftClient.getInstance().runDirectory, "shadow");
|
||||
private static final String REPORT_WEBHOOK_URL = "https://discord.com/api/webhooks/965552777453502474/z6HSQvGos82UzCh7g5N6921GMf4aUChrnKnajcqM5XV2RVXZ6eBPtysaJLxYEAmqt211";
|
||||
private static final boolean isDevMode = Util.make(() -> {
|
||||
try {
|
||||
File execF = new File(HomeScreen.class.getProtectionDomain().getCodeSource().getLocation().toURI());
|
||||
return execF.isDirectory();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
public static long lastScreenChange = System.currentTimeMillis();
|
||||
public static ShadowMain INSTANCE;
|
||||
public static Thread MODULE_FTTICKER;
|
||||
|
@ -66,24 +52,6 @@ public class ShadowMain implements ModInitializer {
|
|||
LOGGER.log(level, "[" + MOD_NAME + "] " + message);
|
||||
}
|
||||
|
||||
public static boolean isDev() {
|
||||
return isDevMode;
|
||||
}
|
||||
|
||||
public static void sendCrashReport(String reportData) {
|
||||
if (isDev()) {
|
||||
log(Level.INFO, "Crash report NOT submitted because isDevMode = true");
|
||||
return;
|
||||
}
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss dd/MM/yyyy");
|
||||
String fmt = sdf.format(System.currentTimeMillis());
|
||||
try {
|
||||
Utils.sendDiscordFile(REPORT_WEBHOOK_URL, String.format("Crash report submitted by **%s** (**%s**) at `%s` (h\\\\:m\\\\:s d/m/y) <@&965396880286707732>", client.getSession().getUsername(), client.getSession().getUuid(), fmt), "crash.txt", reportData.getBytes(StandardCharsets.UTF_8));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
INSTANCE = this;
|
||||
|
|
|
@ -20,7 +20,7 @@ public class Test extends Command {
|
|||
if (ShadowAPIWrapper.getAuthKey() != null && ShadowAPIWrapper.isCurrentUserAdmin()) {
|
||||
System.out.println(ShadowAPIWrapper.getAccounts());
|
||||
Utils.TickManager.runInNTicks(5, () -> {
|
||||
ShadowMain.client.setScreen(new OnlineServicesDashboardScreen());
|
||||
ShadowMain.client.setScreen(OnlineServicesDashboardScreen.getInstance());
|
||||
});
|
||||
} else {
|
||||
error("not logged in or not admin");
|
||||
|
|
|
@ -8,13 +8,13 @@ import com.google.gson.JsonArray;
|
|||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import net.minecraft.client.gui.screen.ChatScreen;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.gui.hud.element.HudElement;
|
||||
import net.shadow.client.feature.gui.hud.element.SpeedHud;
|
||||
import net.shadow.client.feature.gui.hud.element.TabGui;
|
||||
import net.shadow.client.feature.gui.hud.element.Taco;
|
||||
import net.shadow.client.feature.gui.hud.element.TargetHUD;
|
||||
import net.shadow.client.feature.gui.screen.HudEditorScreen;
|
||||
import net.shadow.client.helper.event.EventType;
|
||||
import net.shadow.client.helper.event.Events;
|
||||
import net.shadow.client.helper.event.events.MouseEvent;
|
||||
|
@ -148,7 +148,7 @@ public class HudRenderer {
|
|||
}
|
||||
prevWY = currentWY;
|
||||
}
|
||||
isEditing = ShadowMain.client.currentScreen instanceof ChatScreen;
|
||||
isEditing = ShadowMain.client.currentScreen instanceof HudEditorScreen;
|
||||
if (mouseHeldDown) {
|
||||
for (HudElement element : elements) {
|
||||
element.mouseDragged(Utils.Mouse.getMouseX() - prevX, Utils.Mouse.getMouseY() - prevY);
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.gui.screen;
|
||||
|
||||
import net.shadow.client.feature.gui.hud.HudRenderer;
|
||||
|
||||
/**
|
||||
* Placeholder class with no elements, used for instanceof in {@link HudRenderer#render()}
|
||||
*/
|
||||
public class HudEditorScreen extends ClientScreen {
|
||||
}
|
|
@ -14,6 +14,7 @@ import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder;
|
|||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.gui.FastTickable;
|
||||
import net.shadow.client.feature.gui.widget.RoundButton;
|
||||
import net.shadow.client.feature.gui.widget.RoundTextFieldWidget;
|
||||
import net.shadow.client.helper.IRCWebSocket;
|
||||
import net.shadow.client.helper.ShadowAPIWrapper;
|
||||
import net.shadow.client.helper.font.FontRenderers;
|
||||
|
@ -29,17 +30,29 @@ import java.net.URI;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
public class OnlineServicesDashboardScreen extends ClientScreen implements FastTickable {
|
||||
static List<LogsFieldWidget.LogEntry> logs = new CopyOnWriteArrayList<>();
|
||||
private static OnlineServicesDashboardScreen instance;
|
||||
long reconnectTime = System.currentTimeMillis();
|
||||
SimpleWebsocket logsSocket;
|
||||
AccountList dvw;
|
||||
|
||||
private OnlineServicesDashboardScreen() {
|
||||
|
||||
}
|
||||
|
||||
public static OnlineServicesDashboardScreen getInstance() {
|
||||
if (instance == null) instance = new OnlineServicesDashboardScreen();
|
||||
return instance;
|
||||
}
|
||||
|
||||
void initSocket() {
|
||||
if (ShadowAPIWrapper.getAuthKey() != null) {
|
||||
logs.clear();
|
||||
|
@ -54,8 +67,15 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
void socketMessageRecieved(String msg) {
|
||||
IRCWebSocket.Packet pack = new Gson().fromJson(msg, IRCWebSocket.Packet.class);
|
||||
if (pack.id.equals("log")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss dd/MM/yyyy");
|
||||
logs.add(0, new LogsFieldWidget.LogEntry(Map.of("Time", sdf.format(pack.data.get("time")), "Severity", pack.data.get("severity").toString()), pack.data.get("message").toString()));
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("dd. MM HH:mm:ss");
|
||||
LinkedHashMap<String, String> props = new LinkedHashMap<>();
|
||||
props.put("Time", sdf.format(pack.data.get("time")));
|
||||
props.put("Severity", pack.data.get("severity").toString());
|
||||
logs.add(0, new LogsFieldWidget.LogEntry(props, pack.data.get("message").toString(), switch (pack.data.get("severity").toString()) {
|
||||
case "WARNING" -> Color.YELLOW.getRGB();
|
||||
case "SEVERE" -> new Color(255, 50, 50).getRGB();
|
||||
default -> 0xFFFFFF;
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,6 +89,9 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
yO += avw.height + 5;
|
||||
dvw.add(avw);
|
||||
}
|
||||
dvw.add(new RegisterAccountViewer(0, yO, 300, 30, (s, s2) -> {
|
||||
if (ShadowAPIWrapper.registerAccount(s, s2)) populateAccountList();
|
||||
}));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -101,6 +124,97 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
return super.mouseScrolled(mouseX, mouseY, amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean charTyped(char chr, int modifiers) {
|
||||
for (Element child : this.children()) {
|
||||
if (child.charTyped(chr, modifiers)) return true;
|
||||
}
|
||||
return super.charTyped(chr, modifiers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
|
||||
for (Element child : this.children()) {
|
||||
if (child.keyPressed(keyCode, scanCode, modifiers)) return true;
|
||||
}
|
||||
return super.keyPressed(keyCode, scanCode, modifiers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyReleased(int keyCode, int scanCode, int modifiers) {
|
||||
for (Element child : this.children()) {
|
||||
if (child.keyReleased(keyCode, scanCode, modifiers)) return true;
|
||||
}
|
||||
return super.keyReleased(keyCode, scanCode, modifiers);
|
||||
}
|
||||
|
||||
static class RegisterAccountViewer extends AccountViewerWidget {
|
||||
BiConsumer<String, String> r;
|
||||
RoundTextFieldWidget user, pass;
|
||||
RoundButton reg;
|
||||
public RegisterAccountViewer(double x, double y, double width, double height, BiConsumer<String, String> onReg) {
|
||||
super("", "", x, y, width, height, () -> {
|
||||
});
|
||||
this.r = onReg;
|
||||
}
|
||||
|
||||
Element[] getEl() {
|
||||
return new Element[]{user, pass, reg};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
|
||||
if (user == null || pass == null || reg == null) initWidgets();
|
||||
Renderer.R2D.renderRoundedQuad(matrices, new Color(10, 10, 20), x, y, x + width, y + height, 5, 20);
|
||||
this.user.render(matrices, mouseX, mouseY, delta);
|
||||
this.pass.render(matrices, mouseX, mouseY, delta);
|
||||
this.reg.render(matrices, mouseX, mouseY, delta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFastTick() {
|
||||
this.reg.onFastTick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mouseClicked(double mouseX, double mouseY, int button) {
|
||||
for (Element element : getEl()) {
|
||||
element.mouseClicked(mouseX, mouseY, button);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean charTyped(char chr, int modifiers) {
|
||||
for (Element element : getEl()) {
|
||||
if (element.charTyped(chr, modifiers)) return true;
|
||||
}
|
||||
return super.charTyped(chr, modifiers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
|
||||
for (Element element : getEl()) {
|
||||
if (element.keyPressed(keyCode, scanCode, modifiers)) return true;
|
||||
}
|
||||
return super.keyPressed(keyCode, scanCode, modifiers);
|
||||
}
|
||||
|
||||
void initWidgets() {
|
||||
double h = 20;
|
||||
double pad = (this.height - h) / 2d;
|
||||
double regBtnWidth = 60;
|
||||
double oneWidth = (this.width - regBtnWidth - pad * 3) / 2d - 2.5;
|
||||
this.user = new RoundTextFieldWidget(x + pad, y + this.height / 2d - h / 2d, oneWidth, h, "Username");
|
||||
this.pass = new RoundTextFieldWidget(x + pad + oneWidth + 5, y + this.height / 2d - h / 2d, oneWidth, h, "Password");
|
||||
this.reg = new RoundButton(RoundButton.STANDARD, x + this.width - pad - regBtnWidth, y + this.height / 2d - h / 2d, regBtnWidth, h, "Register", () -> {
|
||||
this.r.accept(this.user.get(), this.pass.get());
|
||||
this.user.set("");
|
||||
this.pass.set("");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@RequiredArgsConstructor
|
||||
static
|
||||
class AccountViewerWidget implements Element, Drawable, Selectable, FastTickable {
|
||||
|
@ -231,7 +345,7 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
return Element.super.mouseScrolled(mouseX, mouseY, amount);
|
||||
}
|
||||
|
||||
public record LogEntry(Map<String, String> additionalProps, String msg) {
|
||||
public record LogEntry(Map<String, String> additionalProps, String msg, int color) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -255,7 +369,7 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
class AccountList implements Element, Drawable, Selectable, FastTickable {
|
||||
final double x, y, w, h;
|
||||
@Getter
|
||||
List<AccountViewerWidget> aww = new ArrayList<>();
|
||||
List<AccountViewerWidget> aww = new CopyOnWriteArrayList<>();
|
||||
Scroller s = new Scroller(0);
|
||||
|
||||
public void add(AccountViewerWidget v) {
|
||||
|
|
|
@ -35,10 +35,9 @@ import java.util.Random;
|
|||
|
||||
public class ClientCrasher extends Module {
|
||||
|
||||
boolean sends = true;
|
||||
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.Offhand).name("Mode").description("How to crash").get());
|
||||
final DoubleSetting power = this.config.create(new DoubleSetting.Builder(1000).min(5).max(2000).name("Power").description("How much power to crash with").get());
|
||||
boolean sends = true;
|
||||
BlockPos selectedbreaker;
|
||||
|
||||
public ClientCrasher() {
|
||||
|
@ -49,7 +48,7 @@ public class ClientCrasher extends Module {
|
|||
@EventListener(type = EventType.PACKET_SEND)
|
||||
void giveAShit(PacketEvent event) {
|
||||
if (mode.getValue() != Mode.Place) return;
|
||||
if(!sends) return;
|
||||
if (!sends) return;
|
||||
if (!this.isEnabled()) return;
|
||||
if (!(event.getPacket() instanceof PlayerMoveC2SPacket packet))
|
||||
return;
|
||||
|
|
|
@ -53,16 +53,16 @@ public class CraftCrash extends Module {
|
|||
if (client.currentScreen instanceof CraftingScreen && !isListening) {
|
||||
ticks++;
|
||||
int sync = client.player.currentScreenHandler.syncId;
|
||||
if(ticks % 15 == 0){
|
||||
if (ticks % 15 == 0) {
|
||||
Notification.create(1000, "CraftCrash", Notification.Type.SUCCESS, "Disabling stream...");
|
||||
for(int i = 0; i < 50; i++){
|
||||
for (int i = 0; i < 50; i++) {
|
||||
client.player.networkHandler.sendPacket(new CraftRequestC2SPacket(sync, stick, true));
|
||||
client.player.networkHandler.sendPacket(new CraftRequestC2SPacket(sync, buton, true));
|
||||
}
|
||||
}
|
||||
if(ticks % 75 == 0){
|
||||
if (ticks % 75 == 0) {
|
||||
Notification.create(1000, "CraftCrash", Notification.Type.SUCCESS, "Sent Payload!");
|
||||
for(int i = 0; i < 2000; i++){
|
||||
for (int i = 0; i < 2000; i++) {
|
||||
client.player.networkHandler.sendPacket(new CraftRequestC2SPacket(sync, stick, true));
|
||||
client.player.networkHandler.sendPacket(new CraftRequestC2SPacket(sync, buton, true));
|
||||
}
|
||||
|
|
|
@ -4,20 +4,24 @@
|
|||
|
||||
package net.shadow.client.feature.module.impl.crash;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.nbt.*;
|
||||
import net.minecraft.nbt.NbtByte;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.nbt.NbtInt;
|
||||
import net.minecraft.nbt.NbtList;
|
||||
import net.minecraft.nbt.NbtString;
|
||||
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class SSRFCrash extends Module {
|
||||
|
||||
|
@ -78,7 +82,7 @@ public class SSRFCrash extends Module {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private String rndStr(int size) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
String[] chars = new String[]{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};
|
||||
|
|
|
@ -5,14 +5,13 @@
|
|||
package net.shadow.client.feature.module.impl.exploit;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.network.packet.c2s.play.ClickSlotC2SPacket;
|
||||
import net.minecraft.screen.slot.SlotActionType;
|
||||
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.PacketEvent;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
|
||||
import net.minecraft.network.packet.c2s.play.ClickSlotC2SPacket;
|
||||
import net.minecraft.screen.slot.SlotActionType;
|
||||
|
||||
public class Equipper extends Module {
|
||||
|
||||
|
@ -20,8 +19,8 @@ public class Equipper extends Module {
|
|||
super("Equipper", "Equips anything as armor", ModuleType.EXPLOIT);
|
||||
}
|
||||
|
||||
@EventListener(type=EventType.PACKET_SEND)
|
||||
void giveAShit(PacketEvent event){
|
||||
@EventListener(type = EventType.PACKET_SEND)
|
||||
void giveAShit(PacketEvent event) {
|
||||
if (event.getPacket() instanceof ClickSlotC2SPacket packet) {
|
||||
if (packet.getActionType() == SlotActionType.PICKUP && packet.getButton() == 0 && packet.getSlot() >= 5 && packet.getSlot() <= 8) {
|
||||
int slot = packet.getSlot() - 5;
|
||||
|
|
|
@ -108,7 +108,7 @@ public class TabGui extends Module {
|
|||
double height = tabPane.entries.size() * oneHeight + padOuter * 2;
|
||||
|
||||
double width = padOuter + scrollerWidth + 2 + Math.ceil(widest.width + 1) + 3;
|
||||
Renderer.R2D.renderRoundedQuad(stack, ThemeManager.getMainTheme().getConfig(), 0, 0, width, height, 3, 20);
|
||||
Renderer.R2D.renderRoundedQuadWithShadow(stack, ThemeManager.getMainTheme().getConfig(), 0, 0, width, height, 3, 20);
|
||||
Renderer.R2D.renderRoundedQuad(stack, ThemeManager.getMainTheme().getAccent(), padOuter, yOffset + scrollerYOffset, padOuter + scrollerWidth, yOffset + scrollerYEnd, scrollerWidth / 2d, 20);
|
||||
|
||||
double lastEnabledStackHeight = 0;
|
||||
|
|
|
@ -5,30 +5,28 @@
|
|||
package net.shadow.client.feature.module.impl.world;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.ClientStatusC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
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.PacketEvent;
|
||||
import net.shadow.client.feature.config.EnumSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
public class Godmode extends Module {
|
||||
|
||||
int ticks;
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.Vanilla).name("Mode").description("The mode to get god in").get());
|
||||
int ticks;
|
||||
|
||||
public Godmode() {
|
||||
super("Godmode", "God mods", ModuleType.WORLD);
|
||||
}
|
||||
|
||||
@EventListener(type=EventType.PACKET_SEND)
|
||||
void giveAShit(PacketEvent event){
|
||||
if(event.getPacket() instanceof ClientStatusC2SPacket packet){
|
||||
if(packet.getMode() == ClientStatusC2SPacket.Mode.PERFORM_RESPAWN){
|
||||
@EventListener(type = EventType.PACKET_SEND)
|
||||
void giveAShit(PacketEvent event) {
|
||||
if (event.getPacket() instanceof ClientStatusC2SPacket packet) {
|
||||
if (packet.getMode() == ClientStatusC2SPacket.Mode.PERFORM_RESPAWN) {
|
||||
event.setCancelled(true);
|
||||
client.setScreen(null);
|
||||
client.currentScreen = null;
|
||||
|
@ -39,7 +37,7 @@ public class Godmode extends Module {
|
|||
|
||||
@Override
|
||||
public void tick() {
|
||||
if(mode.getValue() == Mode.Matrix){
|
||||
if (mode.getValue() == Mode.Matrix) {
|
||||
ticks++;
|
||||
if (ticks % 10 == 0) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
|
|
|
@ -19,6 +19,7 @@ import java.util.Map;
|
|||
public class IRCWebSocket extends WebSocketClient {
|
||||
String authToken;
|
||||
Runnable onClose;
|
||||
|
||||
public IRCWebSocket(URI serverUri, String authToken, Runnable onClose) {
|
||||
super(serverUri, Map.of("Authorization", authToken));
|
||||
this.authToken = authToken;
|
||||
|
|
|
@ -97,6 +97,14 @@ public class ShadowAPIWrapper {
|
|||
return s != null && s.statusCode() == 200;
|
||||
}
|
||||
|
||||
public static boolean registerAccount(String user, String pass) {
|
||||
HttpResponse<String> s = post("/users/admin/register", new Gson().toJson(
|
||||
Map.of("username", user, "password", pass)
|
||||
));
|
||||
if (s != null) System.out.println(s.body());
|
||||
return s != null && s.statusCode() == 200;
|
||||
}
|
||||
|
||||
public static boolean putItem(ItemStack stack) {
|
||||
HttpResponse<String> a = request("/items", "PUT", HttpRequest.BodyPublishers.ofString(gson.toJson(Map.of(
|
||||
"itemName", Registry.ITEM.getId(stack.getItem()).getPath(),
|
||||
|
|
|
@ -8,6 +8,7 @@ import net.minecraft.client.gui.screen.GameMenuScreen;
|
|||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.text.Text;
|
||||
import net.shadow.client.feature.gui.screen.AddonManagerScreen;
|
||||
import net.shadow.client.feature.gui.screen.HudEditorScreen;
|
||||
import net.shadow.client.feature.gui.widget.RoundButton;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -27,5 +28,8 @@ public class GameMenuMixin extends Screen {
|
|||
client.setScreen(new AddonManagerScreen());
|
||||
// client.setScreen(new StatsScreen());
|
||||
}));
|
||||
addDrawableChild(new RoundButton(RoundButton.STANDARD, 5, 30, 60, 20, "Edit HUD", () -> {
|
||||
client.setScreen(new HudEditorScreen());
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ package net.shadow.client.mixin;
|
|||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.RunArgs;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.util.crash.CrashReport;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.module.ModuleRegistry;
|
||||
import net.shadow.client.feature.module.impl.world.FastUse;
|
||||
|
@ -15,7 +14,6 @@ import net.shadow.client.helper.event.EventType;
|
|||
import net.shadow.client.helper.event.Events;
|
||||
import net.shadow.client.helper.event.events.base.NonCancellableEvent;
|
||||
import net.shadow.client.helper.manager.ConfigManager;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
@ -31,12 +29,6 @@ public class MinecraftClientMixin {
|
|||
@Shadow
|
||||
private int itemUseCooldown;
|
||||
|
||||
@Inject(method = "printCrashReport", at = @At("HEAD"))
|
||||
private static void addCrashReport(CrashReport report, CallbackInfo ci) {
|
||||
ShadowMain.sendCrashReport(report.asString());
|
||||
ShadowMain.log(Level.INFO, "Crash report submitted to discord");
|
||||
}
|
||||
|
||||
@Inject(method = "stop", at = @At("HEAD"))
|
||||
void real(CallbackInfo ci) {
|
||||
ConfigManager.saveState();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue