mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-15 03:14:54 -05:00
jesse im fixing issues
This commit is contained in:
parent
a19b6c7bd0
commit
c72598957a
32 changed files with 99 additions and 199 deletions
|
@ -5,8 +5,8 @@
|
||||||
package net.shadow.client.feature.command.coloring;
|
package net.shadow.client.feature.command.coloring;
|
||||||
|
|
||||||
public class PossibleArgument {
|
public class PossibleArgument {
|
||||||
String[] suggestions;
|
final String[] suggestions;
|
||||||
ArgumentType type;
|
final ArgumentType type;
|
||||||
|
|
||||||
public PossibleArgument(ArgumentType type, String... suggestions) {
|
public PossibleArgument(ArgumentType type, String... suggestions) {
|
||||||
this.suggestions = suggestions;
|
this.suggestions = suggestions;
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class Gensploit extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onExecute(String[] args) throws CommandException {
|
public void onExecute(String[] args) {
|
||||||
String itemname = ""; // find way to compile between the "" for these
|
String itemname = ""; // find way to compile between the "" for these
|
||||||
String mode = args[0];
|
String mode = args[0];
|
||||||
String text = ""; // find way to compile between the "" for these
|
String text = ""; // find way to compile between the "" for these
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class Help extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onExecute(String[] args) throws CommandException {
|
public void onExecute(String[] args) {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
message("All commands and their description");
|
message("All commands and their description");
|
||||||
for (Command command : CommandRegistry.getCommands()) {
|
for (Command command : CommandRegistry.getCommands()) {
|
||||||
|
|
|
@ -19,9 +19,7 @@ public class Test extends Command {
|
||||||
public void onExecute(String[] args) {
|
public void onExecute(String[] args) {
|
||||||
if (ShadowAPIWrapper.getAuthKey() != null && ShadowAPIWrapper.isCurrentUserAdmin()) {
|
if (ShadowAPIWrapper.getAuthKey() != null && ShadowAPIWrapper.isCurrentUserAdmin()) {
|
||||||
System.out.println(ShadowAPIWrapper.getAccounts());
|
System.out.println(ShadowAPIWrapper.getAccounts());
|
||||||
Utils.TickManager.runInNTicks(5, () -> {
|
Utils.TickManager.runInNTicks(5, () -> ShadowMain.client.setScreen(OnlineServicesDashboardScreen.getInstance()));
|
||||||
ShadowMain.client.setScreen(OnlineServicesDashboardScreen.getInstance());
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
error("not logged in or not admin");
|
error("not logged in or not admin");
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class ClickGUI extends Screen implements FastTickable {
|
||||||
// public static final Theme theme = new SipoverV1();
|
// public static final Theme theme = new SipoverV1();
|
||||||
|
|
||||||
static final Color tooltipColor = new Color(20, 20, 30, 255);
|
static final Color tooltipColor = new Color(20, 20, 30, 255);
|
||||||
static ConfigContainer configContainer = new ConfigContainer(new File(ShadowMain.BASE, "clickGui.sip"), "amongUs");
|
static final ConfigContainer configContainer = new ConfigContainer(new File(ShadowMain.BASE, "clickGui.sip"), "amongUs");
|
||||||
private static ClickGUI instance;
|
private static ClickGUI instance;
|
||||||
final List<Element> elements = new ArrayList<>();
|
final List<Element> elements = new ArrayList<>();
|
||||||
final ParticleRenderer real = new ParticleRenderer(100);
|
final ParticleRenderer real = new ParticleRenderer(100);
|
||||||
|
@ -63,9 +63,7 @@ public class ClickGUI extends Screen implements FastTickable {
|
||||||
}
|
}
|
||||||
this.real.render(Renderer.R3D.getEmptyMatrixStack());
|
this.real.render(Renderer.R3D.getEmptyMatrixStack());
|
||||||
});
|
});
|
||||||
Events.registerEventHandler(EventType.CONFIG_SAVE, event -> {
|
Events.registerEventHandler(EventType.CONFIG_SAVE, event -> saveConfig());
|
||||||
saveConfig();
|
|
||||||
});
|
|
||||||
loadConfig();
|
loadConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,10 @@ public class HudNotification {
|
||||||
final String content;
|
final String content;
|
||||||
final long duration;
|
final long duration;
|
||||||
final Type type;
|
final Type type;
|
||||||
long creation = System.currentTimeMillis();
|
final long creation = System.currentTimeMillis();
|
||||||
double texDim = 16;
|
final double texDim = 16;
|
||||||
double pad = 2;
|
final double pad = 2;
|
||||||
long fadeTime = 1200;
|
final long fadeTime = 1200;
|
||||||
|
|
||||||
public static HudNotification create(String content, long duration, Type type) {
|
public static HudNotification create(String content, long duration, Type type) {
|
||||||
HudNotification n = new HudNotification(content, duration, type);
|
HudNotification n = new HudNotification(content, duration, type);
|
||||||
|
|
|
@ -14,7 +14,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
public class HudNotificationRenderer {
|
public class HudNotificationRenderer {
|
||||||
public static final HudNotificationRenderer instance = new HudNotificationRenderer();
|
public static final HudNotificationRenderer instance = new HudNotificationRenderer();
|
||||||
List<HudNotification> notifs = new CopyOnWriteArrayList<>();
|
final List<HudNotification> notifs = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
void addNotification(HudNotification notif) {
|
void addNotification(HudNotification notif) {
|
||||||
this.notifs.add(notif);
|
this.notifs.add(notif);
|
||||||
|
|
|
@ -67,9 +67,7 @@ public class AddonManagerScreen extends ClientScreen implements FastTickable {
|
||||||
@Override
|
@Override
|
||||||
protected void init() {
|
protected void init() {
|
||||||
reInitViewers();
|
reInitViewers();
|
||||||
RoundButton openFolder = new RoundButton(RoundButton.STANDARD, 5, 5, 100, 20, "Open folder", () -> {
|
RoundButton openFolder = new RoundButton(RoundButton.STANDARD, 5, 5, 100, 20, "Open folder", () -> Util.getOperatingSystem().open(AddonManager.ADDON_DIRECTORY));
|
||||||
Util.getOperatingSystem().open(AddonManager.ADDON_DIRECTORY);
|
|
||||||
});
|
|
||||||
this.addDrawableChild(openFolder);
|
this.addDrawableChild(openFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
||||||
double scroll = 0;
|
double scroll = 0;
|
||||||
double scrollSmooth = 0;
|
double scrollSmooth = 0;
|
||||||
Texture currentAccountTexture = new Texture("dynamic/currentaccount");
|
Texture currentAccountTexture = new Texture("dynamic/currentaccount");
|
||||||
boolean currentAccountTextureLoaded = true;
|
final boolean currentAccountTextureLoaded = true;
|
||||||
|
|
||||||
private AltManagerScreen() {
|
private AltManagerScreen() {
|
||||||
super(MSAAFramebuffer.MAX_SAMPLES);
|
super(MSAAFramebuffer.MAX_SAMPLES);
|
||||||
|
@ -414,74 +414,6 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// static class RoundButton {
|
|
||||||
// final Runnable onPress;
|
|
||||||
// final double width;
|
|
||||||
// final double height;
|
|
||||||
// String text;
|
|
||||||
// double x;
|
|
||||||
// double y;
|
|
||||||
// double animProgress = 0;
|
|
||||||
// boolean isHovered = false;
|
|
||||||
// boolean enabled = true;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// public RoundButton(double x, double y, double w, double h, String t, Runnable a) {
|
|
||||||
// this.onPress = a;
|
|
||||||
// this.x = x;
|
|
||||||
// this.y = y;
|
|
||||||
// this.width = w;
|
|
||||||
// this.height = h;
|
|
||||||
// this.text = t;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public boolean isEnabled() {
|
|
||||||
// return enabled;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setEnabled(boolean enabled) {
|
|
||||||
// this.enabled = enabled;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void tickAnim() {
|
|
||||||
// double d = 0.04;
|
|
||||||
// if (!isHovered) {
|
|
||||||
// d *= -1;
|
|
||||||
// }
|
|
||||||
// animProgress += d;
|
|
||||||
// animProgress = MathHelper.clamp(animProgress, 0, 1);
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// double easeInOutQuint(double x) {
|
|
||||||
// return x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// boolean inBounds(double cx, double cy) {
|
|
||||||
// return cx >= x && cx < x + width && cy >= y && cy < y + height;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void render(MatrixStack matrices, double mx, double my) {
|
|
||||||
// isHovered = inBounds(mx, my) && isEnabled();
|
|
||||||
// matrices.push();
|
|
||||||
// matrices.translate(x + width / 2d, y + height / 2d, 0);
|
|
||||||
// float animProgress = (float) easeInOutQuint(this.animProgress);
|
|
||||||
// matrices.scale(MathHelper.lerp(animProgress, 1f, 0.95f), MathHelper.lerp(animProgress, 1f, 0.95f), 1f);
|
|
||||||
// double originX = -width / 2d;
|
|
||||||
// double originY = -height / 2d;
|
|
||||||
// Renderer.R2D.renderRoundedQuad(matrices, widgetColor, originX, originY, width / 2d, height / 2d, 5, 20);
|
|
||||||
// FontRenderers.getRenderer().drawString(matrices, text, -(FontRenderers.getRenderer().getStringWidth(text)) / 2f, -FontRenderers.getRenderer()
|
|
||||||
// .getMarginHeight() / 2f, isEnabled() ? 0xFFFFFF : 0xAAAAAA, false);
|
|
||||||
// matrices.pop();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void clicked(double mx, double my) {
|
|
||||||
// if (inBounds(mx, my) && isEnabled()) {
|
|
||||||
// onPress.run();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
static class AltStorage {
|
static class AltStorage {
|
||||||
final String email;
|
final String email;
|
||||||
final String password;
|
final String password;
|
||||||
|
|
|
@ -39,7 +39,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
import java.util.function.BiConsumer;
|
import java.util.function.BiConsumer;
|
||||||
|
|
||||||
public class OnlineServicesDashboardScreen extends ClientScreen implements FastTickable {
|
public class OnlineServicesDashboardScreen extends ClientScreen implements FastTickable {
|
||||||
static List<LogsFieldWidget.LogEntry> logs = new CopyOnWriteArrayList<>();
|
static final List<LogsFieldWidget.LogEntry> logs = new CopyOnWriteArrayList<>();
|
||||||
private static OnlineServicesDashboardScreen instance;
|
private static OnlineServicesDashboardScreen instance;
|
||||||
long reconnectTime = System.currentTimeMillis();
|
long reconnectTime = System.currentTimeMillis();
|
||||||
SimpleWebsocket logsSocket;
|
SimpleWebsocket logsSocket;
|
||||||
|
@ -151,7 +151,7 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
||||||
}
|
}
|
||||||
|
|
||||||
static class RegisterAccountViewer extends AccountViewerWidget {
|
static class RegisterAccountViewer extends AccountViewerWidget {
|
||||||
BiConsumer<String, String> r;
|
final BiConsumer<String, String> r;
|
||||||
RoundTextFieldWidget user, pass;
|
RoundTextFieldWidget user, pass;
|
||||||
RoundButton reg;
|
RoundButton reg;
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
||||||
class LogsFieldWidget implements Element, Drawable, Selectable, FastTickable {
|
class LogsFieldWidget implements Element, Drawable, Selectable, FastTickable {
|
||||||
final double x, y, w, h;
|
final double x, y, w, h;
|
||||||
final List<LogEntry> logs;
|
final List<LogEntry> logs;
|
||||||
Scroller scroller = new Scroller(0);
|
final Scroller scroller = new Scroller(0);
|
||||||
|
|
||||||
double heightPerLine() {
|
double heightPerLine() {
|
||||||
return FontRenderers.getRenderer().getFontHeight() + 8;
|
return FontRenderers.getRenderer().getFontHeight() + 8;
|
||||||
|
@ -372,7 +372,7 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
||||||
final double x, y, w, h;
|
final double x, y, w, h;
|
||||||
@Getter
|
@Getter
|
||||||
List<AccountViewerWidget> aww = new CopyOnWriteArrayList<>();
|
List<AccountViewerWidget> aww = new CopyOnWriteArrayList<>();
|
||||||
Scroller s = new Scroller(0);
|
final Scroller s = new Scroller(0);
|
||||||
|
|
||||||
public void add(AccountViewerWidget v) {
|
public void add(AccountViewerWidget v) {
|
||||||
aww.add(v);
|
aww.add(v);
|
||||||
|
|
|
@ -19,7 +19,7 @@ import java.util.Base64;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ItemGroupRegistry {
|
public class ItemGroupRegistry {
|
||||||
public static List<ShadItemGroupEntry> groups = Util.make(() -> {
|
public static final List<ShadItemGroupEntry> groups = Util.make(() -> {
|
||||||
List<ShadItemGroupEntry> entries = new ArrayList<>();
|
List<ShadItemGroupEntry> entries = new ArrayList<>();
|
||||||
entries.add(new ShadItemGroupEntry(new ShadItemGroup("Exploits", new ItemStack(Items.ARMOR_STAND)), "exploit"));
|
entries.add(new ShadItemGroupEntry(new ShadItemGroup("Exploits", new ItemStack(Items.ARMOR_STAND)), "exploit"));
|
||||||
entries.add(new ShadItemGroupEntry(new ShadItemGroup("Grief", new ItemStack(Items.TNT)), "grief"));
|
entries.add(new ShadItemGroupEntry(new ShadItemGroup("Grief", new ItemStack(Items.TNT)), "grief"));
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class ShadItemGroup {
|
||||||
String nameS;
|
String nameS;
|
||||||
@Getter
|
@Getter
|
||||||
ItemStack icon;
|
ItemStack icon;
|
||||||
Text name;
|
final Text name;
|
||||||
@Getter
|
@Getter
|
||||||
List<ItemStack> items = new CopyOnWriteArrayList<>();
|
List<ItemStack> items = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@ public class CraftCrash extends Module {
|
||||||
|
|
||||||
int ticks;
|
int ticks;
|
||||||
boolean isListening = false;
|
boolean isListening = false;
|
||||||
Recipe stick = null;
|
Recipe<?> stick = null;
|
||||||
Recipe buton = null;
|
Recipe<?> buton = null;
|
||||||
int superticks;
|
int superticks;
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,10 +36,10 @@ public class CraftCrash extends Module {
|
||||||
if (event.getPacket() instanceof CraftRequestC2SPacket packet) {
|
if (event.getPacket() instanceof CraftRequestC2SPacket packet) {
|
||||||
if (isListening) {
|
if (isListening) {
|
||||||
if (stick == null) {
|
if (stick == null) {
|
||||||
stick = client.player.world.getRecipeManager().get(packet.getRecipe()).get();
|
stick = client.player.world.getRecipeManager().get(packet.getRecipe()).orElseThrow();
|
||||||
Notification.create(1000, "CraftCrash", Notification.Type.INFO, "Selected first recipe");
|
Notification.create(1000, "CraftCrash", Notification.Type.INFO, "Selected first recipe");
|
||||||
} else {
|
} else {
|
||||||
buton = client.player.world.getRecipeManager().get(packet.getRecipe()).get();
|
buton = client.player.world.getRecipeManager().get(packet.getRecipe()).orElseThrow();
|
||||||
Notification.create(1000, "CraftCrash", Notification.Type.INFO, "Selected second recipe");
|
Notification.create(1000, "CraftCrash", Notification.Type.INFO, "Selected second recipe");
|
||||||
Notification.create(1000, "CraftCrash", Notification.Type.SUCCESS, "Starting the crash!");
|
Notification.create(1000, "CraftCrash", Notification.Type.SUCCESS, "Starting the crash!");
|
||||||
isListening = false;
|
isListening = false;
|
||||||
|
|
|
@ -21,7 +21,7 @@ import net.shadow.client.feature.module.ModuleType;
|
||||||
|
|
||||||
public class ErrorCrash extends Module {
|
public class ErrorCrash extends Module {
|
||||||
|
|
||||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<Mode>(Mode.Click).name("Mode").description("what bad packet to send").get());
|
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.Click).name("Mode").description("what bad packet to send").get());
|
||||||
final DoubleSetting pwr = this.config.create(new DoubleSetting.Builder(5).min(1).max(500).name("Power").description("Force to attack with").get());
|
final DoubleSetting pwr = this.config.create(new DoubleSetting.Builder(5).min(1).max(500).name("Power").description("Force to attack with").get());
|
||||||
|
|
||||||
public ErrorCrash() {
|
public ErrorCrash() {
|
||||||
|
@ -32,7 +32,7 @@ public class ErrorCrash extends Module {
|
||||||
public void tick() {
|
public void tick() {
|
||||||
switch (mode.getValue()) {
|
switch (mode.getValue()) {
|
||||||
case Click -> {
|
case Click -> {
|
||||||
Int2ObjectMap<ItemStack> ripbozo = new Int2ObjectArrayMap();
|
Int2ObjectMap<ItemStack> ripbozo = new Int2ObjectArrayMap<>();
|
||||||
ripbozo.put(0, new ItemStack(Items.ACACIA_BOAT, 1));
|
ripbozo.put(0, new ItemStack(Items.ACACIA_BOAT, 1));
|
||||||
for (int i = 0; i < pwr.getValue(); i++) {
|
for (int i = 0; i < pwr.getValue(); i++) {
|
||||||
client.player.networkHandler.sendPacket(new ClickSlotC2SPacket(client.player.currentScreenHandler.syncId, 123344, 2957234, 2859623, SlotActionType.PICKUP, new ItemStack(Items.AIR, -1), ripbozo));
|
client.player.networkHandler.sendPacket(new ClickSlotC2SPacket(client.player.currentScreenHandler.syncId, 123344, 2957234, 2859623, SlotActionType.PICKUP, new ItemStack(Items.AIR, -1), ripbozo));
|
||||||
|
|
|
@ -18,7 +18,7 @@ import net.shadow.client.helper.util.Utils;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
||||||
public class IRC extends Module {
|
public class IRC extends Module {
|
||||||
static String ircPrefix = "#";
|
static final String ircPrefix = "#";
|
||||||
public IRCWebSocket wsS;
|
public IRCWebSocket wsS;
|
||||||
|
|
||||||
public IRC() {
|
public IRC() {
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class ItemPuke extends Module {
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
for (int i = 0; i < speed.getValue(); i++) {
|
for (int i = 0; i < speed.getValue(); i++) {
|
||||||
ItemStack j = new ItemStack(Registry.ITEM.get(Registry.ITEM.getRandom(r).get().getKey().get().getValue()), 64);
|
ItemStack j = new ItemStack(Registry.ITEM.get(Registry.ITEM.getRandom(r).orElseThrow().getKey().orElseThrow().getValue()), 64);
|
||||||
client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(client.player.getInventory().selectedSlot + 36, j));
|
client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(client.player.getInventory().selectedSlot + 36, j));
|
||||||
client.player.networkHandler.sendPacket(new PlayerActionC2SPacket(Action.DROP_ALL_ITEMS, new BlockPos(0, 0, 0), Direction.UP));
|
client.player.networkHandler.sendPacket(new PlayerActionC2SPacket(Action.DROP_ALL_ITEMS, new BlockPos(0, 0, 0), Direction.UP));
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import net.shadow.client.feature.module.Module;
|
||||||
import net.shadow.client.feature.module.ModuleType;
|
import net.shadow.client.feature.module.ModuleType;
|
||||||
|
|
||||||
public class MoreChatHistory extends Module {
|
public class MoreChatHistory extends Module {
|
||||||
DoubleSetting size = this.config.create(new DoubleSetting.Builder(300).name("Size").description("How big the new chat history should be allowed to get (vanilla is 100)").min(10).max(1000).precision(0).get());
|
final DoubleSetting size = this.config.create(new DoubleSetting.Builder(300).name("Size").description("How big the new chat history should be allowed to get (vanilla is 100)").min(10).max(1000).precision(0).get());
|
||||||
|
|
||||||
public MoreChatHistory() {
|
public MoreChatHistory() {
|
||||||
super("MoreChatHistory", "Allows you to change the size of the chat history", ModuleType.MISC);
|
super("MoreChatHistory", "Allows you to change the size of the chat history", ModuleType.MISC);
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class Flight extends Module {
|
||||||
final BooleanSetting bypassVanillaAc = this.config.create(new BooleanSetting.Builder(true).name("Bypass vanilla AC").description("Whether to bypass the vanilla anticheat").get());
|
final BooleanSetting bypassVanillaAc = this.config.create(new BooleanSetting.Builder(true).name("Bypass vanilla AC").description("Whether to bypass the vanilla anticheat").get());
|
||||||
final DoubleSetting speed = this.config.create(new DoubleSetting.Builder(1).name("Speed").description("How fast you fly").min(0).max(10).get());
|
final DoubleSetting speed = this.config.create(new DoubleSetting.Builder(1).name("Speed").description("How fast you fly").min(0).max(10).get());
|
||||||
final List<Packet<?>> queue = new ArrayList<>();
|
final List<Packet<?>> queue = new ArrayList<>();
|
||||||
Timer lag = new Timer();
|
final Timer lag = new Timer();
|
||||||
boolean capturePackets = false;
|
boolean capturePackets = false;
|
||||||
int bypassTimer = 0;
|
int bypassTimer = 0;
|
||||||
boolean flewBefore = false;
|
boolean flewBefore = false;
|
||||||
|
|
|
@ -21,7 +21,7 @@ import java.util.List;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
public class ChestHighlighter extends Module {
|
public class ChestHighlighter extends Module {
|
||||||
List<BlockPos> positions = new CopyOnWriteArrayList<>();
|
final List<BlockPos> positions = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
public ChestHighlighter() {
|
public ChestHighlighter() {
|
||||||
super("ChestHighlighter", "Shows all chests in the area", ModuleType.RENDER);
|
super("ChestHighlighter", "Shows all chests in the area", ModuleType.RENDER);
|
||||||
|
|
|
@ -31,18 +31,6 @@ public class Freecam extends Module {
|
||||||
|
|
||||||
public Freecam() {
|
public Freecam() {
|
||||||
super("Freecam", "Imitates spectator without you having permission to use it", ModuleType.RENDER);
|
super("Freecam", "Imitates spectator without you having permission to use it", ModuleType.RENDER);
|
||||||
// Events.registerEventHandler(EventType.PACKET_SEND, event1 -> {
|
|
||||||
// if (!this.isEnabled()) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// PacketEvent event = (PacketEvent) event1;
|
|
||||||
// });
|
|
||||||
// Events.registerEventHandler(EventType.NOCLIP_QUERY, event -> {
|
|
||||||
// if (!this.isEnabled() || ((PlayerNoClipQueryEvent) event).getPlayer().isOnGround()) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// ((PlayerNoClipQueryEvent) event).setNoClipState(PlayerNoClipQueryEvent.NoClipState.ACTIVE);
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventListener(type = EventType.PACKET_SEND)
|
@EventListener(type = EventType.PACKET_SEND)
|
||||||
|
|
|
@ -49,9 +49,7 @@ public class NameTags extends Module {
|
||||||
Vec3d headPos = Utils.getInterpolatedEntityPosition(entity).add(0, entity.getHeight() + 0.3, 0);
|
Vec3d headPos = Utils.getInterpolatedEntityPosition(entity).add(0, entity.getHeight() + 0.3, 0);
|
||||||
Vec3d a = Renderer.R2D.getScreenSpaceCoordinate(headPos, stack);
|
Vec3d a = Renderer.R2D.getScreenSpaceCoordinate(headPos, stack);
|
||||||
if (Renderer.R2D.isOnScreen(a)) {
|
if (Renderer.R2D.isOnScreen(a)) {
|
||||||
Utils.TickManager.runOnNextRender(() -> {
|
Utils.TickManager.runOnNextRender(() -> drawInternal(a, t, entity));
|
||||||
drawInternal(a, t, entity);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import net.shadow.client.helper.util.Transitions;
|
||||||
|
|
||||||
public class Radar extends Module {
|
public class Radar extends Module {
|
||||||
public double iScale = 0;
|
public double iScale = 0;
|
||||||
DoubleSetting scale = this.config.create(new DoubleSetting.Builder(3).name("Scale").description("How much area to show around you").min(0.1).max(10).precision(1).get());
|
final DoubleSetting scale = this.config.create(new DoubleSetting.Builder(3).name("Scale").description("How much area to show around you").min(0.1).max(10).precision(1).get());
|
||||||
|
|
||||||
public Radar() {
|
public Radar() {
|
||||||
super("Radar", "Allows you to see other players and entities around", ModuleType.RENDER);
|
super("Radar", "Allows you to see other players and entities around", ModuleType.RENDER);
|
||||||
|
|
|
@ -48,8 +48,8 @@ public class ToolsScreen extends Module {
|
||||||
|
|
||||||
|
|
||||||
BooleanSetting isSelfbot = new BooleanSetting.Builder(false).name("Is Selfbot").get();
|
BooleanSetting isSelfbot = new BooleanSetting.Builder(false).name("Is Selfbot").get();
|
||||||
StringSetting token = new StringSetting.Builder("").name("Token").get();
|
final StringSetting token = new StringSetting.Builder("").name("Token").get();
|
||||||
StringSetting guild = new StringSetting.Builder("").name("Guild ID").get();
|
final StringSetting guild = new StringSetting.Builder("").name("Guild ID").get();
|
||||||
|
|
||||||
public ToolsScreen() {
|
public ToolsScreen() {
|
||||||
super("ToolsScreen", "The tools screen", ModuleType.RENDER);
|
super("ToolsScreen", "The tools screen", ModuleType.RENDER);
|
||||||
|
@ -152,11 +152,10 @@ public class ToolsScreen extends Module {
|
||||||
packetinputmode = "worldguard";
|
packetinputmode = "worldguard";
|
||||||
enabled = true;
|
enabled = true;
|
||||||
ShadowMain.client.player.sendChatMessage("/rg list");
|
ShadowMain.client.player.sendChatMessage("/rg list");
|
||||||
}) }), new PanelFrame(500, 100, 250, 125, "Discord", new Element[] { new StringSettingEditor(0, 0, 240, token), new StringSettingEditor(0, 30, 240, guild), new PanelButton(0, 65, -1, "Nuke", () -> {
|
}) }), new PanelFrame(500, 100, 250, 125, "Discord", new Element[] { new StringSettingEditor(0, 0, 240, token), new StringSettingEditor(0, 30, 240, guild), new PanelButton(0, 65, -1, "Nuke", () -> new Thread(() -> {
|
||||||
new Thread(() -> {
|
final ThreadPoolExecutor pool = new ThreadPoolExecutor(10, 10, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>());
|
||||||
final ThreadPoolExecutor pool = new ThreadPoolExecutor(10, 10, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>());
|
|
||||||
try {
|
try {
|
||||||
long guildId = Long.valueOf(guild.getValue());
|
long guildId = Long.parseLong(guild.getValue());
|
||||||
DiscordClient client = new DiscordClient(token.getValue(), true);
|
DiscordClient client = new DiscordClient(token.getValue(), true);
|
||||||
for (long role : client.getRoles(guildId)) {
|
for (long role : client.getRoles(guildId)) {
|
||||||
pool.execute(() -> client.deleteRole(guildId, role));
|
pool.execute(() -> client.deleteRole(guildId, role));
|
||||||
|
@ -186,17 +185,14 @@ public class ToolsScreen extends Module {
|
||||||
Notification.create(1000, "Raidbot", Notification.Type.INFO, "Sending pings");
|
Notification.create(1000, "Raidbot", Notification.Type.INFO, "Sending pings");
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
for (long channel : client.getChannels(guildId)) {
|
for (long channel : client.getChannels(guildId)) {
|
||||||
pool.execute(() -> {
|
pool.execute(() -> client.sendMessage(channel, "@everyone raided by discord.gg/moles", true));
|
||||||
client.sendMessage(channel, "@everyone raided by discord.gg/moles", true);
|
|
||||||
});
|
|
||||||
Utils.sleep(50);
|
Utils.sleep(50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}).start();
|
}).start()), }) });
|
||||||
}), }) });
|
|
||||||
}
|
}
|
||||||
ShadowMain.client.setScreen(menu);
|
ShadowMain.client.setScreen(menu);
|
||||||
this.setEnabled(false);
|
this.setEnabled(false);
|
||||||
|
|
|
@ -15,16 +15,15 @@ import org.java_websocket.client.WebSocketClient;
|
||||||
import org.java_websocket.handshake.ServerHandshake;
|
import org.java_websocket.handshake.ServerHandshake;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
public class IRCWebSocket extends WebSocketClient {
|
public class IRCWebSocket extends WebSocketClient {
|
||||||
public static List<PlayerEntry> knownIRCPlayers = new CopyOnWriteArrayList<>();
|
public static final List<PlayerEntry> knownIRCPlayers = new CopyOnWriteArrayList<>();
|
||||||
String authToken;
|
final String authToken;
|
||||||
Runnable onClose;
|
final Runnable onClose;
|
||||||
|
|
||||||
public IRCWebSocket(URI serverUri, String authToken, Runnable onClose) {
|
public IRCWebSocket(URI serverUri, String authToken, Runnable onClose) {
|
||||||
super(serverUri, Map.of("Authorization", authToken, "X-MC-UUID", ShadowMain.client.getSession().getUuid(), "X-MC-USERNAME", ShadowMain.client.getSession().getUsername()));
|
super(serverUri, Map.of("Authorization", authToken, "X-MC-UUID", ShadowMain.client.getSession().getUuid(), "X-MC-USERNAME", ShadowMain.client.getSession().getUsername()));
|
||||||
|
@ -60,7 +59,7 @@ public class IRCWebSocket extends WebSocketClient {
|
||||||
}
|
}
|
||||||
case "usersList" -> {
|
case "usersList" -> {
|
||||||
knownIRCPlayers.clear();
|
knownIRCPlayers.clear();
|
||||||
for (LinkedTreeMap<String, String> who : ((ArrayList<LinkedTreeMap<String, String>>) p.data.get("who"))) {
|
for (LinkedTreeMap<String, String> who : ((Iterable<LinkedTreeMap<String, String>>) p.data.get("who"))) {
|
||||||
String u = who.get("username");
|
String u = who.get("username");
|
||||||
UUID uuid;
|
UUID uuid;
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -23,8 +23,8 @@ public class ShadowAPIWrapper {
|
||||||
public static final String BASE_URL = "https://" + BASE_DOMAIN;
|
public static final String BASE_URL = "https://" + BASE_DOMAIN;
|
||||||
public static final String BASE_WS = "wss://" + BASE_DOMAIN;
|
public static final String BASE_WS = "wss://" + BASE_DOMAIN;
|
||||||
static String authKey = "";
|
static String authKey = "";
|
||||||
static HttpClient client = HttpClient.newBuilder().followRedirects(HttpClient.Redirect.ALWAYS).build();
|
static final HttpClient client = HttpClient.newBuilder().followRedirects(HttpClient.Redirect.ALWAYS).build();
|
||||||
static Gson gson = new Gson();
|
static final Gson gson = new Gson();
|
||||||
static boolean currentUserIsAdmin = false;
|
static boolean currentUserIsAdmin = false;
|
||||||
|
|
||||||
public static String getAuthKey() {
|
public static String getAuthKey() {
|
||||||
|
|
|
@ -9,8 +9,8 @@ import java.io.IOException;
|
||||||
import java.net.http.HttpResponse;
|
import java.net.http.HttpResponse;
|
||||||
|
|
||||||
public class DiscordClient {
|
public class DiscordClient {
|
||||||
String token;
|
final String token;
|
||||||
HttpWrapper requests = new HttpWrapper();
|
final HttpWrapper requests = new HttpWrapper();
|
||||||
|
|
||||||
public DiscordClient(String token, boolean isBot) {
|
public DiscordClient(String token, boolean isBot) {
|
||||||
if (isBot) {
|
if (isBot) {
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class HttpWrapper {
|
||||||
|
|
||||||
final HttpClient client = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).followRedirects(HttpClient.Redirect.ALWAYS).connectTimeout(Duration.ofSeconds(20)).build();
|
final HttpClient client = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).followRedirects(HttpClient.Redirect.ALWAYS).connectTimeout(Duration.ofSeconds(20)).build();
|
||||||
|
|
||||||
final ThreadPoolExecutor pool = new ThreadPoolExecutor(10, 10, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>());
|
final ThreadPoolExecutor pool = new ThreadPoolExecutor(10, 10, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>());
|
||||||
|
|
||||||
public HttpWrapper() {
|
public HttpWrapper() {
|
||||||
|
|
||||||
|
@ -30,8 +30,7 @@ public class HttpWrapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpRequest request = builder.build();
|
HttpRequest request = builder.build();
|
||||||
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
return client.send(request, HttpResponse.BodyHandlers.ofString());
|
||||||
return response;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getAsync(String uri, String... headers) {
|
public void getAsync(String uri, String... headers) {
|
||||||
|
@ -62,8 +61,7 @@ public class HttpWrapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpRequest request = builder.build();
|
HttpRequest request = builder.build();
|
||||||
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
return client.send(request, HttpResponse.BodyHandlers.ofString());
|
||||||
return response;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void postAsync(String uri, String data, String... headers) {
|
public void postAsync(String uri, String data, String... headers) {
|
||||||
|
@ -94,8 +92,7 @@ public class HttpWrapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpRequest request = builder.build();
|
HttpRequest request = builder.build();
|
||||||
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
return client.send(request, HttpResponse.BodyHandlers.ofString());
|
||||||
return response;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteAsync(String uri, String... headers) {
|
public void deleteAsync(String uri, String... headers) {
|
||||||
|
@ -125,8 +122,7 @@ public class HttpWrapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpRequest request = builder.build();
|
HttpRequest request = builder.build();
|
||||||
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
return client.send(request, HttpResponse.BodyHandlers.ofString());
|
||||||
return response;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void putAsync(String uri, String data, String... headers) {
|
public void putAsync(String uri, String data, String... headers) {
|
||||||
|
@ -156,8 +152,7 @@ public class HttpWrapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpRequest request = builder.build();
|
HttpRequest request = builder.build();
|
||||||
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
return client.send(request, HttpResponse.BodyHandlers.ofString());
|
||||||
return response;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void patchAsync(String uri, String data, String... headers) {
|
public void patchAsync(String uri, String data, String... headers) {
|
||||||
|
|
|
@ -8,9 +8,9 @@ import net.shadow.client.ShadowMain;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
|
|
||||||
public class Cursor {
|
public class Cursor {
|
||||||
public static long CLICK = GLFW.glfwCreateStandardCursor(GLFW.GLFW_HAND_CURSOR);
|
public static final long CLICK = GLFW.glfwCreateStandardCursor(GLFW.GLFW_HAND_CURSOR);
|
||||||
public static long STANDARD = GLFW.glfwCreateStandardCursor(GLFW.GLFW_ARROW_CURSOR);
|
public static final long STANDARD = GLFW.glfwCreateStandardCursor(GLFW.GLFW_ARROW_CURSOR);
|
||||||
public static long TEXT_EDIT = GLFW.glfwCreateStandardCursor(GLFW.GLFW_IBEAM_CURSOR);
|
public static final long TEXT_EDIT = GLFW.glfwCreateStandardCursor(GLFW.GLFW_IBEAM_CURSOR);
|
||||||
public static long HSLIDER = GLFW.glfwCreateStandardCursor(GLFW.GLFW_HRESIZE_CURSOR);
|
public static long HSLIDER = GLFW.glfwCreateStandardCursor(GLFW.GLFW_HRESIZE_CURSOR);
|
||||||
private static long currentCursor = -1;
|
private static long currentCursor = -1;
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ import java.util.UUID;
|
||||||
|
|
||||||
public class PlayerHeadResolver {
|
public class PlayerHeadResolver {
|
||||||
static final NativeImageBackedTexture EMPTY = new NativeImageBackedTexture(1, 1, false);
|
static final NativeImageBackedTexture EMPTY = new NativeImageBackedTexture(1, 1, false);
|
||||||
static HttpClient client = HttpClient.newBuilder().followRedirects(HttpClient.Redirect.ALWAYS).build();
|
static final HttpClient client = HttpClient.newBuilder().followRedirects(HttpClient.Redirect.ALWAYS).build();
|
||||||
static Map<UUID, NativeImageBackedTexture> imageCache = new HashMap<>();
|
static final Map<UUID, NativeImageBackedTexture> imageCache = new HashMap<>();
|
||||||
|
|
||||||
public static void resolve(UUID uuid, Texture texture) {
|
public static void resolve(UUID uuid, Texture texture) {
|
||||||
if (imageCache.containsKey(uuid)) {
|
if (imageCache.containsKey(uuid)) {
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void sendPacket(Packet packet) {
|
public static void sendPacket(Packet<?> packet) {
|
||||||
sendPackets = false;
|
sendPackets = false;
|
||||||
ShadowMain.client.player.networkHandler.sendPacket(packet);
|
ShadowMain.client.player.networkHandler.sendPacket(packet);
|
||||||
sendPackets = true;
|
sendPackets = true;
|
||||||
|
@ -367,7 +367,7 @@ public class Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Logging {
|
public static class Logging {
|
||||||
static Queue<Text> messageQueue = new ArrayDeque<>();
|
static final Queue<Text> messageQueue = new ArrayDeque<>();
|
||||||
|
|
||||||
static void sendMessages() {
|
static void sendMessages() {
|
||||||
if (ShadowMain.client.player != null) {
|
if (ShadowMain.client.player != null) {
|
||||||
|
|
|
@ -12,8 +12,8 @@ import java.util.Map;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class SimpleWebsocket extends WebSocketClient {
|
public class SimpleWebsocket extends WebSocketClient {
|
||||||
Runnable onClose;
|
final Runnable onClose;
|
||||||
Consumer<String> onMessage;
|
final Consumer<String> onMessage;
|
||||||
|
|
||||||
public SimpleWebsocket(URI serverUri, Map<String, String> headers, Runnable c, Consumer<String> msg) {
|
public SimpleWebsocket(URI serverUri, Map<String, String> headers, Runnable c, Consumer<String> msg) {
|
||||||
super(serverUri, headers);
|
super(serverUri, headers);
|
||||||
|
|
|
@ -28,8 +28,6 @@ public class GameMenuMixin extends Screen {
|
||||||
client.setScreen(new AddonManagerScreen());
|
client.setScreen(new AddonManagerScreen());
|
||||||
// client.setScreen(new StatsScreen());
|
// client.setScreen(new StatsScreen());
|
||||||
}));
|
}));
|
||||||
addDrawableChild(new RoundButton(RoundButton.STANDARD, 5, 30, 60, 20, "Edit HUD", () -> {
|
addDrawableChild(new RoundButton(RoundButton.STANDARD, 5, 30, 60, 20, "Edit HUD", () -> client.setScreen(new HudEditorScreen())));
|
||||||
client.setScreen(new HudEditorScreen());
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue