mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-14 19:04:54 -05:00
the
This commit is contained in:
parent
2193670061
commit
15bc5b1bda
202 changed files with 1101 additions and 1700 deletions
|
@ -18,7 +18,7 @@ import net.shadow.client.feature.module.ModuleRegistry;
|
|||
import net.shadow.client.helper.Rotations;
|
||||
import net.shadow.client.helper.event.EventType;
|
||||
import net.shadow.client.helper.event.Events;
|
||||
import net.shadow.client.helper.event.events.PostInitEvent;
|
||||
import net.shadow.client.helper.event.events.base.NonCancellableEvent;
|
||||
import net.shadow.client.helper.font.FontRenderers;
|
||||
import net.shadow.client.helper.font.adapter.impl.BruhAdapter;
|
||||
import net.shadow.client.helper.font.renderer.FontRenderer;
|
||||
|
@ -28,8 +28,7 @@ import org.apache.logging.log4j.Level;
|
|||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.awt.Font;
|
||||
import java.awt.FontFormatException;
|
||||
import java.awt.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -153,7 +152,7 @@ public class ShadowMain implements ModInitializer {
|
|||
// ModuleRegistry.sortModulesPostInit();
|
||||
CommandRegistry.init();
|
||||
log(Level.INFO, "Sending post window init");
|
||||
Events.fireEvent(EventType.POST_INIT, new PostInitEvent());
|
||||
Events.fireEvent(EventType.POST_INIT, new NonCancellableEvent());
|
||||
for (Module module : new ArrayList<>(ModuleRegistry.getModules())) {
|
||||
module.postInit();
|
||||
}
|
||||
|
|
|
@ -29,11 +29,7 @@ import java.nio.file.FileVisitor;
|
|||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
|
@ -42,19 +38,21 @@ import java.util.stream.Collectors;
|
|||
public class AddonManager {
|
||||
public static final File ADDON_DIRECTORY = new File(ShadowMain.BASE, "addons");
|
||||
public static final File ADDON_RESOURCE_CACHE = new File(ADDON_DIRECTORY, ".res_cache");
|
||||
private static final int[] EXPECTED_CLASS_SIGNATURE = new int[]{
|
||||
0xCA, 0xFE, 0xBA, 0xBE
|
||||
};
|
||||
private static final int[] EXPECTED_CLASS_SIGNATURE = new int[]{0xCA, 0xFE, 0xBA, 0xBE};
|
||||
public static AddonManager INSTANCE;
|
||||
private final List<AddonEntry> loadedAddons = new ArrayList<>();
|
||||
|
||||
@SuppressWarnings("ResultOfMethodCallIgnored")
|
||||
private AddonManager() {
|
||||
INSTANCE = this;
|
||||
if (!ADDON_DIRECTORY.isDirectory()) ADDON_DIRECTORY.delete();
|
||||
if (!ADDON_DIRECTORY.exists()) ADDON_DIRECTORY.mkdir();
|
||||
if (!ADDON_RESOURCE_CACHE.isDirectory()) ADDON_RESOURCE_CACHE.delete();
|
||||
if (!ADDON_RESOURCE_CACHE.exists()) ADDON_RESOURCE_CACHE.mkdir();
|
||||
if (!ADDON_DIRECTORY.isDirectory())
|
||||
ADDON_DIRECTORY.delete();
|
||||
if (!ADDON_DIRECTORY.exists())
|
||||
ADDON_DIRECTORY.mkdir();
|
||||
if (!ADDON_RESOURCE_CACHE.isDirectory())
|
||||
ADDON_RESOURCE_CACHE.delete();
|
||||
if (!ADDON_RESOURCE_CACHE.exists())
|
||||
ADDON_RESOURCE_CACHE.mkdir();
|
||||
initializeAddons();
|
||||
|
||||
Events.registerEventHandlerClass(this);
|
||||
|
@ -160,7 +158,8 @@ public class AddonManager {
|
|||
storedConfig.put(customModule.module().getName(), customModule.module().config);
|
||||
}
|
||||
}
|
||||
if (addon.isEnabled()) disableAddon(addon);
|
||||
if (addon.isEnabled())
|
||||
disableAddon(addon);
|
||||
AddonEntry meant = null;
|
||||
for (AddonEntry loadedAddon : loadedAddons) {
|
||||
if (loadedAddon.registeredAddon == addon) {
|
||||
|
@ -199,25 +198,29 @@ public class AddonManager {
|
|||
}
|
||||
|
||||
public void disableAddon(Addon addon) {
|
||||
if (!addon.isEnabled()) throw new IllegalStateException("Addon already disabled");
|
||||
if (!addon.isEnabled())
|
||||
throw new IllegalStateException("Addon already disabled");
|
||||
addon.onDisable();
|
||||
ModuleRegistry.clearCustomModules(addon);
|
||||
CommandRegistry.clearCustomCommands(addon);
|
||||
}
|
||||
|
||||
public void enableAddon(Addon addon) {
|
||||
if (addon.isEnabled()) throw new IllegalStateException("Addon already enabled");
|
||||
if (addon.isEnabled())
|
||||
throw new IllegalStateException("Addon already enabled");
|
||||
addon.onEnable();
|
||||
List<AddonModule> customModules = addon.getAdditionalModules();
|
||||
List<Command> customCommands = addon.getAdditionalCommands();
|
||||
if (customModules != null) for (AddonModule additionalModule : customModules) {
|
||||
ShadowMain.log(Level.INFO, "Loading module " + additionalModule.getName() + " from addon " + addon.name);
|
||||
ModuleRegistry.registerAddonModule(addon, additionalModule);
|
||||
}
|
||||
if (customCommands != null) for (Command customCommand : customCommands) {
|
||||
ShadowMain.log(Level.INFO, "Loading command " + customCommand.getName() + " from addon " + addon.name);
|
||||
CommandRegistry.registerCustomCommand(addon, customCommand);
|
||||
}
|
||||
if (customModules != null)
|
||||
for (AddonModule additionalModule : customModules) {
|
||||
ShadowMain.log(Level.INFO, "Loading module " + additionalModule.getName() + " from addon " + addon.name);
|
||||
ModuleRegistry.registerAddonModule(addon, additionalModule);
|
||||
}
|
||||
if (customCommands != null)
|
||||
for (Command customCommand : customCommands) {
|
||||
ShadowMain.log(Level.INFO, "Loading command " + customCommand.getName() + " from addon " + addon.name);
|
||||
CommandRegistry.registerCustomCommand(addon, customCommand);
|
||||
}
|
||||
}
|
||||
|
||||
void dispatchDisable() {
|
||||
|
@ -245,7 +248,8 @@ public class AddonManager {
|
|||
JarFile jf = new JarFile(location);
|
||||
Class<Addon> mainClass = null;
|
||||
for (JarEntry jarEntry : jf.stream().toList()) {
|
||||
if (jarEntry.isDirectory()) continue;
|
||||
if (jarEntry.isDirectory())
|
||||
continue;
|
||||
InputStream stream = jf.getInputStream(jarEntry);
|
||||
if (jarEntry.getName().endsWith(".class")) {
|
||||
byte[] classBytes = stream.readAllBytes();
|
||||
|
@ -256,13 +260,7 @@ public class AddonManager {
|
|||
cSigP[i] = Byte.toUnsignedInt(cSig[i]);
|
||||
}
|
||||
if (!Arrays.equals(cSigP, EXPECTED_CLASS_SIGNATURE)) {
|
||||
throw new IllegalStateException(
|
||||
"Invalid class file signature for " + jarEntry.getName() + ": expected 0x" + Arrays.stream(EXPECTED_CLASS_SIGNATURE)
|
||||
.mapToObj(value -> Integer.toHexString(value).toUpperCase())
|
||||
.collect(Collectors.joining()) +
|
||||
", got 0x" + Arrays.stream(cSigP)
|
||||
.mapToObj(value -> Integer.toHexString(value).toUpperCase())
|
||||
.collect(Collectors.joining()));
|
||||
throw new IllegalStateException("Invalid class file signature for " + jarEntry.getName() + ": expected 0x" + Arrays.stream(EXPECTED_CLASS_SIGNATURE).mapToObj(value -> Integer.toHexString(value).toUpperCase()).collect(Collectors.joining()) + ", got 0x" + Arrays.stream(cSigP).mapToObj(value -> Integer.toHexString(value).toUpperCase()).collect(Collectors.joining()));
|
||||
}
|
||||
Class<?> loadedClass = classLoader.defineAndGetClass(classBytes);
|
||||
if (Addon.class.isAssignableFrom(loadedClass)) {
|
||||
|
|
|
@ -6,61 +6,7 @@ package net.shadow.client.feature.command;
|
|||
|
||||
import net.shadow.client.feature.addon.Addon;
|
||||
import net.shadow.client.feature.command.exception.CommandException;
|
||||
import net.shadow.client.feature.command.impl.ApplyVel;
|
||||
import net.shadow.client.feature.command.impl.AsConsole;
|
||||
import net.shadow.client.feature.command.impl.Author;
|
||||
import net.shadow.client.feature.command.impl.Ban;
|
||||
import net.shadow.client.feature.command.impl.Bind;
|
||||
import net.shadow.client.feature.command.impl.Boot;
|
||||
import net.shadow.client.feature.command.impl.CheckCmd;
|
||||
import net.shadow.client.feature.command.impl.ClearInventory;
|
||||
import net.shadow.client.feature.command.impl.Config;
|
||||
import net.shadow.client.feature.command.impl.ConfigUtils;
|
||||
import net.shadow.client.feature.command.impl.Crash;
|
||||
import net.shadow.client.feature.command.impl.Damage;
|
||||
import net.shadow.client.feature.command.impl.Drop;
|
||||
import net.shadow.client.feature.command.impl.EVclip;
|
||||
import net.shadow.client.feature.command.impl.Effect;
|
||||
import net.shadow.client.feature.command.impl.Equip;
|
||||
import net.shadow.client.feature.command.impl.FakeItem;
|
||||
import net.shadow.client.feature.command.impl.Find;
|
||||
import net.shadow.client.feature.command.impl.FloodLuckperms;
|
||||
import net.shadow.client.feature.command.impl.ForEach;
|
||||
import net.shadow.client.feature.command.impl.ForceOP;
|
||||
import net.shadow.client.feature.command.impl.Gamemode;
|
||||
import net.shadow.client.feature.command.impl.HClip;
|
||||
import net.shadow.client.feature.command.impl.Help;
|
||||
import net.shadow.client.feature.command.impl.Hologram;
|
||||
import net.shadow.client.feature.command.impl.Image;
|
||||
import net.shadow.client.feature.command.impl.Inject;
|
||||
import net.shadow.client.feature.command.impl.Invsee;
|
||||
import net.shadow.client.feature.command.impl.ItemData;
|
||||
import net.shadow.client.feature.command.impl.ItemExploit;
|
||||
import net.shadow.client.feature.command.impl.ItemSpoof;
|
||||
import net.shadow.client.feature.command.impl.KickSelf;
|
||||
import net.shadow.client.feature.command.impl.Kickall;
|
||||
import net.shadow.client.feature.command.impl.Kill;
|
||||
import net.shadow.client.feature.command.impl.LinkWolf;
|
||||
import net.shadow.client.feature.command.impl.LogFlood;
|
||||
import net.shadow.client.feature.command.impl.MessageSpam;
|
||||
import net.shadow.client.feature.command.impl.OnlineAPI;
|
||||
import net.shadow.client.feature.command.impl.Panic;
|
||||
import net.shadow.client.feature.command.impl.PermissionLevel;
|
||||
import net.shadow.client.feature.command.impl.Poof;
|
||||
import net.shadow.client.feature.command.impl.RageQuit;
|
||||
import net.shadow.client.feature.command.impl.RandomBook;
|
||||
import net.shadow.client.feature.command.impl.Rename;
|
||||
import net.shadow.client.feature.command.impl.Say;
|
||||
import net.shadow.client.feature.command.impl.ServerCrash;
|
||||
import net.shadow.client.feature.command.impl.SocketKick;
|
||||
import net.shadow.client.feature.command.impl.SpawnData;
|
||||
import net.shadow.client.feature.command.impl.StopServer;
|
||||
import net.shadow.client.feature.command.impl.Taco;
|
||||
import net.shadow.client.feature.command.impl.Test;
|
||||
import net.shadow.client.feature.command.impl.TitleLag;
|
||||
import net.shadow.client.feature.command.impl.Toggle;
|
||||
import net.shadow.client.feature.command.impl.VClip;
|
||||
import net.shadow.client.feature.command.impl.ViewNbt;
|
||||
import net.shadow.client.feature.command.impl.*;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -73,7 +19,7 @@ public class CommandRegistry {
|
|||
private static final List<Command> sharedCommands = new ArrayList<>();
|
||||
|
||||
static {
|
||||
// init();
|
||||
// init();
|
||||
rebuildSharedCommands();
|
||||
}
|
||||
|
||||
|
@ -177,7 +123,8 @@ public class CommandRegistry {
|
|||
c.onExecute(args);
|
||||
} catch (CommandException cex) {
|
||||
Utils.Logging.error(cex.getMessage());
|
||||
if (cex.getPotentialFix() != null) Utils.Logging.error("Potential fix: " + cex.getPotentialFix());
|
||||
if (cex.getPotentialFix() != null)
|
||||
Utils.Logging.error("Potential fix: " + cex.getPotentialFix());
|
||||
} catch (Exception e) {
|
||||
Utils.Logging.error("Error while running command " + command);
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -23,9 +23,11 @@ public class PlayerFromNameArgumentParser implements ArgumentParser<PlayerEntity
|
|||
throw new CommandException("World is not loaded", "Join a world or server");
|
||||
for (AbstractClientPlayerEntity player : ShadowMain.client.world.getPlayers()) {
|
||||
if (ignoreCase) {
|
||||
if (player.getGameProfile().getName().equalsIgnoreCase(argument)) return player;
|
||||
if (player.getGameProfile().getName().equalsIgnoreCase(argument))
|
||||
return player;
|
||||
} else {
|
||||
if (player.getGameProfile().getName().equals(argument)) return player;
|
||||
if (player.getGameProfile().getName().equals(argument))
|
||||
return player;
|
||||
}
|
||||
}
|
||||
throw new CommandException("Invalid argument \"" + argument + "\": Player not found", "Provide the name of an existing player");
|
||||
|
|
|
@ -19,7 +19,8 @@ public class PlayerFromUuidArgumentParser implements ArgumentParser<PlayerEntity
|
|||
try {
|
||||
UUID u = UUID.fromString(argument);
|
||||
for (AbstractClientPlayerEntity player : ShadowMain.client.world.getPlayers()) {
|
||||
if (player.getUuid().equals(u)) return player;
|
||||
if (player.getUuid().equals(u))
|
||||
return player;
|
||||
}
|
||||
throw new CommandException("Invalid argument \"" + argument + "\": Player not found", "Provide the uuid of an existing player");
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -16,7 +16,8 @@ public class StreamlineArgumentParser {
|
|||
}
|
||||
|
||||
public String consumeString() throws CommandException {
|
||||
if (index >= args.length) throw new CommandException("Not enough arguments", null);
|
||||
if (index >= args.length)
|
||||
throw new CommandException("Not enough arguments", null);
|
||||
String el = args[index];
|
||||
index++;
|
||||
return el;
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.client.network.AbstractClientPlayerEntity;
|
|||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
public enum ArgumentType {
|
||||
STRING(new Color(0x55FF55), String.class),
|
||||
|
|
|
@ -6,7 +6,8 @@ package net.shadow.client.feature.command.coloring;
|
|||
|
||||
public class StaticArgumentServer {
|
||||
public static PossibleArgument serveFromStatic(int index, PossibleArgument... types) {
|
||||
if (index >= types.length) return new PossibleArgument(null);
|
||||
if (index >= types.length)
|
||||
return new PossibleArgument(null);
|
||||
return types[index];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,8 @@ public class Config extends Command {
|
|||
case 1 -> {
|
||||
if (ModuleRegistry.getByName(args[0]) != null) {
|
||||
yield new PossibleArgument(ArgumentType.STRING, Objects.requireNonNull(ModuleRegistry.getByName(args[0].replaceAll("-", " "))).config.getSettings().stream().map(SettingBase::getName).toList().toArray(String[]::new));
|
||||
} else yield super.getSuggestionsWithType(index, args);
|
||||
} else
|
||||
yield super.getSuggestionsWithType(index, args);
|
||||
}
|
||||
case 2 -> new PossibleArgument(ArgumentType.STRING, "(New value)");
|
||||
default -> super.getSuggestionsWithType(index, args);
|
||||
|
|
|
@ -9,11 +9,7 @@ import com.google.gson.JsonArray;
|
|||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import net.minecraft.text.ClickEvent;
|
||||
import net.minecraft.text.HoverEvent;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Style;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.*;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.command.Command;
|
||||
import net.shadow.client.feature.command.coloring.ArgumentType;
|
||||
|
@ -157,8 +153,7 @@ public class ConfigUtils extends Command {
|
|||
base.add("config", config);
|
||||
FileUtils.writeStringToFile(out, base.toString(), Charsets.UTF_8, false);
|
||||
LiteralText t = new LiteralText("[§9A§r] Saved config! Click to open");
|
||||
Style s = Style.EMPTY.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Text.of("Click to open")))
|
||||
.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, out.getAbsolutePath()));
|
||||
Style s = Style.EMPTY.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Text.of("Click to open"))).withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, out.getAbsolutePath()));
|
||||
t.setStyle(s);
|
||||
Objects.requireNonNull(ShadowMain.client.player).sendMessage(t, false);
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -60,7 +60,6 @@ public class Damage extends Command {
|
|||
}
|
||||
|
||||
private void sendPosition(double x, double y, double z, boolean onGround) {
|
||||
ShadowMain.client.player.networkHandler.sendPacket(
|
||||
new PlayerMoveC2SPacket.PositionAndOnGround(x, y, z, onGround));
|
||||
ShadowMain.client.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(x, y, z, onGround));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,8 @@ public class Effect extends Command {
|
|||
|
||||
@Override
|
||||
public PossibleArgument getSuggestionsWithType(int index, String[] args) {
|
||||
if (index == 0) return new PossibleArgument(ArgumentType.STRING, "give", "clear");
|
||||
if (index == 0)
|
||||
return new PossibleArgument(ArgumentType.STRING, "give", "clear");
|
||||
else if (args[0].equalsIgnoreCase("give")) {
|
||||
return switch (index) {
|
||||
case 1 -> new PossibleArgument(ArgumentType.NUMBER, "(effect id)");
|
||||
|
|
|
@ -34,13 +34,15 @@ public class ForEach extends Command {
|
|||
public ForEach() {
|
||||
super("ForEach", "Do something for each player", "forEach", "for", "fe");
|
||||
Events.registerEventHandler(EventType.PACKET_RECEIVE, event -> {
|
||||
if (!recieving) return;
|
||||
if (!recieving)
|
||||
return;
|
||||
PacketEvent pe = (PacketEvent) event;
|
||||
if (pe.getPacket() instanceof CommandSuggestionsS2CPacket packet) {
|
||||
Suggestions all = packet.getSuggestions();
|
||||
for (Suggestion i : all.getList()) {
|
||||
String name = i.getText();
|
||||
if (name.contains(ShadowMain.client.player.getName().toString())) continue;
|
||||
if (name.contains(ShadowMain.client.player.getName().toString()))
|
||||
continue;
|
||||
ShadowMain.client.player.sendChatMessage(partial.replaceAll("%s", name));
|
||||
message(partial.replaceAll("%s", name));
|
||||
}
|
||||
|
@ -67,8 +69,7 @@ public class ForEach extends Command {
|
|||
switch (args[0]) {
|
||||
case "player" -> {
|
||||
for (PlayerListEntry playerListEntry : Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).getPlayerList()) {
|
||||
if (Utils.Players.isPlayerNameValid(playerListEntry.getProfile().getName()) && !playerListEntry.getProfile().getId()
|
||||
.equals(Objects.requireNonNull(ShadowMain.client.player).getUuid())) {
|
||||
if (Utils.Players.isPlayerNameValid(playerListEntry.getProfile().getName()) && !playerListEntry.getProfile().getId().equals(Objects.requireNonNull(ShadowMain.client.player).getUuid())) {
|
||||
runner.execute(() -> {
|
||||
try {
|
||||
ShadowMain.client.player.sendChatMessage(String.join(" ", Arrays.copyOfRange(args, 2, args.length)).replaceAll("%s", playerListEntry.getProfile().getName()));
|
||||
|
|
|
@ -37,7 +37,8 @@ public class Gamemode extends Command {
|
|||
}
|
||||
validateArgumentsLength(args, 1, "Provide gamemode");
|
||||
GameMode gm = GameMode.byName(args[0], null);
|
||||
if (gm == null) throw new CommandException("Invalid gamemode", "Specify a valid gamemode");
|
||||
if (gm == null)
|
||||
throw new CommandException("Invalid gamemode", "Specify a valid gamemode");
|
||||
ShadowMain.client.interactionManager.setGameMode(gm);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import net.shadow.client.feature.command.exception.CommandException;
|
|||
import net.shadow.client.feature.module.ModuleRegistry;
|
||||
import net.shadow.client.feature.module.impl.misc.ClientSettings;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -49,7 +49,8 @@ public class Help extends Command {
|
|||
} else {
|
||||
String s = args[0];
|
||||
Command c = CommandRegistry.getByAlias(s);
|
||||
if (c == null) error("Command \"" + s + "\" was not found");
|
||||
if (c == null)
|
||||
error("Command \"" + s + "\" was not found");
|
||||
else {
|
||||
message("Command " + c.getName());
|
||||
message(c.getDescription(), Color.GRAY);
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.shadow.client.helper.event.events.PacketEvent;
|
|||
import net.shadow.client.helper.util.Utils;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
|
@ -38,7 +38,8 @@ public class Image extends Command {
|
|||
public Image() {
|
||||
super("Image", "Apply an image to various text mediums", "image", "img");
|
||||
Events.registerEventHandler(EventType.PACKET_RECEIVE, event -> {
|
||||
if (!real) return;
|
||||
if (!real)
|
||||
return;
|
||||
PacketEvent pe = (PacketEvent) event;
|
||||
if (pe.getPacket() instanceof GameMessageS2CPacket p) {
|
||||
if (p.getMessage().getString().contains("Command set:")) {
|
||||
|
@ -55,9 +56,7 @@ public class Image extends Command {
|
|||
|
||||
@Override
|
||||
public PossibleArgument getSuggestionsWithType(int index, String[] args) {
|
||||
return StaticArgumentServer.serveFromStatic(index, new PossibleArgument(ArgumentType.STRING, "chat", "book", "lore"),
|
||||
new PossibleArgument(ArgumentType.STRING, "(url)"),
|
||||
new PossibleArgument(ArgumentType.NUMBER, "(size)"));
|
||||
return StaticArgumentServer.serveFromStatic(index, new PossibleArgument(ArgumentType.STRING, "chat", "book", "lore"), new PossibleArgument(ArgumentType.STRING, "(url)"), new PossibleArgument(ArgumentType.NUMBER, "(size)"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,9 +26,7 @@ public class ItemData extends Command {
|
|||
|
||||
@Override
|
||||
public PossibleArgument getSuggestionsWithType(int index, String[] args) {
|
||||
return StaticArgumentServer.serveFromStatic(index, new PossibleArgument(ArgumentType.PLAYER, Objects.requireNonNull(ShadowMain.client.world).getPlayers().stream().map(abstractClientPlayerEntity -> abstractClientPlayerEntity.getGameProfile().getName()).toList().toArray(String[]::new)),
|
||||
new PossibleArgument(ArgumentType.STRING, "hand", "offhand", "head", "chest", "legs", "feet"),
|
||||
new PossibleArgument(ArgumentType.STRING, "--onlyShow"));
|
||||
return StaticArgumentServer.serveFromStatic(index, new PossibleArgument(ArgumentType.PLAYER, Objects.requireNonNull(ShadowMain.client.world).getPlayers().stream().map(abstractClientPlayerEntity -> abstractClientPlayerEntity.getGameProfile().getName()).toList().toArray(String[]::new)), new PossibleArgument(ArgumentType.STRING, "hand", "offhand", "head", "chest", "legs", "feet"), new PossibleArgument(ArgumentType.STRING, "--onlyShow"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -38,7 +36,8 @@ public class ItemData extends Command {
|
|||
boolean onlyShow = args.length > 2 && args[2].equalsIgnoreCase("--onlyShow");
|
||||
PlayerEntity player = new PlayerFromNameArgumentParser(true).parse(args[0]);
|
||||
ItemStack item = getItem(player, args[1]);
|
||||
if (item == null) return;
|
||||
if (item == null)
|
||||
return;
|
||||
if (ShadowMain.client.interactionManager.hasCreativeInventory() && !onlyShow) {
|
||||
giveItem(item);
|
||||
message("Item copied.");
|
||||
|
@ -87,8 +86,7 @@ public class ItemData extends Command {
|
|||
if (slot < 9)
|
||||
slot += 36;
|
||||
|
||||
CreativeInventoryActionC2SPacket packet =
|
||||
new CreativeInventoryActionC2SPacket(slot, stack);
|
||||
CreativeInventoryActionC2SPacket packet = new CreativeInventoryActionC2SPacket(slot, stack);
|
||||
ShadowMain.client.player.networkHandler.sendPacket(packet);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,8 @@ public class ItemExploit extends Command {
|
|||
for (char c : pArg.toCharArray()) {
|
||||
if (c == '"') {
|
||||
inString = !inString;
|
||||
} else argStack.append(c);
|
||||
} else
|
||||
argStack.append(c);
|
||||
}
|
||||
argStack.append(" ");
|
||||
if (!inString) {
|
||||
|
@ -86,14 +87,16 @@ public class ItemExploit extends Command {
|
|||
argStack = new StringBuilder();
|
||||
}
|
||||
}
|
||||
if (!argStack.isEmpty()) argsWhitespaced.add(argStack.toString().trim());
|
||||
// System.out.println(argsWhitespaced);
|
||||
if (!argStack.isEmpty())
|
||||
argsWhitespaced.add(argStack.toString().trim());
|
||||
// System.out.println(argsWhitespaced);
|
||||
OptionParser opt = new OptionParser(true);
|
||||
opt.allowsUnrecognizedOptions();
|
||||
for (Option<?> option : meant.getOptions()) {
|
||||
if (option.getType() == Boolean.class) {
|
||||
opt.accepts(option.getName());
|
||||
} else opt.accepts(option.getName()).withRequiredArg().ofType(option.getType());
|
||||
} else
|
||||
opt.accepts(option.getName()).withRequiredArg().ofType(option.getType());
|
||||
}
|
||||
OptionSet os;
|
||||
try {
|
||||
|
@ -107,12 +110,14 @@ public class ItemExploit extends Command {
|
|||
try {
|
||||
if (option.getType() == Boolean.class) {
|
||||
val = os.has(option.getName());
|
||||
} else val = os.valueOf(option.getName());
|
||||
} else
|
||||
val = os.valueOf(option.getName());
|
||||
} catch (Exception e) {
|
||||
if (e.getCause() instanceof ReflectionException) {
|
||||
error("Type of option " + option.getName() + " is invalid, should be " + option.getType().getSimpleName());
|
||||
return;
|
||||
} else throw e;
|
||||
} else
|
||||
throw e;
|
||||
}
|
||||
if (val == null) {
|
||||
if (option.getStandardValueNullIfNothing() == null) {
|
||||
|
|
|
@ -23,8 +23,7 @@ public class ItemSpoof extends Command {
|
|||
|
||||
@Override
|
||||
public PossibleArgument getSuggestionsWithType(int index, String[] args) {
|
||||
return StaticArgumentServer.serveFromStatic(index, new PossibleArgument(ArgumentType.STRING, Registry.ITEM.stream().map(p -> Registry.ITEM.getId(p).toString()).toList().toArray(String[]::new)),
|
||||
new PossibleArgument(ArgumentType.NUMBER, "(amount)"));
|
||||
return StaticArgumentServer.serveFromStatic(index, new PossibleArgument(ArgumentType.STRING, Registry.ITEM.stream().map(p -> Registry.ITEM.getId(p).toString()).toList().toArray(String[]::new)), new PossibleArgument(ArgumentType.NUMBER, "(amount)"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -34,7 +33,8 @@ public class ItemSpoof extends Command {
|
|||
IntegerArgumentParser integerArgumentParser = new IntegerArgumentParser();
|
||||
int amount = integerArgumentParser.parse(args[1]);
|
||||
Identifier i = Identifier.tryParse(args[0]);
|
||||
if (i == null) throw new CommandException("Invalid name \"" + args[0] + "\"", "Provide valid item identifier");
|
||||
if (i == null)
|
||||
throw new CommandException("Invalid name \"" + args[0] + "\"", "Provide valid item identifier");
|
||||
Item item = Registry.ITEM.get(i);
|
||||
ItemStack stack = new ItemStack(item, amount);
|
||||
ShadowMain.client.player.getInventory().armor.set(3, stack);
|
||||
|
|
|
@ -10,11 +10,7 @@ import net.minecraft.network.NetworkState;
|
|||
import net.minecraft.network.listener.ClientLoginPacketListener;
|
||||
import net.minecraft.network.packet.c2s.handshake.HandshakeC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.login.LoginHelloC2SPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginCompressionS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginDisconnectS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginHelloS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginQueryRequestS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginSuccessS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.*;
|
||||
import net.minecraft.text.Text;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.command.Command;
|
||||
|
|
|
@ -40,12 +40,7 @@ public class LogFlood extends Command {
|
|||
ItemStack push = new ItemStack(Items.PLAYER_HEAD, 1);
|
||||
NbtCompound main = new NbtCompound();
|
||||
NbtCompound skullowner = new NbtCompound();
|
||||
NbtIntArray id = new NbtIntArray(new int[]{
|
||||
1044599774,
|
||||
-91344643,
|
||||
-1626455549,
|
||||
-827872364
|
||||
});
|
||||
NbtIntArray id = new NbtIntArray(new int[]{1044599774, -91344643, -1626455549, -827872364});
|
||||
skullowner.put("Id", id);
|
||||
skullowner.put("Name", NbtString.of("LFlood" + new Random().nextInt(50000)));
|
||||
NbtCompound b = new NbtCompound();
|
||||
|
|
|
@ -60,7 +60,8 @@ public class OnlineAPI extends Command {
|
|||
|
||||
@Override
|
||||
public PossibleArgument getSuggestionsWithType(int index, String[] args) {
|
||||
if (index == 0) return new PossibleArgument(ArgumentType.STRING, "login", "logout");
|
||||
if (index == 0)
|
||||
return new PossibleArgument(ArgumentType.STRING, "login", "logout");
|
||||
if (args[0].equalsIgnoreCase("login")) {
|
||||
return StaticArgumentServer.serveFromStatic(index - 1, new PossibleArgument(ArgumentType.STRING, "(username)"), new PossibleArgument(ArgumentType.STRING, "(password)"));
|
||||
}
|
||||
|
@ -85,7 +86,8 @@ public class OnlineAPI extends Command {
|
|||
}
|
||||
case "logout" -> {
|
||||
IRC irc = ModuleRegistry.getByClass(IRC.class);
|
||||
if (irc.isEnabled()) irc.setEnabled(false);
|
||||
if (irc.isEnabled())
|
||||
irc.setEnabled(false);
|
||||
ShadowAPIWrapper.logout();
|
||||
success("Logged you out");
|
||||
}
|
||||
|
|
|
@ -15,12 +15,7 @@ import net.minecraft.nbt.NbtCompound;
|
|||
import net.minecraft.nbt.NbtDouble;
|
||||
import net.minecraft.nbt.NbtList;
|
||||
import net.minecraft.nbt.NbtString;
|
||||
import net.minecraft.network.packet.c2s.play.ClientSettingsC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.RequestCommandCompletionsC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.*;
|
||||
import net.minecraft.util.Arm;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
|
@ -46,8 +41,7 @@ public class ServerCrash extends Command {
|
|||
|
||||
@Override
|
||||
public PossibleArgument getSuggestionsWithType(int index, String[] args) {
|
||||
return StaticArgumentServer.serveFromStatic(index, new PossibleArgument(ArgumentType.STRING, "rider", "book", "malformednbt", "move", "papertest", "chunkoob", "mvcrash", "stackoverflow", "playtime", "playtimeold", "maptool", "fawe", "lag", "pineapple"),
|
||||
new PossibleArgument(ArgumentType.NUMBER, "(power)"));
|
||||
return StaticArgumentServer.serveFromStatic(index, new PossibleArgument(ArgumentType.STRING, "rider", "book", "malformednbt", "move", "papertest", "chunkoob", "mvcrash", "stackoverflow", "playtime", "playtimeold", "maptool", "fawe", "lag", "pineapple"), new PossibleArgument(ArgumentType.NUMBER, "(power)"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -11,11 +11,7 @@ import net.minecraft.network.NetworkState;
|
|||
import net.minecraft.network.listener.ClientLoginPacketListener;
|
||||
import net.minecraft.network.packet.c2s.handshake.HandshakeC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.login.LoginHelloC2SPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginCompressionS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginDisconnectS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginHelloS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginQueryRequestS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginSuccessS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.*;
|
||||
import net.minecraft.text.Text;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.command.Command;
|
||||
|
|
|
@ -59,15 +59,7 @@ public class SpawnData extends Command {
|
|||
if (!stack.hasNbt())
|
||||
stack.setNbt(new NbtCompound());
|
||||
|
||||
NbtGroup ng = new NbtGroup(
|
||||
new NbtObject("EntityTag",
|
||||
new NbtList("Pos",
|
||||
new NbtProperty(parser.consumeDouble()),
|
||||
new NbtProperty(parser.consumeDouble()),
|
||||
new NbtProperty(parser.consumeDouble())
|
||||
)
|
||||
)
|
||||
);
|
||||
NbtGroup ng = new NbtGroup(new NbtObject("EntityTag", new NbtList("Pos", new NbtProperty(parser.consumeDouble()), new NbtProperty(parser.consumeDouble()), new NbtProperty(parser.consumeDouble()))));
|
||||
NbtCompound tag = ng.toCompound();
|
||||
stack.getOrCreateNbt().copyFrom(tag);
|
||||
ShadowMain.client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + ShadowMain.client.player.getInventory().selectedSlot, stack));
|
||||
|
@ -78,15 +70,7 @@ public class SpawnData extends Command {
|
|||
ItemStack stack = ShadowMain.client.player.getInventory().getMainHandStack();
|
||||
if (!stack.hasNbt())
|
||||
stack.setNbt(new NbtCompound());
|
||||
NbtGroup ng = new NbtGroup(
|
||||
new NbtObject("EntityTag",
|
||||
new NbtList("Motion",
|
||||
new NbtProperty(parser.consumeDouble()),
|
||||
new NbtProperty(parser.consumeDouble()),
|
||||
new NbtProperty(parser.consumeDouble())
|
||||
)
|
||||
)
|
||||
);
|
||||
NbtGroup ng = new NbtGroup(new NbtObject("EntityTag", new NbtList("Motion", new NbtProperty(parser.consumeDouble()), new NbtProperty(parser.consumeDouble()), new NbtProperty(parser.consumeDouble()))));
|
||||
NbtCompound tag = ng.toCompound();
|
||||
stack.getOrCreateNbt().copyFrom(tag);
|
||||
ShadowMain.client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + ShadowMain.client.player.getInventory().selectedSlot, stack));
|
||||
|
@ -97,15 +81,7 @@ public class SpawnData extends Command {
|
|||
if (!stack.hasNbt())
|
||||
stack.setNbt(new NbtCompound());
|
||||
Vec3d se = Objects.requireNonNull(ShadowMain.client.player).raycast(255, ShadowMain.client.getTickDelta(), true).getPos();
|
||||
NbtGroup ng = new NbtGroup(
|
||||
new NbtObject("EntityTag",
|
||||
new NbtList("Pos",
|
||||
new NbtProperty(se.x),
|
||||
new NbtProperty(se.y),
|
||||
new NbtProperty(se.z)
|
||||
)
|
||||
)
|
||||
);
|
||||
NbtGroup ng = new NbtGroup(new NbtObject("EntityTag", new NbtList("Pos", new NbtProperty(se.x), new NbtProperty(se.y), new NbtProperty(se.z))));
|
||||
NbtCompound tag = ng.toCompound();
|
||||
stack.getOrCreateNbt().copyFrom(tag);
|
||||
ShadowMain.client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + ShadowMain.client.player.getInventory().selectedSlot, stack));
|
||||
|
|
|
@ -108,7 +108,8 @@ public class Taco extends Command {
|
|||
File[] a = Objects.requireNonNull(gifPath.listFiles()).clone();
|
||||
List<String> framesSorted = Arrays.stream(a).map(File::getName).sorted().toList();
|
||||
for (String file : framesSorted) {
|
||||
if (!file.endsWith(".gif")) continue;
|
||||
if (!file.endsWith(".gif"))
|
||||
continue;
|
||||
File f = Arrays.stream(a).filter(file1 -> file1.getName().equals(file)).findFirst().orElseThrow();
|
||||
try {
|
||||
ImageReader reader = ImageIO.getImageReadersByFormatName("gif").next();
|
||||
|
|
|
@ -28,7 +28,6 @@ public class VClip extends Command {
|
|||
validateArgumentsLength(args, 1, "Provide height");
|
||||
|
||||
ClientPlayerEntity player = ShadowMain.client.player;
|
||||
player.updatePosition(player.getX(),
|
||||
player.getY() + new DoubleArgumentParser().parse(args[0]), player.getZ());
|
||||
player.updatePosition(player.getX(), player.getY() + new DoubleArgumentParser().parse(args[0]), player.getZ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,16 +5,7 @@
|
|||
package net.shadow.client.feature.command.impl;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NbtByte;
|
||||
import net.minecraft.nbt.NbtByteArray;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.nbt.NbtElement;
|
||||
import net.minecraft.nbt.NbtHelper;
|
||||
import net.minecraft.nbt.NbtInt;
|
||||
import net.minecraft.nbt.NbtIntArray;
|
||||
import net.minecraft.nbt.NbtList;
|
||||
import net.minecraft.nbt.NbtLong;
|
||||
import net.minecraft.nbt.NbtLongArray;
|
||||
import net.minecraft.nbt.*;
|
||||
import net.minecraft.text.Text;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.command.Command;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
package net.shadow.client.feature.config;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class ColorSetting extends SettingBase<Color> {
|
||||
|
|
|
@ -88,9 +88,10 @@ public abstract class SettingBase<V> {
|
|||
* @param value The new value
|
||||
*/
|
||||
public void setValue(V value) {
|
||||
// System.out.println("SET "+this.value+" -> "+value);
|
||||
// System.out.println("SET "+this.value+" -> "+value);
|
||||
this.value = value;
|
||||
if (this.onChanged != null) this.onChanged.accept(value);
|
||||
if (this.onChanged != null)
|
||||
this.onChanged.accept(value);
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
|
|
|
@ -27,19 +27,13 @@ import net.shadow.client.helper.render.Renderer;
|
|||
import net.shadow.client.helper.util.Transitions;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
|
||||
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 ConfigContainer configContainer = new ConfigContainer(new File(ShadowMain.BASE, "clickGui.sip"), "amongUs");
|
||||
|
@ -77,13 +71,15 @@ public class ClickGUI extends Screen implements FastTickable {
|
|||
}
|
||||
|
||||
public static void reInit() {
|
||||
if (instance != null) instance.initElements();
|
||||
if (instance != null)
|
||||
instance.initElements();
|
||||
}
|
||||
|
||||
void loadConfig() {
|
||||
configContainer.reload();
|
||||
ClickguiConfigContainer cc = configContainer.get(ClickguiConfigContainer.class);
|
||||
if (cc == null || cc.entries == null) return;
|
||||
if (cc == null || cc.entries == null)
|
||||
return;
|
||||
Map<String, CategoryDisplay> displays = new HashMap<>();
|
||||
for (Element element : elements) {
|
||||
if (element instanceof CategoryDisplay dd) {
|
||||
|
@ -100,7 +96,8 @@ public class ClickGUI extends Screen implements FastTickable {
|
|||
List<ModuleDisplay> mdList = disp.getMd();
|
||||
for (ClickguiConfigContainer.ModuleEntry moduleEntry : entry.entries) {
|
||||
ModuleDisplay mde = mdList.stream().filter(moduleDisplay -> moduleDisplay.getModule().getName().equals(moduleEntry.name)).findFirst().orElse(null);
|
||||
if (mde == null) continue;
|
||||
if (mde == null)
|
||||
continue;
|
||||
mde.setExtended(moduleEntry.expanded);
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +150,8 @@ public class ClickGUI extends Screen implements FastTickable {
|
|||
@Override
|
||||
public boolean mouseScrolled(double mouseX, double mouseY, double amount) {
|
||||
for (Element element : elements) {
|
||||
if (element.scroll(mouseX, mouseY, amount)) break;
|
||||
if (element.scroll(mouseX, mouseY, amount))
|
||||
break;
|
||||
}
|
||||
return super.mouseScrolled(mouseX, mouseY, amount);
|
||||
}
|
||||
|
@ -170,8 +168,7 @@ public class ClickGUI extends Screen implements FastTickable {
|
|||
double x = 5;
|
||||
double y = 5;
|
||||
double tallestInTheRoom = 0;
|
||||
for (ModuleType value : Arrays.stream(ModuleType.values())
|
||||
.sorted(Comparator.comparingLong(value -> -ModuleRegistry.getModules().stream().filter(module -> module.getModuleType() == value).count())).toList()) {
|
||||
for (ModuleType value : Arrays.stream(ModuleType.values()).sorted(Comparator.comparingLong(value -> -ModuleRegistry.getModules().stream().filter(module -> module.getModuleType() == value).count())).toList()) {
|
||||
CategoryDisplay cd = new CategoryDisplay(x, y, value);
|
||||
tallestInTheRoom = Math.max(tallestInTheRoom, cd.getHeight());
|
||||
x += cd.getWidth() + 5;
|
||||
|
|
|
@ -5,12 +5,7 @@
|
|||
package net.shadow.client.feature.gui.clickgui;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.minecraft.client.render.BufferBuilder;
|
||||
import net.minecraft.client.render.BufferRenderer;
|
||||
import net.minecraft.client.render.GameRenderer;
|
||||
import net.minecraft.client.render.Tessellator;
|
||||
import net.minecraft.client.render.VertexFormat;
|
||||
import net.minecraft.client.render.VertexFormats;
|
||||
import net.minecraft.client.render.*;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Matrix4f;
|
||||
|
@ -22,7 +17,7 @@ import net.shadow.client.helper.render.Renderer;
|
|||
import net.shadow.client.helper.util.Transitions;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -47,7 +42,7 @@ public class ParticleRenderer {
|
|||
Particle n = new Particle();
|
||||
n.x = ShadowMain.client.getWindow().getScaledWidth() * Math.random();
|
||||
n.y = ShadowMain.client.getWindow().getScaledHeight() * Math.random();
|
||||
// n.velY = (Math.random() - .5) / 4;
|
||||
// n.velY = (Math.random() - .5) / 4;
|
||||
n.velX = (Math.random() - .5) / 4;
|
||||
n.circleRad = Math.random() * 2;
|
||||
particles.add(n);
|
||||
|
@ -183,7 +178,7 @@ public class ParticleRenderer {
|
|||
long deltaOverall = Math.min(startDelta, endDelta);
|
||||
double pk = (deltaOverall / (double) fadeTime);
|
||||
|
||||
// ShadowMain.client.textRenderer.draw(stack,pk+"",(float)x,(float)y,0xFFFFFF);
|
||||
// ShadowMain.client.textRenderer.draw(stack,pk+"",(float)x,(float)y,0xFFFFFF);
|
||||
pk = Transitions.easeOutExpo(pk);
|
||||
Theme theme = ThemeManager.getMainTheme();
|
||||
stack.push();
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.shadow.client.helper.render.Rectangle;
|
|||
import net.shadow.client.helper.render.Renderer;
|
||||
import net.shadow.client.helper.render.Scroller;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -115,7 +115,8 @@ public class CategoryDisplay extends Element {
|
|||
return md.stream().filter(moduleDisplay -> {
|
||||
char[] charsToSearchFor = ClickGUI.instance().searchTerm.toLowerCase().toCharArray();
|
||||
for (char c : charsToSearchFor) {
|
||||
if (!moduleDisplay.module.getName().toLowerCase().contains(String.valueOf(c))) return false;
|
||||
if (!moduleDisplay.module.getName().toLowerCase().contains(String.valueOf(c)))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}).collect(Collectors.toList());
|
||||
|
@ -125,7 +126,7 @@ public class CategoryDisplay extends Element {
|
|||
public boolean scroll(double mouseX, double mouseY, double amount) {
|
||||
// not needed for now
|
||||
if (amount == 0 || inBounds(mouseX, mouseY)) {
|
||||
// scroll += amount * 10;
|
||||
// scroll += amount * 10;
|
||||
double contentHeight = getModules().stream().map(ModuleDisplay::getHeight).reduce(Double::sum).orElse(0d);
|
||||
double viewerHeight = Math.min(contentHeight, 350);
|
||||
double elScroll = contentHeight - viewerHeight;
|
||||
|
@ -147,9 +148,7 @@ public class CategoryDisplay extends Element {
|
|||
double mouseY1 = mouseY;
|
||||
scroll(mouseX1, mouseY1, 0);
|
||||
Theme theme = ThemeManager.getMainTheme();
|
||||
double openAnim = this.openAnim < 0.5
|
||||
? (1 - sqrt(1 - pow(2 * this.openAnim, 2))) / 2
|
||||
: (sqrt(1 - pow(-2 * this.openAnim + 2, 2)) + 1) / 2;
|
||||
double openAnim = this.openAnim < 0.5 ? (1 - sqrt(1 - pow(2 * this.openAnim, 2))) / 2 : (sqrt(1 - pow(-2 * this.openAnim + 2, 2)) + 1) / 2;
|
||||
// Renderer.R2D.fill(matrices, theme.getHeader(), x, y, x + width, y + headerHeight());
|
||||
double r = 5;
|
||||
double hheight = headerHeight();
|
||||
|
@ -196,7 +195,8 @@ public class CategoryDisplay extends Element {
|
|||
for (ModuleDisplay moduleDisplay : getModules()) {
|
||||
moduleDisplay.setX(this.x);
|
||||
moduleDisplay.setY(this.y + y);
|
||||
if (moduleDisplay.getY() + scroller.getScroll() > this.y + height) continue;
|
||||
if (moduleDisplay.getY() + scroller.getScroll() > this.y + height)
|
||||
continue;
|
||||
|
||||
moduleDisplay.render(matrices, mouseX1, mouseY1 - scroller.getScroll(), scrollBeingUsed);
|
||||
y += moduleDisplay.getHeight();
|
||||
|
@ -223,13 +223,14 @@ public class CategoryDisplay extends Element {
|
|||
public void tickAnim() {
|
||||
scroller.tick();
|
||||
double oaDelta = 0.02;
|
||||
if (!open) oaDelta *= -1;
|
||||
if (!open)
|
||||
oaDelta *= -1;
|
||||
openAnim += oaDelta;
|
||||
openAnim = MathHelper.clamp(openAnim, 0, 1);
|
||||
for (ModuleDisplay moduleDisplay : getModules()) {
|
||||
moduleDisplay.tickAnim();
|
||||
}
|
||||
// smoothScroll = Transitions.transition(smoothScroll, scroll, 7, 0);
|
||||
// smoothScroll = Transitions.transition(smoothScroll, scroll, 7, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,22 +5,10 @@
|
|||
package net.shadow.client.feature.gui.clickgui.element.impl;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.config.BooleanSetting;
|
||||
import net.shadow.client.feature.config.ColorSetting;
|
||||
import net.shadow.client.feature.config.DoubleSetting;
|
||||
import net.shadow.client.feature.config.EnumSetting;
|
||||
import net.shadow.client.feature.config.ModuleConfig;
|
||||
import net.shadow.client.feature.config.SettingBase;
|
||||
import net.shadow.client.feature.config.StringSetting;
|
||||
import net.shadow.client.feature.config.*;
|
||||
import net.shadow.client.feature.gui.clickgui.ClickGUI;
|
||||
import net.shadow.client.feature.gui.clickgui.element.Element;
|
||||
import net.shadow.client.feature.gui.clickgui.element.impl.config.BooleanSettingEditor;
|
||||
import net.shadow.client.feature.gui.clickgui.element.impl.config.ColorSettingEditor;
|
||||
import net.shadow.client.feature.gui.clickgui.element.impl.config.ConfigBase;
|
||||
import net.shadow.client.feature.gui.clickgui.element.impl.config.DoubleSettingEditor;
|
||||
import net.shadow.client.feature.gui.clickgui.element.impl.config.EnumSettingEditor;
|
||||
import net.shadow.client.feature.gui.clickgui.element.impl.config.KeybindEditor;
|
||||
import net.shadow.client.feature.gui.clickgui.element.impl.config.StringSettingEditor;
|
||||
import net.shadow.client.feature.gui.clickgui.element.impl.config.*;
|
||||
import net.shadow.client.feature.gui.clickgui.theme.Theme;
|
||||
import net.shadow.client.feature.gui.clickgui.theme.ThemeManager;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
|
@ -75,10 +63,12 @@ public class ConfigDisplay extends Element {
|
|||
boolean returnTrue = false;
|
||||
for (ConfigBase<?> basis : getBases()) { // notify every string setting to optionally deselect the thing
|
||||
if (basis instanceof StringSettingEditor && basis.getConfigValue().shouldShow()) {
|
||||
if (basis.clicked(x, y, button)) returnTrue = true;
|
||||
if (basis.clicked(x, y, button))
|
||||
returnTrue = true;
|
||||
}
|
||||
}
|
||||
if (returnTrue) return true;
|
||||
if (returnTrue)
|
||||
return true;
|
||||
for (ConfigBase<?> basis : getBases()) {
|
||||
if (!(basis instanceof StringSettingEditor) && basis.getConfigValue().shouldShow() && basis.clicked(x, y, button)) {
|
||||
return true;
|
||||
|
@ -166,7 +156,8 @@ public class ConfigDisplay extends Element {
|
|||
@Override
|
||||
public boolean scroll(double mouseX, double mouseY, double amount) {
|
||||
for (ConfigBase<?> basis : bases) {
|
||||
if (basis.scroll(mouseX, mouseY, amount)) return true;
|
||||
if (basis.scroll(mouseX, mouseY, amount))
|
||||
return true;
|
||||
}
|
||||
return super.scroll(mouseX, mouseY, amount);
|
||||
}
|
||||
|
|
|
@ -121,7 +121,8 @@ public class ModuleDisplay extends Element {
|
|||
@Override
|
||||
public boolean scroll(double mouseX, double mouseY, double amount) {
|
||||
if (extendAnim > 0) {
|
||||
if (cd.scroll(mouseX, mouseY, amount)) return true;
|
||||
if (cd.scroll(mouseX, mouseY, amount))
|
||||
return true;
|
||||
}
|
||||
return super.scroll(mouseX, mouseY, amount);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import net.shadow.client.helper.render.ClipStack;
|
|||
import net.shadow.client.helper.render.Rectangle;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
import static java.lang.Math.pow;
|
||||
|
||||
|
@ -84,7 +84,7 @@ public class ColorSettingEditor extends ConfigBase<ColorSetting> {
|
|||
|
||||
|
||||
});
|
||||
// this.height = red.getHeight()+green.getHeight()+blue.getHeight()+5;
|
||||
// this.height = red.getHeight()+green.getHeight()+blue.getHeight()+5;
|
||||
}
|
||||
|
||||
double childHeight() {
|
||||
|
@ -96,16 +96,15 @@ public class ColorSettingEditor extends ConfigBase<ColorSetting> {
|
|||
}
|
||||
|
||||
Element[] getChildren() {
|
||||
return new Element[]{
|
||||
red, green, blue, alpha
|
||||
};
|
||||
return new Element[]{red, green, blue, alpha};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean clicked(double x, double y, int button) {
|
||||
if (expanded) {
|
||||
for (Element child : getChildren()) {
|
||||
if (child.clicked(x, y, button)) return true;
|
||||
if (child.clicked(x, y, button))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (x >= this.x && x <= this.x + width && y >= this.y && y <= this.y + headerHeight()) {
|
||||
|
@ -123,7 +122,8 @@ public class ColorSettingEditor extends ConfigBase<ColorSetting> {
|
|||
@Override
|
||||
public boolean dragged(double x, double y, double deltaX, double deltaY, int button) {
|
||||
for (Element child : getChildren()) {
|
||||
if (child.dragged(x, y, deltaX, deltaY, button)) return true;
|
||||
if (child.dragged(x, y, deltaX, deltaY, button))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ public class ColorSettingEditor extends ConfigBase<ColorSetting> {
|
|||
yOff += child.getHeight();
|
||||
}
|
||||
ClipStack.globalInstance.popWindow();
|
||||
// yOff += 1;
|
||||
// yOff += 1;
|
||||
}
|
||||
|
||||
Renderer.R2D.renderRoundedQuad(matrices, configValue.getValue(), x + 2, y + headerHeight() + childHeight() * expandProg, x + width - 3, y + headerHeight() + childHeight() * expandProg + 2, 1, 10);
|
||||
|
@ -166,7 +166,8 @@ public class ColorSettingEditor extends ConfigBase<ColorSetting> {
|
|||
@Override
|
||||
public void tickAnim() {
|
||||
double delta = 0.02;
|
||||
if (!expanded) delta *= -1;
|
||||
if (!expanded)
|
||||
delta *= -1;
|
||||
expandProg += delta;
|
||||
expandProg = MathHelper.clamp(expandProg, 0, 1);
|
||||
for (Element child : getChildren()) {
|
||||
|
|
|
@ -11,7 +11,7 @@ import net.shadow.client.feature.gui.clickgui.theme.ThemeManager;
|
|||
import net.shadow.client.helper.font.FontRenderers;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.shadow.client.helper.font.FontRenderers;
|
|||
import net.shadow.client.helper.render.Renderer;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public class KeybindEditor extends ConfigBase<DoubleSetting> {
|
||||
|
@ -51,13 +51,14 @@ public class KeybindEditor extends ConfigBase<DoubleSetting> {
|
|||
public boolean keyPressed(int keycode, int modifiers) {
|
||||
int keycode1 = keycode;
|
||||
if (selecting) {
|
||||
// lastUpdate = System.currentTimeMillis();
|
||||
// lastUpdate = System.currentTimeMillis();
|
||||
cancelNextCharTyped = true;
|
||||
if (keycode1 == GLFW.GLFW_KEY_ESCAPE) {
|
||||
selecting = false;
|
||||
return true;
|
||||
}
|
||||
if (keycode1 == GLFW.GLFW_KEY_BACKSPACE) keycode1 = -1;
|
||||
if (keycode1 == GLFW.GLFW_KEY_BACKSPACE)
|
||||
keycode1 = -1;
|
||||
configValue.setValue(keycode1 + 0d);
|
||||
selecting = false;
|
||||
return true;
|
||||
|
@ -89,7 +90,8 @@ public class KeybindEditor extends ConfigBase<DoubleSetting> {
|
|||
} catch (Exception ignored) {
|
||||
keyName = "unknown." + keybind;
|
||||
}
|
||||
} else keyName = keyName.toUpperCase();
|
||||
} else
|
||||
keyName = keyName.toUpperCase();
|
||||
}
|
||||
Renderer.R2D.renderRoundedQuad(matrices, new Color(40, 40, 40), x, y, x + width, y + h, 5, 20);
|
||||
FontRenderers.getRenderer().drawCenteredString(matrices, keyName, x + width / 2d, y + h / 2d - FontRenderers.getRenderer().getMarginHeight() / 2d, 1f, 1f, 1f, 1f);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
package net.shadow.client.feature.gui.clickgui.theme;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
public interface Theme {
|
||||
String getName();
|
||||
|
|
|
@ -6,7 +6,7 @@ package net.shadow.client.feature.gui.clickgui.theme.impl;
|
|||
|
||||
import net.shadow.client.feature.gui.clickgui.theme.Theme;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
public class Coffee implements Theme {
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ package net.shadow.client.feature.gui.clickgui.theme.impl;
|
|||
import net.shadow.client.feature.gui.clickgui.theme.Theme;
|
||||
import net.shadow.client.feature.module.ModuleRegistry;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
public class Custom implements Theme {
|
||||
final net.shadow.client.feature.module.impl.render.Theme theme = ModuleRegistry.getByClass(net.shadow.client.feature.module.impl.render.Theme.class);
|
||||
|
|
|
@ -6,7 +6,7 @@ package net.shadow.client.feature.gui.clickgui.theme.impl;
|
|||
|
||||
import net.shadow.client.feature.gui.clickgui.theme.Theme;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
public class Shadow implements Theme {
|
||||
static final Color accent = new Color(214, 255, 255);
|
||||
|
|
|
@ -9,12 +9,7 @@ import com.google.gson.JsonElement;
|
|||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.gui.hud.element.HudElement;
|
||||
import net.shadow.client.feature.gui.hud.element.RadarElement;
|
||||
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.hud.element.*;
|
||||
import net.shadow.client.feature.gui.screen.HudEditorScreen;
|
||||
import net.shadow.client.helper.event.EventType;
|
||||
import net.shadow.client.helper.event.Events;
|
||||
|
|
|
@ -21,11 +21,11 @@ import net.shadow.client.helper.render.ClipStack;
|
|||
import net.shadow.client.helper.render.Rectangle;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
public class RadarElement extends HudElement{
|
||||
public class RadarElement extends HudElement {
|
||||
public RadarElement() {
|
||||
super("Radar", 5, 100 + ModuleType.values().length * FontRenderers.getRenderer().getMarginHeight() + 4 + 5,100,100);
|
||||
super("Radar", 5, 100 + ModuleType.values().length * FontRenderers.getRenderer().getMarginHeight() + 4 + 5, 100, 100);
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,30 +33,28 @@ public class RadarElement extends HudElement{
|
|||
public void renderIntern(MatrixStack stack) {
|
||||
Radar radar = ModuleRegistry.getByClass(Radar.class);
|
||||
if (radar.isEnabled()) {
|
||||
Renderer.R2D.renderRoundedQuadWithShadow(stack, new Color(10,10,20,200),0,0,width,height,5,20);
|
||||
double maxDistToRender = radar.iScale*16;
|
||||
Renderer.R2D.renderRoundedQuadWithShadow(stack, new Color(10, 10, 20, 200), 0, 0, width, height, 5, 20);
|
||||
double maxDistToRender = radar.iScale * 16;
|
||||
Vec3d ppos = ShadowMain.client.player.getPos();
|
||||
double originX = ppos.x;
|
||||
double originZ = ppos.z;
|
||||
ClipStack.globalInstance.addWindow(stack, new Rectangle(0, 0, width, height));
|
||||
stack.push();
|
||||
stack.translate(width/2d,height/2d,0);
|
||||
stack.multiply(new Quaternion(0,0,-ShadowMain.client.player.getYaw()-180,true));
|
||||
stack.translate(width / 2d, height / 2d, 0);
|
||||
stack.multiply(new Quaternion(0, 0, -ShadowMain.client.player.getYaw() - 180, true));
|
||||
for (Entity entity : ShadowMain.client.world.getEntities()) {
|
||||
Vec3d epos = entity.getPos();
|
||||
double entityX = epos.x;
|
||||
double entityZ = epos.z;
|
||||
double deltaX = entityX-originX;
|
||||
double deltaZ = entityZ-originZ;
|
||||
double deltaX = entityX - originX;
|
||||
double deltaZ = entityZ - originZ;
|
||||
deltaX = deltaX / maxDistToRender;
|
||||
deltaZ = deltaZ / maxDistToRender;
|
||||
// deltaX += 0.5;
|
||||
// deltaZ += 0.5;
|
||||
// if (deltaX <= -.5 || deltaX >= .5 || deltaZ <= -.5 || deltaZ >= .5) continue; // out of bounds
|
||||
deltaX *= width;
|
||||
deltaZ *= width;
|
||||
Color c;
|
||||
if (entity.equals(ShadowMain.client.player)) c = Color.WHITE;
|
||||
if (entity.equals(ShadowMain.client.player))
|
||||
c = Color.WHITE;
|
||||
else if (entity instanceof PlayerEntity) {
|
||||
c = Color.RED;
|
||||
} else if (entity instanceof ItemEntity) {
|
||||
|
@ -72,8 +70,8 @@ public class RadarElement extends HudElement{
|
|||
} else {
|
||||
c = Color.GREEN;
|
||||
}
|
||||
Renderer.R2D.renderCircle(stack,c,deltaX,deltaZ,1,10);
|
||||
// Renderer.R2D.renderQuad(stack,Color.WHITE,deltaX,deltaZ,deltaX+1,deltaZ+1);
|
||||
Renderer.R2D.renderCircle(stack, c, deltaX, deltaZ, 1, 10);
|
||||
// Renderer.R2D.renderQuad(stack,Color.WHITE,deltaX,deltaZ,deltaX+1,deltaZ+1);
|
||||
}
|
||||
stack.pop();
|
||||
ClipStack.globalInstance.popWindow();
|
||||
|
|
|
@ -23,7 +23,8 @@ public class TabGui extends HudElement {
|
|||
}
|
||||
|
||||
net.shadow.client.feature.module.impl.render.TabGui getTgui() {
|
||||
if (tgui == null) tgui = ModuleRegistry.getByClass(net.shadow.client.feature.module.impl.render.TabGui.class);
|
||||
if (tgui == null)
|
||||
tgui = ModuleRegistry.getByClass(net.shadow.client.feature.module.impl.render.TabGui.class);
|
||||
return tgui;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,7 @@ import net.shadow.client.feature.module.impl.render.TargetHud;
|
|||
public class TargetHUD extends HudElement {
|
||||
|
||||
public TargetHUD() {
|
||||
super("Target HUD", ShadowMain.client.getWindow().getScaledWidth() / 2f + 10, ShadowMain.client.getWindow()
|
||||
.getScaledHeight() / 2f + 10, TargetHud.modalWidth, TargetHud.modalHeight);
|
||||
super("Target HUD", ShadowMain.client.getWindow().getScaledWidth() / 2f + 10, ShadowMain.client.getWindow().getScaledHeight() / 2f + 10, TargetHud.modalWidth, TargetHud.modalHeight);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.shadow.client.helper.GameTexture;
|
|||
import net.shadow.client.helper.Texture;
|
||||
import net.shadow.client.helper.font.FontRenderers;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -80,8 +80,10 @@ public class Notification {
|
|||
}
|
||||
|
||||
public enum Type {
|
||||
SUCCESS(GameTexture.NOTIF_SUCCESS.getWhere(), new Color(58, 223, 118)), INFO(GameTexture.NOTIF_INFO.getWhere(), new Color(39, 186, 253)),
|
||||
WARNING(GameTexture.NOTIF_WARNING.getWhere(), new Color(255, 189, 17)), ERROR(GameTexture.NOTIF_ERROR.getWhere(), new Color(254, 92, 92));
|
||||
SUCCESS(GameTexture.NOTIF_SUCCESS.getWhere(), new Color(58, 223, 118)),
|
||||
INFO(GameTexture.NOTIF_INFO.getWhere(), new Color(39, 186, 253)),
|
||||
WARNING(GameTexture.NOTIF_WARNING.getWhere(), new Color(255, 189, 17)),
|
||||
ERROR(GameTexture.NOTIF_ERROR.getWhere(), new Color(254, 92, 92));
|
||||
final Color c;
|
||||
final Texture i;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import net.shadow.client.helper.render.Rectangle;
|
|||
import net.shadow.client.helper.render.Renderer;
|
||||
import net.shadow.client.helper.util.Transitions;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
|
|
|
@ -18,7 +18,7 @@ import net.shadow.client.helper.render.ClipStack;
|
|||
import net.shadow.client.helper.render.Rectangle;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public class HudNotification {
|
||||
|
@ -52,9 +52,7 @@ public class HudNotification {
|
|||
double c1 = 1.70158;
|
||||
double c2 = c1 * 1.525;
|
||||
|
||||
return x < 0.5
|
||||
? (Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2)) / 2
|
||||
: (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2;
|
||||
return x < 0.5 ? (Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2)) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2;
|
||||
|
||||
}
|
||||
|
||||
|
@ -92,8 +90,10 @@ public class HudNotification {
|
|||
}
|
||||
|
||||
public enum Type {
|
||||
SUCCESS(GameTexture.NOTIF_SUCCESS.getWhere(), new Color(58, 223, 118)), INFO(GameTexture.NOTIF_INFO.getWhere(), new Color(39, 186, 253)),
|
||||
WARNING(GameTexture.NOTIF_WARNING.getWhere(), new Color(255, 189, 17)), ERROR(GameTexture.NOTIF_ERROR.getWhere(), new Color(254, 92, 92));
|
||||
SUCCESS(GameTexture.NOTIF_SUCCESS.getWhere(), new Color(58, 223, 118)),
|
||||
INFO(GameTexture.NOTIF_INFO.getWhere(), new Color(39, 186, 253)),
|
||||
WARNING(GameTexture.NOTIF_WARNING.getWhere(), new Color(255, 189, 17)),
|
||||
ERROR(GameTexture.NOTIF_ERROR.getWhere(), new Color(254, 92, 92));
|
||||
final Color c;
|
||||
final Texture i;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.shadow.client.feature.gui.clickgui.element.Element;
|
|||
import net.shadow.client.helper.font.FontRenderers;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
public class PanelButton extends Element {
|
||||
static final double h = FontRenderers.getRenderer().getFontHeight() + 2;
|
||||
|
|
|
@ -11,7 +11,7 @@ import net.shadow.client.helper.render.Rectangle;
|
|||
import net.shadow.client.helper.render.Renderer;
|
||||
import net.shadow.client.helper.util.Transitions;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class PanelFrame extends Element implements FastTickable {
|
||||
|
@ -108,7 +108,7 @@ public class PanelFrame extends Element implements FastTickable {
|
|||
Renderer.R2D.renderRoundedQuad(matrices, ThemeManager.getMainTheme().getConfig(), x + width - 15, y + (real * height) - 15, x + width, y + (real * height), 5, 10);
|
||||
}
|
||||
ClipStack.globalInstance.addWindow(matrices, new Rectangle(x, y, x + width, y + (real * height)));
|
||||
// Renderer.R2D.beginScissor(x, y, x + width, y + (real * width));
|
||||
// Renderer.R2D.beginScissor(x, y, x + width, y + (real * width));
|
||||
for (Element pb : elements) {
|
||||
// why?
|
||||
pb.setX(this.x + positions.get(pb)[0] + 5);
|
||||
|
@ -125,7 +125,7 @@ public class PanelFrame extends Element implements FastTickable {
|
|||
for (Element pb : elements) {
|
||||
pb.render(matrices, mouseX, mouseY, scrollBeingUsed);
|
||||
}
|
||||
// Renderer.R2D.endScissor();
|
||||
// Renderer.R2D.endScissor();
|
||||
ClipStack.globalInstance.popWindow();
|
||||
Renderer.R2D.renderRoundedQuad(matrices, ThemeManager.getMainTheme().getHeader(), x, y, x + width, y + 15, 5, 10);
|
||||
FontRenderers.getRenderer().drawString(matrices, title, x + (width / 2) - FontRenderers.getRenderer().getStringWidth(title) / 2, y + 3, new Color(255, 255, 255, 255).getRGB());
|
||||
|
@ -154,7 +154,8 @@ public class PanelFrame extends Element implements FastTickable {
|
|||
@Override
|
||||
public boolean charTyped(char c, int mods) {
|
||||
for (Element pb : elements) {
|
||||
if (pb.charTyped(c, mods)) return true;
|
||||
if (pb.charTyped(c, mods))
|
||||
return true;
|
||||
}
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.shadow.client.helper.render.Renderer;
|
|||
import net.shadow.client.helper.render.Scroller;
|
||||
import org.lwjgl.opengl.GL40C;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -122,8 +122,10 @@ public class AddonManagerScreen extends ClientScreen implements FastTickable {
|
|||
this.addon = addon;
|
||||
this.width = width;
|
||||
disable = new RoundButton(RoundButton.STANDARD, 0, 0, 60, 20, addon.isEnabled() ? "Disable" : "Enable", () -> {
|
||||
if (addon.isEnabled()) AddonManager.INSTANCE.disableAddon(addon);
|
||||
else AddonManager.INSTANCE.enableAddon(addon);
|
||||
if (addon.isEnabled())
|
||||
AddonManager.INSTANCE.disableAddon(addon);
|
||||
else
|
||||
AddonManager.INSTANCE.enableAddon(addon);
|
||||
disable.setText(addon.isEnabled() ? "Disable" : "Enable");
|
||||
ClickGUI.reInit();
|
||||
});
|
||||
|
@ -150,9 +152,11 @@ public class AddonManagerScreen extends ClientScreen implements FastTickable {
|
|||
|
||||
RenderSystem.blendFunc(GL40C.GL_DST_ALPHA, GL40C.GL_ONE_MINUS_DST_ALPHA);
|
||||
Identifier icon = addon.getIcon();
|
||||
if (icon == null) icon = GameTexture.ICONS_ADDON_PROVIDED.getWhere();
|
||||
if (icon == null)
|
||||
icon = GameTexture.ICONS_ADDON_PROVIDED.getWhere();
|
||||
RenderSystem.setShaderTexture(0, icon);
|
||||
if (!addon.isEnabled()) RenderSystem.setShaderColor(0.6f, 0.6f, 0.6f, 1f);
|
||||
if (!addon.isEnabled())
|
||||
RenderSystem.setShaderColor(0.6f, 0.6f, 0.6f, 1f);
|
||||
Renderer.R2D.renderTexture(stack, x + padding, y + padding, iconDimensions, iconDimensions, 0, 0, iconDimensions, iconDimensions, iconDimensions, iconDimensions);
|
||||
RenderSystem.defaultBlendFunc();
|
||||
RenderSystem.setShaderColor(1f, 1f, 1f, 1f);
|
||||
|
|
|
@ -27,11 +27,8 @@ import net.shadow.client.feature.gui.widget.RoundTextFieldWidget;
|
|||
import net.shadow.client.helper.Texture;
|
||||
import net.shadow.client.helper.font.FontRenderers;
|
||||
import net.shadow.client.helper.font.adapter.FontAdapter;
|
||||
import net.shadow.client.helper.render.ClipStack;
|
||||
import net.shadow.client.helper.render.MSAAFramebuffer;
|
||||
import net.shadow.client.helper.render.PlayerHeadResolver;
|
||||
import net.shadow.client.helper.render.Rectangle;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
import net.shadow.client.helper.render.*;
|
||||
import net.shadow.client.helper.util.Transitions;
|
||||
import net.shadow.client.mixin.IMinecraftClientAccessor;
|
||||
import net.shadow.client.mixin.SessionAccessor;
|
||||
|
@ -39,18 +36,12 @@ import org.apache.commons.io.FileUtils;
|
|||
import org.apache.logging.log4j.Level;
|
||||
import org.lwjgl.opengl.GL40C;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.io.File;
|
||||
import java.net.http.HttpClient;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
@ -97,9 +88,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
|||
}
|
||||
|
||||
public List<AltContainer> getAlts() {
|
||||
return alts.stream()
|
||||
.filter(altContainer -> altContainer.storage.cachedName.toLowerCase().startsWith(search.get().toLowerCase()) || Arrays.stream(altContainer.storage.tags.split(",")).map(String::trim)
|
||||
.filter(s -> !s.isEmpty()).anyMatch(s -> s.toLowerCase().startsWith(search.get().toLowerCase()))).collect(Collectors.toList());
|
||||
return alts.stream().filter(altContainer -> altContainer.storage.cachedName.toLowerCase().startsWith(search.get().toLowerCase()) || Arrays.stream(altContainer.storage.tags.split(",")).map(String::trim).filter(s -> !s.isEmpty()).anyMatch(s -> s.toLowerCase().startsWith(search.get().toLowerCase()))).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
void saveAlts() {
|
||||
|
@ -149,8 +138,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
|||
for (JsonElement jsonElement : ja) {
|
||||
JsonObject jo = jsonElement.getAsJsonObject();
|
||||
try {
|
||||
AltStorage container = new AltStorage(jo.get("cachedUsername").getAsString(), jo.get("email").getAsString(), jo.get("password").getAsString(), UUID.fromString(jo.get("cachedUUID")
|
||||
.getAsString()), AddScreenOverlay.AccountType.valueOf(jo.get("type").getAsString()), jo.get("tags") == null ? "" : jo.get("tags").getAsString());
|
||||
AltStorage container = new AltStorage(jo.get("cachedUsername").getAsString(), jo.get("email").getAsString(), jo.get("password").getAsString(), UUID.fromString(jo.get("cachedUUID").getAsString()), AddScreenOverlay.AccountType.valueOf(jo.get("type").getAsString()), jo.get("tags") == null ? "" : jo.get("tags").getAsString());
|
||||
container.valid = !jo.has("valid") || jo.get("valid").getAsBoolean();
|
||||
AltContainer ac = new AltContainer(0, 0, 0, container);
|
||||
ac.renderY = ac.renderX = -1;
|
||||
|
@ -352,10 +340,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
|||
} else {
|
||||
mail = "No email bound";
|
||||
}
|
||||
AltContainer.PropEntry[] props = new AltContainer.PropEntry[]{
|
||||
new AltContainer.PropEntry(this.selectedAlt.storage.type == AddScreenOverlay.AccountType.CRACKED ? this.selectedAlt.storage.email : this.selectedAlt.storage.cachedName, FontRenderers.getCustomSize(22), this.selectedAlt.storage.valid ? 0xFFFFFF : 0xFF3333),
|
||||
new AltContainer.PropEntry(mail, FontRenderers.getRenderer(), 0xAAAAAA),
|
||||
new AltContainer.PropEntry("Type: " + this.selectedAlt.storage.type.s, FontRenderers.getRenderer(), 0xAAAAAA)};
|
||||
AltContainer.PropEntry[] props = new AltContainer.PropEntry[]{new AltContainer.PropEntry(this.selectedAlt.storage.type == AddScreenOverlay.AccountType.CRACKED ? this.selectedAlt.storage.email : this.selectedAlt.storage.cachedName, FontRenderers.getCustomSize(22), this.selectedAlt.storage.valid ? 0xFFFFFF : 0xFF3333), new AltContainer.PropEntry(mail, FontRenderers.getRenderer(), 0xAAAAAA), new AltContainer.PropEntry("Type: " + this.selectedAlt.storage.type.s, FontRenderers.getRenderer(), 0xAAAAAA)};
|
||||
|
||||
float propsOffset = (float) (fromY + padding);
|
||||
for (AltContainer.PropEntry prop : props) {
|
||||
|
@ -393,8 +378,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
|||
uuid = FontRenderers.getRenderer().trimStringToWidth(uuid, maxWid - 1 - threeDotWidth);
|
||||
uuid += "...";
|
||||
}
|
||||
AltContainer.PropEntry[] props = new AltContainer.PropEntry[]{new AltContainer.PropEntry(ShadowMain.client.getSession().getUsername(), FontRenderers.getCustomSize(22), 0xFFFFFF),
|
||||
new AltContainer.PropEntry(uuid, FontRenderers.getRenderer(), 0xAAAAAA)};
|
||||
AltContainer.PropEntry[] props = new AltContainer.PropEntry[]{new AltContainer.PropEntry(ShadowMain.client.getSession().getUsername(), FontRenderers.getCustomSize(22), 0xFFFFFF), new AltContainer.PropEntry(uuid, FontRenderers.getRenderer(), 0xAAAAAA)};
|
||||
float propsOffset = (float) (fromY + padding);
|
||||
for (AltContainer.PropEntry prop : props) {
|
||||
prop.cfr.drawString(stack, prop.name, (float) (fromX + padding + texDim + padding), propsOffset, prop.color, false);
|
||||
|
@ -412,7 +396,8 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
|||
return false;
|
||||
}
|
||||
boolean a = super.mouseClicked(mouseX, mouseY, button);
|
||||
if (a) return true;
|
||||
if (a)
|
||||
return true;
|
||||
if (mouseX >= rBounds.getX() && mouseX <= rBounds.getX1() && mouseY >= rBounds.getY() && mouseY <= rBounds.getY1()) {
|
||||
for (AltContainer alt : getAlts()) {
|
||||
alt.clicked(mouseX, mouseY + scrollSmooth);
|
||||
|
@ -421,73 +406,73 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
|||
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 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 {
|
||||
final String email;
|
||||
|
@ -832,8 +817,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
|||
add.setY(originY + padding + title.getMarginHeight() + FontRenderers.getRenderer().getMarginHeight() + padding + email.getHeight() + padding + passwd.getHeight() + padding);
|
||||
add.setEnabled(isAddApplicable());
|
||||
add.render(stack, mouseX, mouseY, delta);
|
||||
widgetHei = padding + title.getMarginHeight() + FontRenderers.getRenderer()
|
||||
.getMarginHeight() + padding + email.getHeight() + padding + passwd.getHeight() + padding + type.getHeight() + padding;
|
||||
widgetHei = padding + title.getMarginHeight() + FontRenderers.getRenderer().getMarginHeight() + padding + email.getHeight() + padding + passwd.getHeight() + padding + type.getHeight() + padding;
|
||||
stack.pop();
|
||||
}
|
||||
|
||||
|
@ -969,8 +953,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
|||
RenderSystem.clear(GL40C.GL_COLOR_BUFFER_BIT, false);
|
||||
RenderSystem.colorMask(true, true, true, true);
|
||||
RenderSystem.setShader(GameRenderer::getPositionColorShader);
|
||||
Renderer.R2D.renderRoundedQuadInternal(stack.peek()
|
||||
.getPositionMatrix(), 0, 0, 0, 1, originX + padding, originY + padding, originX + padding + texWidth, originY + padding + texHeight, 5, 20);
|
||||
Renderer.R2D.renderRoundedQuadInternal(stack.peek().getPositionMatrix(), 0, 0, 0, 1, originX + padding, originY + padding, originX + padding + texWidth, originY + padding + texHeight, 5, 20);
|
||||
|
||||
RenderSystem.blendFunc(GL40C.GL_DST_ALPHA, GL40C.GL_ONE_MINUS_DST_ALPHA);
|
||||
RenderSystem.setShaderTexture(0, tex);
|
||||
|
@ -988,9 +971,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
|||
} else {
|
||||
mail = "No email bound";
|
||||
}
|
||||
PropEntry[] props = new PropEntry[]{
|
||||
new PropEntry(this.storage.type == AddScreenOverlay.AccountType.CRACKED ? this.storage.email : this.storage.cachedName, FontRenderers.getCustomSize(22), storage.valid ? 0xFFFFFF : 0xFF3333),
|
||||
new PropEntry("Email: " + mail, FontRenderers.getRenderer(), 0xAAAAAA)/*, new PropEntry("Type: " + this.storage.type.s, FontRenderers.getRenderer(), 0xAAAAAA)*/};
|
||||
PropEntry[] props = new PropEntry[]{new PropEntry(this.storage.type == AddScreenOverlay.AccountType.CRACKED ? this.storage.email : this.storage.cachedName, FontRenderers.getCustomSize(22), storage.valid ? 0xFFFFFF : 0xFF3333), new PropEntry("Email: " + mail, FontRenderers.getRenderer(), 0xAAAAAA)/*, new PropEntry("Type: " + this.storage.type.s, FontRenderers.getRenderer(), 0xAAAAAA)*/};
|
||||
float propsOffset = (float) (getHeight() - (texHeight)) / 2f;
|
||||
for (PropEntry prop : props) {
|
||||
prop.cfr.drawString(stack, prop.name, (float) (originX + padding + texWidth + padding), (float) (originY + propsOffset), prop.color, false);
|
||||
|
@ -1011,8 +992,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
|||
float pad = 2;
|
||||
w += pad * 2;
|
||||
Renderer.R2D.renderRoundedQuad(stack, net.shadow.client.feature.gui.widget.RoundButton.STANDARD, originX + padding + texWidth + padding + xOff, originY + getHeight() - h - pad * 2 - padding, originX + padding + texWidth + padding + xOff + w, originY + getHeight() - padding, 5, 10);
|
||||
FontRenderers.getRenderer()
|
||||
.drawString(stack, v, originX + padding + texWidth + padding + xOff + pad, originY + getHeight() - pad - FontRenderers.getRenderer().getMarginHeight() - padding, 0xFFFFFF);
|
||||
FontRenderers.getRenderer().drawString(stack, v, originX + padding + texWidth + padding + xOff + pad, originY + getHeight() - pad - FontRenderers.getRenderer().getMarginHeight() - padding, 0xFFFFFF);
|
||||
xOff += w + 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import net.shadow.client.helper.render.Renderer;
|
|||
import net.shadow.client.helper.util.Transitions;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
|
|
@ -27,17 +27,13 @@ import net.shadow.client.helper.render.Renderer;
|
|||
import org.apache.commons.io.IOUtils;
|
||||
import org.lwjgl.opengl.GL40C;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.io.File;
|
||||
import java.net.http.HttpClient;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Duration;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
public class HomeScreen extends ClientScreen {
|
||||
static final double padding = 6;
|
||||
|
@ -64,7 +60,7 @@ public class HomeScreen extends ClientScreen {
|
|||
if (instance == null) {
|
||||
instance = new HomeScreen();
|
||||
}
|
||||
// instance = new HomeScreen();
|
||||
// instance = new HomeScreen();
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
@ -75,7 +71,7 @@ public class HomeScreen extends ClientScreen {
|
|||
isDev = execF.isDirectory();
|
||||
HomeScreen.version = IOUtils.toString(Objects.requireNonNull(HomeScreen.class.getClassLoader().getResourceAsStream("version.txt")), StandardCharsets.UTF_8);
|
||||
HomeScreen.changelog = IOUtils.toString(Objects.requireNonNull(HomeScreen.class.getClassLoader().getResourceAsStream("changelogLatest.txt")), StandardCharsets.UTF_8);
|
||||
// System.out.println("updating acc");
|
||||
// System.out.println("updating acc");
|
||||
updateCurrentAccount(() -> {
|
||||
|
||||
});
|
||||
|
@ -101,11 +97,11 @@ public class HomeScreen extends ClientScreen {
|
|||
buttonsMap.add(new AbstractMap.SimpleEntry<>("Realms", () -> ShadowMain.client.setScreen(new RealmsMainScreen(this))));
|
||||
buttonsMap.add(new AbstractMap.SimpleEntry<>("Alts", () -> {
|
||||
ShadowMain.client.setScreen(AltManagerScreen.instance());
|
||||
// Notification.create(RandomStringUtils.randomPrint(20), RandomUtils.nextLong(4000, 7000), Notification.Type.INFO);
|
||||
// Notification.create(RandomStringUtils.randomPrint(20), RandomUtils.nextLong(4000, 7000), Notification.Type.INFO);
|
||||
}));
|
||||
buttonsMap.add(new AbstractMap.SimpleEntry<>("Settings", () -> ShadowMain.client.setScreen(new OptionsScreen(this, ShadowMain.client.options))));
|
||||
buttonsMap.add(new AbstractMap.SimpleEntry<>("Quit", ShadowMain.client::scheduleStop));
|
||||
// buttonsMap.add(new AbstractMap.SimpleEntry<>("reinit", this::init));
|
||||
// buttonsMap.add(new AbstractMap.SimpleEntry<>("reinit", this::init));
|
||||
double rowWidth = 150;
|
||||
double rowHeight = 30;
|
||||
double padding = 5;
|
||||
|
@ -135,7 +131,8 @@ public class HomeScreen extends ClientScreen {
|
|||
if (loaded) {
|
||||
updateCurrentAccount(() -> {
|
||||
}); // already loaded this instance, refresh on the fly
|
||||
} else load();
|
||||
} else
|
||||
load();
|
||||
}
|
||||
|
||||
void complete() {
|
||||
|
|
|
@ -20,7 +20,7 @@ import net.shadow.client.helper.util.Utils;
|
|||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
|
@ -86,7 +86,7 @@ public class LoadingScreen extends ClientScreen implements FastTickable {
|
|||
opacity -= 0.01;
|
||||
opacity = MathHelper.clamp(opacity, 0.001, 1);
|
||||
}
|
||||
// HomeScreen.instance().onFastTick();
|
||||
// HomeScreen.instance().onFastTick();
|
||||
}
|
||||
|
||||
void load() {
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.shadow.client.helper.util.Transitions;
|
|||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
|
@ -252,8 +252,10 @@ public class NbtEditorScreen extends ClientScreen implements FastTickable {
|
|||
int whitespacesStart = 0;
|
||||
String index = initial.get(editorY);
|
||||
for (char c : Arrays.copyOfRange(index.toCharArray(), 0, editorX)) {
|
||||
if (c == ' ') whitespacesStart++;
|
||||
else break;
|
||||
if (c == ' ')
|
||||
whitespacesStart++;
|
||||
else
|
||||
break;
|
||||
}
|
||||
whitespacesStart %= 2;
|
||||
int missing = 2 - whitespacesStart;
|
||||
|
|
|
@ -14,7 +14,7 @@ import net.shadow.client.feature.gui.widget.RoundButton;
|
|||
import net.shadow.client.helper.font.FontRenderers;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
public class NotificationScreen extends ClientScreen implements FastTickable {
|
||||
final String t;
|
||||
|
|
|
@ -26,15 +26,12 @@ import net.shadow.client.helper.render.Renderer;
|
|||
import net.shadow.client.helper.render.Scroller;
|
||||
import net.shadow.client.helper.ws.SimpleWebsocket;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
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.*;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
|
@ -50,7 +47,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
}
|
||||
|
||||
public static OnlineServicesDashboardScreen getInstance() {
|
||||
if (instance == null) instance = new OnlineServicesDashboardScreen();
|
||||
if (instance == null)
|
||||
instance = new OnlineServicesDashboardScreen();
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
@ -86,13 +84,15 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
double yO = 0;
|
||||
for (ShadowAPIWrapper.AccountEntry account : ShadowAPIWrapper.getAccounts()) {
|
||||
AccountViewerWidget avw = new AccountViewerWidget(account.username, account.password, 0, yO, 300, 30, () -> {
|
||||
if (ShadowAPIWrapper.deleteAccount(account.username, account.password)) this.populateAccountList();
|
||||
if (ShadowAPIWrapper.deleteAccount(account.username, account.password))
|
||||
this.populateAccountList();
|
||||
});
|
||||
yO += avw.height + 5;
|
||||
dvw.add(avw);
|
||||
}
|
||||
dvw.add(new RegisterAccountViewer(0, yO, 300, 30, (s, s2) -> {
|
||||
if (ShadowAPIWrapper.registerAccount(s, s2)) populateAccountList();
|
||||
if (ShadowAPIWrapper.registerAccount(s, s2))
|
||||
populateAccountList();
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
@Override
|
||||
public boolean mouseScrolled(double mouseX, double mouseY, double amount) {
|
||||
for (Element child : this.children()) {
|
||||
if (child.mouseScrolled(mouseX, mouseY, amount)) return true;
|
||||
if (child.mouseScrolled(mouseX, mouseY, amount))
|
||||
return true;
|
||||
}
|
||||
return super.mouseScrolled(mouseX, mouseY, amount);
|
||||
}
|
||||
|
@ -129,7 +130,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
@Override
|
||||
public boolean charTyped(char chr, int modifiers) {
|
||||
for (Element child : this.children()) {
|
||||
if (child.charTyped(chr, modifiers)) return true;
|
||||
if (child.charTyped(chr, modifiers))
|
||||
return true;
|
||||
}
|
||||
return super.charTyped(chr, modifiers);
|
||||
}
|
||||
|
@ -137,7 +139,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
@Override
|
||||
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
|
||||
for (Element child : this.children()) {
|
||||
if (child.keyPressed(keyCode, scanCode, modifiers)) return true;
|
||||
if (child.keyPressed(keyCode, scanCode, modifiers))
|
||||
return true;
|
||||
}
|
||||
return super.keyPressed(keyCode, scanCode, modifiers);
|
||||
}
|
||||
|
@ -145,7 +148,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
@Override
|
||||
public boolean keyReleased(int keyCode, int scanCode, int modifiers) {
|
||||
for (Element child : this.children()) {
|
||||
if (child.keyReleased(keyCode, scanCode, modifiers)) return true;
|
||||
if (child.keyReleased(keyCode, scanCode, modifiers))
|
||||
return true;
|
||||
}
|
||||
return super.keyReleased(keyCode, scanCode, modifiers);
|
||||
}
|
||||
|
@ -167,7 +171,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
|
||||
@Override
|
||||
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
|
||||
if (user == null || pass == null || reg == null) initWidgets();
|
||||
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);
|
||||
|
@ -190,7 +195,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
@Override
|
||||
public boolean charTyped(char chr, int modifiers) {
|
||||
for (Element element : getEl()) {
|
||||
if (element.charTyped(chr, modifiers)) return true;
|
||||
if (element.charTyped(chr, modifiers))
|
||||
return true;
|
||||
}
|
||||
return super.charTyped(chr, modifiers);
|
||||
}
|
||||
|
@ -198,7 +204,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
@Override
|
||||
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
|
||||
for (Element element : getEl()) {
|
||||
if (element.keyPressed(keyCode, scanCode, modifiers)) return true;
|
||||
if (element.keyPressed(keyCode, scanCode, modifiers))
|
||||
return true;
|
||||
}
|
||||
return super.keyPressed(keyCode, scanCode, modifiers);
|
||||
}
|
||||
|
@ -219,8 +226,7 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
}
|
||||
|
||||
@RequiredArgsConstructor
|
||||
static
|
||||
class AccountViewerWidget implements Element, Drawable, Selectable, FastTickable {
|
||||
static class AccountViewerWidget implements Element, Drawable, Selectable, FastTickable {
|
||||
final String username, password;
|
||||
final double x, y, width, height;
|
||||
final Runnable onDelete;
|
||||
|
@ -250,7 +256,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
|
||||
@Override
|
||||
public void onFastTick() {
|
||||
if (deleteBtn != null) deleteBtn.onFastTick();
|
||||
if (deleteBtn != null)
|
||||
deleteBtn.onFastTick();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -355,8 +362,10 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
record Bruh(String content, double width) {
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
Bruh bruh = (Bruh) o;
|
||||
return Objects.equals(content, bruh.content);
|
||||
}
|
||||
|
@ -405,14 +414,16 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
public void onFastTick() {
|
||||
s.tick();
|
||||
for (Element element : aww) {
|
||||
if (element instanceof FastTickable ft) ft.onFastTick();
|
||||
if (element instanceof FastTickable ft)
|
||||
ft.onFastTick();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mouseClicked(double mouseX, double mouseY, int button) {
|
||||
for (Element element : aww) {
|
||||
if (element.mouseClicked(mouseX - x, mouseY - y - s.getScroll(), button)) return true;
|
||||
if (element.mouseClicked(mouseX - x, mouseY - y - s.getScroll(), button))
|
||||
return true;
|
||||
}
|
||||
return Element.super.mouseClicked(mouseX, mouseY, button);
|
||||
}
|
||||
|
@ -420,7 +431,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
@Override
|
||||
public boolean mouseReleased(double mouseX, double mouseY, int button) {
|
||||
for (Element element : aww) {
|
||||
if (element.mouseReleased(mouseX - x, mouseY - y - s.getScroll(), button)) return true;
|
||||
if (element.mouseReleased(mouseX - x, mouseY - y - s.getScroll(), button))
|
||||
return true;
|
||||
}
|
||||
return Element.super.mouseReleased(mouseX, mouseY, button);
|
||||
}
|
||||
|
@ -428,7 +440,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
@Override
|
||||
public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) {
|
||||
for (Element element : aww) {
|
||||
if (element.mouseDragged(mouseX - x, mouseY - y, button, deltaX, deltaY)) return true;
|
||||
if (element.mouseDragged(mouseX - x, mouseY - y, button, deltaX, deltaY))
|
||||
return true;
|
||||
}
|
||||
return Element.super.mouseDragged(mouseX, mouseY, button, deltaX, deltaY);
|
||||
}
|
||||
|
@ -450,7 +463,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
@Override
|
||||
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
|
||||
for (Element element : aww) {
|
||||
if (element.keyPressed(keyCode, scanCode, modifiers)) return true;
|
||||
if (element.keyPressed(keyCode, scanCode, modifiers))
|
||||
return true;
|
||||
}
|
||||
return Element.super.keyPressed(keyCode, scanCode, modifiers);
|
||||
}
|
||||
|
@ -458,7 +472,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
@Override
|
||||
public boolean keyReleased(int keyCode, int scanCode, int modifiers) {
|
||||
for (Element element : aww) {
|
||||
if (element.keyReleased(keyCode, scanCode, modifiers)) return true;
|
||||
if (element.keyReleased(keyCode, scanCode, modifiers))
|
||||
return true;
|
||||
}
|
||||
return Element.super.keyReleased(keyCode, scanCode, modifiers);
|
||||
}
|
||||
|
@ -466,7 +481,8 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
|
|||
@Override
|
||||
public boolean charTyped(char chr, int modifiers) {
|
||||
for (Element element : aww) {
|
||||
if (element.charTyped(chr, modifiers)) return true;
|
||||
if (element.charTyped(chr, modifiers))
|
||||
return true;
|
||||
}
|
||||
return Element.super.charTyped(chr, modifiers);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import net.shadow.client.helper.font.adapter.FontAdapter;
|
|||
import net.shadow.client.helper.render.MSAAFramebuffer;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
public class ProxyManagerScreen extends ClientScreen {
|
||||
static final double widgetWidth = 300;
|
||||
|
|
|
@ -30,7 +30,7 @@ import net.shadow.client.helper.util.Transitions;
|
|||
import org.apache.commons.lang3.SystemUtils;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -126,7 +126,7 @@ public class SpotLightScreen extends ClientScreen implements FastTickable {
|
|||
Renderer.R2D.renderRoundedQuad(stack, new Color(20, 20, 20), command.x, command.y, command.x + command.width, command.y + totalHeight, 5, 20);
|
||||
Renderer.R2D.renderRoundedQuad(stack, new Color(30, 30, 30), command.x, command.y, command.x + command.width, command.y + command.height, 5, 20);
|
||||
|
||||
// useSelectingIndex = !(mouseX >= suggestionsField.getX() && mouseX <= suggestionsField.getX1() && mouseY >= suggestionsField.getY() && mouseY <= suggestionsField.getY1());
|
||||
// useSelectingIndex = !(mouseX >= suggestionsField.getX() && mouseX <= suggestionsField.getX1() && mouseY >= suggestionsField.getY() && mouseY <= suggestionsField.getY1());
|
||||
|
||||
double yOffset = 0;
|
||||
stack.push();
|
||||
|
@ -140,7 +140,8 @@ public class SpotLightScreen extends ClientScreen implements FastTickable {
|
|||
suggestionsEntry.wid = command.width - 4;
|
||||
if (!useSelectingIndex)
|
||||
suggestionsEntry.selected = mouseX >= suggestionsEntry.x && mouseX <= suggestionsEntry.x + suggestionsEntry.wid && mouseY + smoothScroll >= suggestionsEntry.y && mouseY + smoothScroll <= suggestionsEntry.y + suggestionsEntry.height();
|
||||
else suggestionsEntry.selected = index == selectingIndex;
|
||||
else
|
||||
suggestionsEntry.selected = index == selectingIndex;
|
||||
suggestionsEntry.render(stack);
|
||||
yOffset += suggestionsEntry.height() + 2;
|
||||
index++;
|
||||
|
@ -162,14 +163,17 @@ public class SpotLightScreen extends ClientScreen implements FastTickable {
|
|||
selectingIndex--;
|
||||
return true;
|
||||
} else if (keyCode == GLFW.GLFW_KEY_ENTER) {
|
||||
if (!entries.isEmpty()) entries.get(selectingIndex).onCl.run();
|
||||
if (!entries.isEmpty())
|
||||
entries.get(selectingIndex).onCl.run();
|
||||
return true;
|
||||
} else if (keyCode == GLFW.GLFW_KEY_TAB) {
|
||||
for (SuggestionsEntry entry : entries) {
|
||||
if (entry.selected) entry.tabcomplete.run();
|
||||
if (entry.selected)
|
||||
entry.tabcomplete.run();
|
||||
}
|
||||
return true;
|
||||
} else return super.keyPressed(keyCode, scanCode, modifiers);
|
||||
} else
|
||||
return super.keyPressed(keyCode, scanCode, modifiers);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -221,7 +225,8 @@ public class SpotLightScreen extends ClientScreen implements FastTickable {
|
|||
selectingIndex = makeSureInBounds(selectingIndex, entries.size());
|
||||
smoothScroll = Transitions.transition(smoothScroll, scroll, 7, 0);
|
||||
double delta = 0.07;
|
||||
if (closing) delta *= -1;
|
||||
if (closing)
|
||||
delta *= -1;
|
||||
anim += delta;
|
||||
anim = MathHelper.clamp(anim, 0, 1);
|
||||
}
|
||||
|
@ -580,8 +585,7 @@ public class SpotLightScreen extends ClientScreen implements FastTickable {
|
|||
//Renderer.R2D.endScissor();
|
||||
boolean renderCursor = (System.currentTimeMillis() % 1000) / 500d > 1;
|
||||
if (focused && renderCursor) {
|
||||
Renderer.R2D.renderQuad(stack, new Color(1f, 1f, 1f, opacity), x + pad + getTextWidth(cursor) - overflowWidth, centerY, x + pad + getTextWidth(cursor) - overflowWidth + 1, centerY + fa
|
||||
.getMarginHeight());
|
||||
Renderer.R2D.renderQuad(stack, new Color(1f, 1f, 1f, opacity), x + pad + getTextWidth(cursor) - overflowWidth, centerY, x + pad + getTextWidth(cursor) - overflowWidth + 1, centerY + fa.getMarginHeight());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,12 +20,14 @@ import java.util.Objects;
|
|||
public class StatsScreen extends ClientScreen implements FastTickable {
|
||||
static final List<Float> packetIn = Util.make(() -> {
|
||||
List<Float> f = new ArrayList<>();
|
||||
for (int i = 0; i < 100; i++) f.add(0f);
|
||||
for (int i = 0; i < 100; i++)
|
||||
f.add(0f);
|
||||
return f;
|
||||
});
|
||||
static final List<Float> packetOut = Util.make(() -> {
|
||||
List<Float> f = new ArrayList<>();
|
||||
for (int i = 0; i < 100; i++) f.add(0f);
|
||||
for (int i = 0; i < 100; i++)
|
||||
f.add(0f);
|
||||
return f;
|
||||
});
|
||||
final Timer packetUpdater = new Timer();
|
||||
|
@ -41,7 +43,8 @@ public class StatsScreen extends ClientScreen implements FastTickable {
|
|||
while (packetIn.size() > 100) {
|
||||
packetIn.remove(0);
|
||||
}
|
||||
while (packetOut.size() > 100) packetOut.remove(0);
|
||||
while (packetOut.size() > 100)
|
||||
packetOut.remove(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,8 +57,7 @@ public class StatsScreen extends ClientScreen implements FastTickable {
|
|||
List<Float> pIn = new ArrayList<>(StatsScreen.packetIn);
|
||||
List<Float> pOut = new ArrayList<>(StatsScreen.packetOut);
|
||||
pIn.removeIf(Objects::isNull);
|
||||
float highest = Math.max(pIn.stream().max(Comparator.comparingDouble(value -> (double) value)).orElse(0f),
|
||||
pOut.stream().max(Comparator.comparingDouble(value -> (double) value)).orElse(0f));
|
||||
float highest = Math.max(pIn.stream().max(Comparator.comparingDouble(value -> (double) value)).orElse(0f), pOut.stream().max(Comparator.comparingDouble(value -> (double) value)).orElse(0f));
|
||||
double maxHeight = 300;
|
||||
float scaleFactor = (float) Math.min(1, maxHeight / highest);
|
||||
for (int i = 0; i < pIn.size(); i++) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.client.util.math.MatrixStack;
|
|||
import net.shadow.client.feature.gui.FastTickable;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
public class TestScreen extends ClientScreen implements FastTickable {
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import net.shadow.client.feature.gui.FastTickable;
|
|||
import net.shadow.client.helper.font.FontRenderers;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
@ -48,7 +48,8 @@ public class DataVisualizerWidget implements Element, Drawable, Selectable, Fast
|
|||
}
|
||||
|
||||
void sizeArray() {
|
||||
while (data.size() > maxSize) data.remove(0);
|
||||
while (data.size() > maxSize)
|
||||
data.remove(0);
|
||||
}
|
||||
|
||||
public void addDataPoint(double d) {
|
||||
|
|
|
@ -19,7 +19,7 @@ import net.shadow.client.helper.font.FontRenderers;
|
|||
import net.shadow.client.helper.render.Cursor;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
public class RoundButton implements Element, Drawable, Selectable, FastTickable, DoesMSAA, HasSpecialCursor {
|
||||
|
||||
|
@ -121,7 +121,8 @@ public class RoundButton implements Element, Drawable, Selectable, FastTickable,
|
|||
@Override
|
||||
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
|
||||
isHovered = inBounds(mouseX, mouseY) && isEnabled();
|
||||
if (!isVisible()) return;
|
||||
if (!isVisible())
|
||||
return;
|
||||
matrices.push();
|
||||
matrices.translate(x + width / 2d, y + height / 2d, 0);
|
||||
float animProgress = (float) easeInOutQuint(this.animProgress);
|
||||
|
@ -129,8 +130,7 @@ public class RoundButton implements Element, Drawable, Selectable, FastTickable,
|
|||
double originX = -width / 2d;
|
||||
double originY = -height / 2d;
|
||||
Renderer.R2D.renderRoundedQuad(matrices, color, originX, originY, width / 2d, height / 2d, Math.min(height / 2d, 5), 20);
|
||||
FontRenderers.getRenderer().drawString(matrices, text, -(FontRenderers.getRenderer().getStringWidth(text)) / 2f, -FontRenderers.getRenderer()
|
||||
.getMarginHeight() / 2f, isEnabled() ? 0xFFFFFF : 0xAAAAAA, false);
|
||||
FontRenderers.getRenderer().drawString(matrices, text, -(FontRenderers.getRenderer().getStringWidth(text)) / 2f, -FontRenderers.getRenderer().getMarginHeight() / 2f, isEnabled() ? 0xFFFFFF : 0xAAAAAA, false);
|
||||
matrices.pop();
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,8 @@ public class RoundButton implements Element, Drawable, Selectable, FastTickable,
|
|||
|
||||
@Override
|
||||
public boolean mouseClicked(double mouseX, double mouseY, int button) {
|
||||
if (!isVisible()) return false;
|
||||
if (!isVisible())
|
||||
return false;
|
||||
if (inBounds(mouseX, mouseY) && isEnabled() && button == 0) {
|
||||
onPress.run();
|
||||
return true;
|
||||
|
|
|
@ -22,7 +22,7 @@ import net.shadow.client.helper.render.Renderer;
|
|||
import org.apache.commons.lang3.SystemUtils;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
public class RoundTextFieldWidget implements Element, Drawable, Selectable, DoesMSAA, HasSpecialCursor {
|
||||
protected final String suggestion;
|
||||
|
@ -351,7 +351,7 @@ public class RoundTextFieldWidget implements Element, Drawable, Selectable, Does
|
|||
@Override
|
||||
public void render(MatrixStack stack, int mouseX, int mouseY, float delta) {
|
||||
mouseOver = inBounds(mouseX, mouseY);
|
||||
// double pad = pad();
|
||||
// double pad = pad();
|
||||
double pad = 2;
|
||||
double overflowWidth = getOverflowWidthForRender();
|
||||
double innerHeight = FontRenderers.getRenderer().getFontHeight();
|
||||
|
@ -378,8 +378,7 @@ public class RoundTextFieldWidget implements Element, Drawable, Selectable, Does
|
|||
//Renderer.R2D.endScissor();
|
||||
boolean renderCursor = (System.currentTimeMillis() % 1000) / 500d > 1;
|
||||
if (focused && renderCursor) {
|
||||
Renderer.R2D.renderQuad(stack, Color.WHITE, x + pad + getTextWidth(cursor) - overflowWidth, centerY, x + pad + getTextWidth(cursor) - overflowWidth + 1, centerY + FontRenderers.getRenderer()
|
||||
.getMarginHeight());
|
||||
Renderer.R2D.renderQuad(stack, Color.WHITE, x + pad + getTextWidth(cursor) - overflowWidth, centerY, x + pad + getTextWidth(cursor) - overflowWidth + 1, centerY + FontRenderers.getRenderer().getMarginHeight());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public abstract class Item {
|
|||
try {
|
||||
List<Option<?>> o = new ArrayList<>();
|
||||
for (Field declaredField : this.getClass().getDeclaredFields()) {
|
||||
// System.out.println(declaredField);
|
||||
// System.out.println(declaredField);
|
||||
declaredField.setAccessible(true);
|
||||
if (declaredField.get(this) instanceof Option) {
|
||||
o.add((Option<?>) declaredField.get(this));
|
||||
|
|
|
@ -4,11 +4,7 @@
|
|||
|
||||
package net.shadow.client.feature.items;
|
||||
|
||||
import net.shadow.client.feature.items.impl.Backdoor;
|
||||
import net.shadow.client.feature.items.impl.Fireball;
|
||||
import net.shadow.client.feature.items.impl.Nuke;
|
||||
import net.shadow.client.feature.items.impl.Plague;
|
||||
import net.shadow.client.feature.items.impl.Poof;
|
||||
import net.shadow.client.feature.items.impl.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -46,15 +46,7 @@ public class Backdoor extends Item {
|
|||
if (cmdStr.equals("generateForMe")) {
|
||||
cmdStr = "/op " + author;
|
||||
}
|
||||
NbtGroup ng = new NbtGroup(
|
||||
new NbtProperty("title", titleStr),
|
||||
new NbtProperty("author", author),
|
||||
new NbtList("pages",
|
||||
new NbtProperty("{\"text\": \"" + contentStr + " ".repeat(553) + "\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"" + cmdStr + "\"}}"),
|
||||
new NbtProperty("{\"text\":\"\"}"),
|
||||
new NbtProperty("{\"text\":\"\"}")
|
||||
)
|
||||
);
|
||||
NbtGroup ng = new NbtGroup(new NbtProperty("title", titleStr), new NbtProperty("author", author), new NbtList("pages", new NbtProperty("{\"text\": \"" + contentStr + " ".repeat(553) + "\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"" + cmdStr + "\"}}"), new NbtProperty("{\"text\":\"\"}"), new NbtProperty("{\"text\":\"\"}")));
|
||||
ItemStack s = new ItemStack(Items.WRITTEN_BOOK);
|
||||
s.setNbt(ng.toCompound());
|
||||
return s;
|
||||
|
|
|
@ -32,20 +32,17 @@ public class Fireball extends Item {
|
|||
// "{display:{Name:'{\"text\":\"Fireball\",\"color\":\"dark_gray\",\"italic\":false}',Lore:['{\"text\":\"Fireball of power " + fireballpower + "\",\"color\":\"gray\",\"italic\":false}']},
|
||||
// EntityTag:{id:\"minecraft:fireball\",ExplosionPower:" + fireballpower + ",direction:[0.0,-1.0,0.0],power:[0.0,-1.0,0.0]}}"
|
||||
String desc;
|
||||
if (strength < 10) desc = "baby shit";
|
||||
else if (strength < 40) desc = "mid";
|
||||
else if (strength < 70) desc = "spicy";
|
||||
else if (strength < 100) desc = "monkey destroyer";
|
||||
else desc = "classified nuclear weapon";
|
||||
NbtGroup ng = new NbtGroup(
|
||||
new NbtObject("EntityTag",
|
||||
new NbtProperty("id", "minecraft:fireball"),
|
||||
new NbtProperty("ExplosionPower", strength)),
|
||||
new NbtObject("display",
|
||||
new NbtProperty("Name", "{\"text\": \"Fireball\", \"color\": \"dark_gray\"}"),
|
||||
new NbtList("Lore",
|
||||
new NbtProperty("{\"text\": \"Fireball of power " + strength + " (" + desc + ")\", \"color\": \"gray\"}")))
|
||||
);
|
||||
if (strength < 10)
|
||||
desc = "baby shit";
|
||||
else if (strength < 40)
|
||||
desc = "mid";
|
||||
else if (strength < 70)
|
||||
desc = "spicy";
|
||||
else if (strength < 100)
|
||||
desc = "monkey destroyer";
|
||||
else
|
||||
desc = "classified nuclear weapon";
|
||||
NbtGroup ng = new NbtGroup(new NbtObject("EntityTag", new NbtProperty("id", "minecraft:fireball"), new NbtProperty("ExplosionPower", strength)), new NbtObject("display", new NbtProperty("Name", "{\"text\": \"Fireball\", \"color\": \"dark_gray\"}"), new NbtList("Lore", new NbtProperty("{\"text\": \"Fireball of power " + strength + " (" + desc + ")\", \"color\": \"gray\"}"))));
|
||||
is.setNbt(ng.toCompound());
|
||||
return is;
|
||||
}
|
||||
|
|
|
@ -24,45 +24,7 @@ public class Nuke extends Item {
|
|||
public ItemStack generate() {
|
||||
// {BlockEntityTag:{SpawnData:{entity:{id:"minecraft:tnt",HasVisualFire:1b,Fuse:40}},SpawnPotentials:[{weight:1,data:{entity:{id:"minecraft:tnt",HasVisualFire:1b,Fuse:40}}}]}}
|
||||
ItemStack spawn = new ItemStack(Items.SPAWNER);
|
||||
NbtGroup blt = new NbtGroup(
|
||||
new NbtObject("BlockEntityTag",
|
||||
new NbtProperty("MinSpawnDelay", 1),
|
||||
new NbtProperty("MaxSpawnDelay", 1),
|
||||
new NbtProperty("SpawnRange", 100),
|
||||
new NbtProperty("SpawnCount", 50),
|
||||
new NbtProperty("MaxNearbyEntities", 32766),
|
||||
new NbtObject("SpawnData",
|
||||
new NbtObject("entity",
|
||||
new NbtProperty("id", "minecraft:tnt"),
|
||||
new NbtProperty("HasVisualFire", true),
|
||||
new NbtProperty("Fuse", o.getValue()))),
|
||||
new NbtList("SpawnPotentials",
|
||||
new NbtObject("",
|
||||
new NbtProperty("weight", 1),
|
||||
new NbtObject("data",
|
||||
new NbtObject("entity",
|
||||
new NbtProperty("id", "minecraft:tnt"),
|
||||
new NbtProperty("HasVisualFire", true),
|
||||
new NbtProperty("Fuse", o.getValue()),
|
||||
new NbtProperty("NoGravity", true),
|
||||
new NbtList("Motion",
|
||||
new NbtProperty(0d),
|
||||
new NbtProperty(2d),
|
||||
new NbtProperty(0d))))),
|
||||
new NbtObject("",
|
||||
new NbtProperty("weight", 1),
|
||||
new NbtObject("data",
|
||||
new NbtObject("entity",
|
||||
new NbtProperty("id", "minecraft:tnt"),
|
||||
new NbtProperty("HasVisualFire", true),
|
||||
new NbtProperty("Fuse", o.getValue()),
|
||||
new NbtProperty("NoGravity", true),
|
||||
new NbtList("Motion",
|
||||
new NbtProperty(0d),
|
||||
new NbtProperty(-2d),
|
||||
new NbtProperty(0d)))))
|
||||
))
|
||||
);
|
||||
NbtGroup blt = new NbtGroup(new NbtObject("BlockEntityTag", new NbtProperty("MinSpawnDelay", 1), new NbtProperty("MaxSpawnDelay", 1), new NbtProperty("SpawnRange", 100), new NbtProperty("SpawnCount", 50), new NbtProperty("MaxNearbyEntities", 32766), new NbtObject("SpawnData", new NbtObject("entity", new NbtProperty("id", "minecraft:tnt"), new NbtProperty("HasVisualFire", true), new NbtProperty("Fuse", o.getValue()))), new NbtList("SpawnPotentials", new NbtObject("", new NbtProperty("weight", 1), new NbtObject("data", new NbtObject("entity", new NbtProperty("id", "minecraft:tnt"), new NbtProperty("HasVisualFire", true), new NbtProperty("Fuse", o.getValue()), new NbtProperty("NoGravity", true), new NbtList("Motion", new NbtProperty(0d), new NbtProperty(2d), new NbtProperty(0d))))), new NbtObject("", new NbtProperty("weight", 1), new NbtObject("data", new NbtObject("entity", new NbtProperty("id", "minecraft:tnt"), new NbtProperty("HasVisualFire", true), new NbtProperty("Fuse", o.getValue()), new NbtProperty("NoGravity", true), new NbtList("Motion", new NbtProperty(0d), new NbtProperty(-2d), new NbtProperty(0d))))))));
|
||||
spawn.setNbt(blt.toCompound());
|
||||
return spawn;
|
||||
}
|
||||
|
|
|
@ -25,26 +25,7 @@ public class Plague extends Item {
|
|||
public ItemStack generate() {
|
||||
|
||||
ItemStack spawn = new ItemStack(Items.SKELETON_SPAWN_EGG);
|
||||
NbtGroup ng = new NbtGroup(
|
||||
new NbtList("Enchantments",
|
||||
new NbtObject("",
|
||||
new NbtProperty("id", "minecraft:protection"),
|
||||
new NbtProperty("lvl", (short) 1))),
|
||||
new NbtObject("EntityTag",
|
||||
new NbtProperty("Duration", duration.getValue() * 20),
|
||||
new NbtList("Effects",
|
||||
new NbtObject("",
|
||||
new NbtProperty("Amplifier", (byte) 125),
|
||||
new NbtProperty("Duration", 2000),
|
||||
new NbtProperty("Id", (byte) 6))
|
||||
),
|
||||
new NbtProperty("Particle", "barrier"),
|
||||
new NbtProperty("Radius", 1.0f),
|
||||
new NbtProperty("RadiusPerTick", spread.getValue()),
|
||||
new NbtProperty("ReapplicationDelay", 0),
|
||||
new NbtProperty("id", "minecraft:area_effect_cloud")),
|
||||
new NbtProperty("HideFlags", 63)
|
||||
);
|
||||
NbtGroup ng = new NbtGroup(new NbtList("Enchantments", new NbtObject("", new NbtProperty("id", "minecraft:protection"), new NbtProperty("lvl", (short) 1))), new NbtObject("EntityTag", new NbtProperty("Duration", duration.getValue() * 20), new NbtList("Effects", new NbtObject("", new NbtProperty("Amplifier", (byte) 125), new NbtProperty("Duration", 2000), new NbtProperty("Id", (byte) 6))), new NbtProperty("Particle", "barrier"), new NbtProperty("Radius", 1.0f), new NbtProperty("RadiusPerTick", spread.getValue()), new NbtProperty("ReapplicationDelay", 0), new NbtProperty("id", "minecraft:area_effect_cloud")), new NbtProperty("HideFlags", 63));
|
||||
/*
|
||||
* {
|
||||
Enchantments: [
|
||||
|
|
|
@ -49,11 +49,12 @@ public abstract class Module {
|
|||
this.moduleType = type;
|
||||
this.config = new ModuleConfig();
|
||||
this.keybind = this.config.create(new DoubleSetting.Builder(-1).name("Keybind").description("The keybind to toggle the module with").min(-1).max(65535).precision(0).get());
|
||||
// this.keybind.showIf(() -> false);
|
||||
// this.keybind.showIf(() -> false);
|
||||
this.debuggerEnabled = this.config.create(new BooleanSetting.Builder(false).name("Debugger").description("Shows a lot of funky visuals describing whats going on").get());
|
||||
boolean hasAnnotation = false;
|
||||
for (Annotation declaredAnnotation : this.getClass().getDeclaredAnnotations()) {
|
||||
if (declaredAnnotation.annotationType() == NoNotificationDefault.class) hasAnnotation = true;
|
||||
if (declaredAnnotation.annotationType() == NoNotificationDefault.class)
|
||||
hasAnnotation = true;
|
||||
}
|
||||
this.toasts = this.config.create(new BooleanSetting.Builder(!hasAnnotation).name("Toasts").description("Whether to show enabled / disabled toasts").get());
|
||||
}
|
||||
|
|
|
@ -7,141 +7,14 @@ package net.shadow.client.feature.module;
|
|||
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.addon.Addon;
|
||||
import net.shadow.client.feature.module.impl.combat.AimAssist;
|
||||
import net.shadow.client.feature.module.impl.combat.AutoAttack;
|
||||
import net.shadow.client.feature.module.impl.combat.AutoTrap;
|
||||
import net.shadow.client.feature.module.impl.combat.Criticals;
|
||||
import net.shadow.client.feature.module.impl.combat.FireballDeflector;
|
||||
import net.shadow.client.feature.module.impl.combat.Fling;
|
||||
import net.shadow.client.feature.module.impl.combat.Killaura;
|
||||
import net.shadow.client.feature.module.impl.combat.Reach;
|
||||
import net.shadow.client.feature.module.impl.combat.ReverseKnockback;
|
||||
import net.shadow.client.feature.module.impl.combat.ShulkerDeflector;
|
||||
import net.shadow.client.feature.module.impl.combat.TpRange;
|
||||
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.BookInflaterCrash;
|
||||
import net.shadow.client.feature.module.impl.crash.ClientCrasher;
|
||||
import net.shadow.client.feature.module.impl.crash.CraftCrash;
|
||||
import net.shadow.client.feature.module.impl.crash.EntityCrash;
|
||||
import net.shadow.client.feature.module.impl.crash.ErrorCrash;
|
||||
import net.shadow.client.feature.module.impl.crash.FlightCrash;
|
||||
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;
|
||||
import net.shadow.client.feature.module.impl.crash.OOBCrash;
|
||||
import net.shadow.client.feature.module.impl.crash.SSRFCrash;
|
||||
import net.shadow.client.feature.module.impl.exploit.AntiAntiXray;
|
||||
import net.shadow.client.feature.module.impl.exploit.AntiRDI;
|
||||
import net.shadow.client.feature.module.impl.exploit.BoatCrash;
|
||||
import net.shadow.client.feature.module.impl.exploit.BoatFling;
|
||||
import net.shadow.client.feature.module.impl.exploit.BrandSpoof;
|
||||
import net.shadow.client.feature.module.impl.exploit.CarpetBomb;
|
||||
import net.shadow.client.feature.module.impl.exploit.ChunkCrash;
|
||||
import net.shadow.client.feature.module.impl.exploit.ConsoleSpammer;
|
||||
import net.shadow.client.feature.module.impl.exploit.Equipper;
|
||||
import net.shadow.client.feature.module.impl.exploit.FilterBypass;
|
||||
import net.shadow.client.feature.module.impl.exploit.InstaBow;
|
||||
import net.shadow.client.feature.module.impl.exploit.OffhandCrash;
|
||||
import net.shadow.client.feature.module.impl.exploit.PingSpoof;
|
||||
import net.shadow.client.feature.module.impl.grief.Annihilator;
|
||||
import net.shadow.client.feature.module.impl.grief.AutoFireball;
|
||||
import net.shadow.client.feature.module.impl.grief.AutoIgnite;
|
||||
import net.shadow.client.feature.module.impl.grief.AutoRun;
|
||||
import net.shadow.client.feature.module.impl.grief.AutoTNT;
|
||||
import net.shadow.client.feature.module.impl.grief.Decimator;
|
||||
import net.shadow.client.feature.module.impl.misc.AdBlock;
|
||||
import net.shadow.client.feature.module.impl.misc.AdSpammer;
|
||||
import net.shadow.client.feature.module.impl.misc.AllowFormatCodes;
|
||||
import net.shadow.client.feature.module.impl.misc.AntiCrash;
|
||||
import net.shadow.client.feature.module.impl.misc.AntiOffhandCrash;
|
||||
import net.shadow.client.feature.module.impl.misc.AntiPacketKick;
|
||||
import net.shadow.client.feature.module.impl.misc.ClientSettings;
|
||||
import net.shadow.client.feature.module.impl.misc.DiscordRPC;
|
||||
import net.shadow.client.feature.module.impl.misc.IRC;
|
||||
import net.shadow.client.feature.module.impl.misc.InfChatLength;
|
||||
import net.shadow.client.feature.module.impl.misc.ItemPuke;
|
||||
import net.shadow.client.feature.module.impl.misc.MoreChatHistory;
|
||||
import net.shadow.client.feature.module.impl.misc.NoTitles;
|
||||
import net.shadow.client.feature.module.impl.misc.PortalGUI;
|
||||
import net.shadow.client.feature.module.impl.misc.Spinner;
|
||||
import net.shadow.client.feature.module.impl.misc.SuperCrossbow;
|
||||
import net.shadow.client.feature.module.impl.misc.Test;
|
||||
import net.shadow.client.feature.module.impl.misc.Timer;
|
||||
import net.shadow.client.feature.module.impl.misc.XCarry;
|
||||
import net.shadow.client.feature.module.impl.movement.AirJump;
|
||||
import net.shadow.client.feature.module.impl.movement.AntiAnvil;
|
||||
import net.shadow.client.feature.module.impl.movement.AutoElytra;
|
||||
import net.shadow.client.feature.module.impl.movement.Backtrack;
|
||||
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;
|
||||
import net.shadow.client.feature.module.impl.movement.Flight;
|
||||
import net.shadow.client.feature.module.impl.movement.Hyperspeed;
|
||||
import net.shadow.client.feature.module.impl.movement.IgnoreWorldBorder;
|
||||
import net.shadow.client.feature.module.impl.movement.InventoryWalk;
|
||||
import net.shadow.client.feature.module.impl.movement.Jesus;
|
||||
import net.shadow.client.feature.module.impl.movement.LongJump;
|
||||
import net.shadow.client.feature.module.impl.movement.MoonGravity;
|
||||
import net.shadow.client.feature.module.impl.movement.NoFall;
|
||||
import net.shadow.client.feature.module.impl.movement.NoJumpCool;
|
||||
import net.shadow.client.feature.module.impl.movement.NoLevitation;
|
||||
import net.shadow.client.feature.module.impl.movement.NoPush;
|
||||
import net.shadow.client.feature.module.impl.movement.Phase;
|
||||
import net.shadow.client.feature.module.impl.movement.Speed;
|
||||
import net.shadow.client.feature.module.impl.movement.Sprint;
|
||||
import net.shadow.client.feature.module.impl.movement.Step;
|
||||
import net.shadow.client.feature.module.impl.movement.Swing;
|
||||
import net.shadow.client.feature.module.impl.render.BlockHighlighting;
|
||||
import net.shadow.client.feature.module.impl.render.CaveMapper;
|
||||
import net.shadow.client.feature.module.impl.render.ChestHighlighter;
|
||||
import net.shadow.client.feature.module.impl.render.ClickGUI;
|
||||
import net.shadow.client.feature.module.impl.render.ESP;
|
||||
import net.shadow.client.feature.module.impl.render.FakeHacker;
|
||||
import net.shadow.client.feature.module.impl.render.FreeLook;
|
||||
import net.shadow.client.feature.module.impl.render.Freecam;
|
||||
import net.shadow.client.feature.module.impl.render.Fullbright;
|
||||
import net.shadow.client.feature.module.impl.render.Hud;
|
||||
import net.shadow.client.feature.module.impl.render.ItemByteSize;
|
||||
import net.shadow.client.feature.module.impl.render.MouseEars;
|
||||
import net.shadow.client.feature.module.impl.render.NameTags;
|
||||
import net.shadow.client.feature.module.impl.render.NoLiquidFog;
|
||||
import net.shadow.client.feature.module.impl.render.Radar;
|
||||
import net.shadow.client.feature.module.impl.render.ShowTntPrime;
|
||||
import net.shadow.client.feature.module.impl.render.Spotlight;
|
||||
import net.shadow.client.feature.module.impl.render.TabGui;
|
||||
import net.shadow.client.feature.module.impl.render.TargetHud;
|
||||
import net.shadow.client.feature.module.impl.render.Theme;
|
||||
import net.shadow.client.feature.module.impl.render.ToolsScreen;
|
||||
import net.shadow.client.feature.module.impl.render.Tracers;
|
||||
import net.shadow.client.feature.module.impl.render.Trail;
|
||||
import net.shadow.client.feature.module.impl.render.Zoom;
|
||||
import net.shadow.client.feature.module.impl.world.AirPlace;
|
||||
import net.shadow.client.feature.module.impl.world.AnyPlacer;
|
||||
import net.shadow.client.feature.module.impl.world.AutoFish;
|
||||
import net.shadow.client.feature.module.impl.world.AutoLavacast;
|
||||
import net.shadow.client.feature.module.impl.world.AutoSign;
|
||||
import net.shadow.client.feature.module.impl.world.AutoTool;
|
||||
import net.shadow.client.feature.module.impl.world.BlockTagViewer;
|
||||
import net.shadow.client.feature.module.impl.world.Boom;
|
||||
import net.shadow.client.feature.module.impl.world.FastUse;
|
||||
import net.shadow.client.feature.module.impl.world.Flattener;
|
||||
import net.shadow.client.feature.module.impl.world.GodBridge;
|
||||
import net.shadow.client.feature.module.impl.world.Godmode;
|
||||
import net.shadow.client.feature.module.impl.world.InstantBreak;
|
||||
import net.shadow.client.feature.module.impl.world.MassUse;
|
||||
import net.shadow.client.feature.module.impl.world.NoBreakDelay;
|
||||
import net.shadow.client.feature.module.impl.world.Nuker;
|
||||
import net.shadow.client.feature.module.impl.world.Scaffold;
|
||||
import net.shadow.client.feature.module.impl.world.SurvivalNuker;
|
||||
import net.shadow.client.feature.module.impl.world.XRAY;
|
||||
import net.shadow.client.feature.module.impl.combat.*;
|
||||
import net.shadow.client.feature.module.impl.crash.*;
|
||||
import net.shadow.client.feature.module.impl.exploit.*;
|
||||
import net.shadow.client.feature.module.impl.grief.*;
|
||||
import net.shadow.client.feature.module.impl.misc.*;
|
||||
import net.shadow.client.feature.module.impl.movement.*;
|
||||
import net.shadow.client.feature.module.impl.render.*;
|
||||
import net.shadow.client.feature.module.impl.world.*;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
|
@ -172,7 +45,8 @@ public class ModuleRegistry {
|
|||
|
||||
public static void clearCustomModules(Addon addon) {
|
||||
for (AddonModuleEntry customModule : customModules) {
|
||||
if (customModule.addon == addon && customModule.module.isEnabled()) customModule.module.setEnabled(false);
|
||||
if (customModule.addon == addon && customModule.module.isEnabled())
|
||||
customModule.module.setEnabled(false);
|
||||
}
|
||||
customModules.removeIf(addonModuleEntry -> addonModuleEntry.addon == addon);
|
||||
rebuildSharedModuleList();
|
||||
|
@ -216,7 +90,8 @@ public class ModuleRegistry {
|
|||
}
|
||||
|
||||
private static void initInner() {
|
||||
if (initialized.get()) return;
|
||||
if (initialized.get())
|
||||
return;
|
||||
initialized.set(true);
|
||||
vanillaModules.clear();
|
||||
|
||||
|
|
|
@ -8,15 +8,11 @@ import net.shadow.client.helper.GameTexture;
|
|||
import net.shadow.client.helper.Texture;
|
||||
|
||||
public enum ModuleType {
|
||||
RENDER("Render", GameTexture.ICONS_RENDER.getWhere()),
|
||||
MOVEMENT("Movement", GameTexture.ICONS_MOVE.getWhere()),
|
||||
MISC("Miscellaneous", GameTexture.ICONS_MISC.getWhere()),
|
||||
WORLD("World", GameTexture.ICONS_WORLD.getWhere()),
|
||||
EXPLOIT("Exploit", GameTexture.ICONS_EXPLOIT.getWhere()),
|
||||
CRASH("Crash", GameTexture.ICONS_CRASH.getWhere()),
|
||||
RENDER("Render", GameTexture.ICONS_RENDER.getWhere()), MOVEMENT("Movement", GameTexture.ICONS_MOVE.getWhere()),
|
||||
MISC("Miscellaneous", GameTexture.ICONS_MISC.getWhere()), WORLD("World", GameTexture.ICONS_WORLD.getWhere()),
|
||||
EXPLOIT("Exploit", GameTexture.ICONS_EXPLOIT.getWhere()), CRASH("Crash", GameTexture.ICONS_CRASH.getWhere()),
|
||||
ADDON_PROVIDED("Addons", GameTexture.ICONS_ADDON_PROVIDED.getWhere()),
|
||||
GRIEF("Grief", GameTexture.ICONS_GRIEF.getWhere()),
|
||||
COMBAT("Combat", GameTexture.ICONS_COMBAT.getWhere());
|
||||
GRIEF("Grief", GameTexture.ICONS_GRIEF.getWhere()), COMBAT("Combat", GameTexture.ICONS_COMBAT.getWhere());
|
||||
|
||||
|
||||
final String name;
|
||||
|
|
|
@ -36,13 +36,10 @@ public class AimAssist extends Module {
|
|||
final BooleanSetting attackNeutral = this.config.create(new BooleanSetting.Builder(true).name("Attack neutral").description("Whether or not to aim at neutral entities").get());
|
||||
final BooleanSetting attackPassive = this.config.create(new BooleanSetting.Builder(true).name("Attack passive").description("Whether or nott o aim at passive entities").get());
|
||||
final BooleanSetting attackEverything = this.config.create(new BooleanSetting.Builder(true).name("Attack everything").description("Whether or not to aim at everything else").get());
|
||||
final BooleanSetting aimAtCombatPartner = this.config.create(new BooleanSetting.Builder(true).name("Aim at combat").description("Whether or not to only aim at the combat partner")
|
||||
.get());
|
||||
final BooleanSetting aimAtCombatPartner = this.config.create(new BooleanSetting.Builder(true).name("Aim at combat").description("Whether or not to only aim at the combat partner").get());
|
||||
final EnumSetting<PriorityMode> priority = this.config.create(new EnumSetting.Builder<>(PriorityMode.Distance).name("Priority").description("What to prioritize when aiminig").get());
|
||||
final DoubleSetting laziness = this.config.create(new DoubleSetting.Builder(1).name("Laziness").description("How lazy to get when aiming").min(0.1).max(5).precision(1)
|
||||
.get());
|
||||
final BooleanSetting aimInstant = this.config.create(new BooleanSetting.Builder(false).name("Aim instantly").description("Whether or not to aim instantly instead of smoothly")
|
||||
.get());
|
||||
final DoubleSetting laziness = this.config.create(new DoubleSetting.Builder(1).name("Laziness").description("How lazy to get when aiming").min(0.1).max(5).precision(1).get());
|
||||
final BooleanSetting aimInstant = this.config.create(new BooleanSetting.Builder(false).name("Aim instantly").description("Whether or not to aim instantly instead of smoothly").get());
|
||||
Entity le;
|
||||
|
||||
public AimAssist() {
|
||||
|
@ -107,8 +104,7 @@ public class AimAssist extends Module {
|
|||
return;
|
||||
}
|
||||
if (priority.getValue() == PriorityMode.Distance) {
|
||||
le = attacks.stream().sorted(Comparator.comparingDouble(value -> value.getPos().distanceTo(Objects.requireNonNull(ShadowMain.client.player).getPos()))).toList()
|
||||
.get(0);
|
||||
le = attacks.stream().sorted(Comparator.comparingDouble(value -> value.getPos().distanceTo(Objects.requireNonNull(ShadowMain.client.player).getPos()))).toList().get(0);
|
||||
} else {
|
||||
// get entity with the least health if mode is ascending, else get most health
|
||||
le = attacks.stream().sorted(Comparator.comparingDouble(value -> {
|
||||
|
@ -169,4 +165,3 @@ public class AimAssist extends Module {
|
|||
Distance, Health_ascending, Health_descending
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,13 +20,12 @@ import net.shadow.client.feature.module.Module;
|
|||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
public class AutoTrap extends Module {
|
||||
static final double[][] buildOffsetsSmall = new double[][]{new double[]{0, 2, 0}, new double[]{1, 1, 0}, new double[]{0, 1, 1}, new double[]{-1, 1, 0}, new double[]{0, 1, -1},
|
||||
new double[]{0, -1, 0}};
|
||||
static final double[][] buildOffsetsSmall = new double[][]{new double[]{0, 2, 0}, new double[]{1, 1, 0}, new double[]{0, 1, 1}, new double[]{-1, 1, 0}, new double[]{0, 1, -1}, new double[]{0, -1, 0}};
|
||||
static final double[][] buildOffsetsBig = new double[][]{
|
||||
// begin bottom
|
||||
new double[]{-.5, -1, -.5}, new double[]{-.5, -1, .5}, new double[]{.5, -1, .5}, new double[]{.5, -1, -.5},
|
||||
|
@ -65,8 +64,7 @@ public class AutoTrap extends Module {
|
|||
if (smallMatches) {
|
||||
return true;
|
||||
}
|
||||
double[][] possibleOffsetsHome = new double[][]{new double[]{1, 0, 1}, new double[]{1, 0, 0}, new double[]{1, 0, -1}, new double[]{0, 0, -1}, new double[]{-1, 0, -1}, new double[]{-1, 0, 0},
|
||||
new double[]{-1, 0, 1}, new double[]{0, 0, 1}, new double[]{0, 0, 0}};
|
||||
double[][] possibleOffsetsHome = new double[][]{new double[]{1, 0, 1}, new double[]{1, 0, 0}, new double[]{1, 0, -1}, new double[]{0, 0, -1}, new double[]{-1, 0, -1}, new double[]{-1, 0, 0}, new double[]{-1, 0, 1}, new double[]{0, 0, 1}, new double[]{0, 0, 0}};
|
||||
for (double[] ints : possibleOffsetsHome) {
|
||||
Vec3d potentialHome = entityPos.add(ints[0], ints[1], ints[2]);
|
||||
boolean matches = Arrays.stream(buildOffsetsBig).allMatch(ints1 -> {
|
||||
|
|
|
@ -19,14 +19,12 @@ import net.shadow.client.helper.Rotations;
|
|||
import net.shadow.client.helper.render.Renderer;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.Objects;
|
||||
|
||||
public class FireballDeflector extends Module {
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.DeflectSomewhere).name("Mode")
|
||||
.description("How to change the fireball's motion (ReflectBack = reflect back at shooter, DeflectSomewhere = idc get it away)").get());
|
||||
final BooleanSetting checkVel = this.config.create(new BooleanSetting.Builder(false).name("Check velocity")
|
||||
.description("Checks if the fireball is actually approaching before hitting. Can get funky with a lot of them").get());
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.DeflectSomewhere).name("Mode").description("How to change the fireball's motion (ReflectBack = reflect back at shooter, DeflectSomewhere = idc get it away)").get());
|
||||
final BooleanSetting checkVel = this.config.create(new BooleanSetting.Builder(false).name("Check velocity").description("Checks if the fireball is actually approaching before hitting. Can get funky with a lot of them").get());
|
||||
|
||||
public FireballDeflector() {
|
||||
super("FireballDeflector", "Deflects (or reflects) fireballs in your hit range", ModuleType.COMBAT);
|
||||
|
@ -98,12 +96,10 @@ public class FireballDeflector extends Module {
|
|||
if (entity instanceof FireballEntity fe) {
|
||||
if (fe.getOwner() != null) {
|
||||
Entity owner = fe.getOwner();
|
||||
Renderer.R3D.renderLine(Utils.getInterpolatedEntityPosition(owner).add(0, owner.getHeight() / 2, 0), Utils.getInterpolatedEntityPosition(fe)
|
||||
.add(0, fe.getHeight() / 2, 0), Color.MAGENTA, matrices);
|
||||
Renderer.R3D.renderLine(Utils.getInterpolatedEntityPosition(owner).add(0, owner.getHeight() / 2, 0), Utils.getInterpolatedEntityPosition(fe).add(0, fe.getHeight() / 2, 0), Color.MAGENTA, matrices);
|
||||
}
|
||||
if (inHitRange(Objects.requireNonNull(ShadowMain.client.player), fe)) {
|
||||
Renderer.R3D.renderLine(Utils.getInterpolatedEntityPosition(ShadowMain.client.player)
|
||||
.add(0, ShadowMain.client.player.getHeight() / 2, 0), Utils.getInterpolatedEntityPosition(fe).add(0, fe.getHeight() / 2, 0), Color.RED, matrices);
|
||||
Renderer.R3D.renderLine(Utils.getInterpolatedEntityPosition(ShadowMain.client.player).add(0, ShadowMain.client.player.getHeight() / 2, 0), Utils.getInterpolatedEntityPosition(fe).add(0, fe.getHeight() / 2, 0), Color.RED, matrices);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public class Fling extends Module {
|
|||
|
||||
public Fling() {
|
||||
super("Fling", "Fling players in the air", ModuleType.COMBAT);
|
||||
// Events.registerEventHandlerClass(this);
|
||||
// Events.registerEventHandlerClass(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,11 +61,14 @@ public class Fling extends Module {
|
|||
|
||||
@EventListener(type = EventType.PACKET_SEND)
|
||||
void sendPacket(PacketEvent event) {
|
||||
if (!this.isEnabled()) return;
|
||||
if (!not) return;
|
||||
if (!this.isEnabled())
|
||||
return;
|
||||
if (!not)
|
||||
return;
|
||||
if (event.getPacket() instanceof PlayerInteractItemC2SPacket) {
|
||||
if (client.player.getInventory().getMainHandStack().getItem() == Items.FISHING_ROD && (client.player.fishHook != null)) {
|
||||
if (client.player.fishHook.isRemoved()) return;
|
||||
if (client.player.fishHook.isRemoved())
|
||||
return;
|
||||
client.player.setVelocity(Vec3d.ZERO);
|
||||
event.setCancelled(true);
|
||||
new Thread(() -> {
|
||||
|
|
|
@ -47,8 +47,7 @@ public class Killaura extends Module {
|
|||
final BooleanSetting automaticDelay = this.config.create(new BooleanSetting.Builder(true).name("Auto delay").description("Whether or not to automatically calculate perfect delay").get());
|
||||
final DoubleSetting delay = this.config.create(new DoubleSetting.Builder(0).name("Delay").description("How much to wait between attacks").min(0).max(20).precision(1).get());
|
||||
|
||||
final BooleanSetting attackOnlyCombatPartner = this.config.create(new BooleanSetting.Builder(true).name("Attack only combat").description("Whether or not to only aim at the combat partner")
|
||||
.get());
|
||||
final BooleanSetting attackOnlyCombatPartner = this.config.create(new BooleanSetting.Builder(true).name("Attack only combat").description("Whether or not to only aim at the combat partner").get());
|
||||
final BooleanSetting attackPlayers = this.config.create(new BooleanSetting.Builder(true).name("Attack players").description("Whether or not to aim at players").get());
|
||||
final BooleanSetting attackHostile = this.config.create(new BooleanSetting.Builder(true).name("Attack hostile").description("Whether or not to aim at hostile entities").get());
|
||||
final BooleanSetting attackNeutral = this.config.create(new BooleanSetting.Builder(true).name("Attack neutral").description("Whether or not to aim at neutral entities").get());
|
||||
|
|
|
@ -24,7 +24,7 @@ public class ReverseKnockback extends Module {
|
|||
|
||||
public ReverseKnockback() {
|
||||
super("ReverseKnockback", "Reverse the knockback you deal", ModuleType.MISC);
|
||||
// Events.registerEventHandlerClass(this);
|
||||
// Events.registerEventHandlerClass(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,7 +57,8 @@ public class ReverseKnockback extends Module {
|
|||
|
||||
@EventListener(type = EventType.PACKET_SEND)
|
||||
void packetSend(PacketEvent event) {
|
||||
if (!this.isEnabled()) return;
|
||||
if (!this.isEnabled())
|
||||
return;
|
||||
if (event.getPacket() instanceof PlayerMoveC2SPacket packet) {
|
||||
if (dontRepeat.contains(packet)) {
|
||||
dontRepeat.remove(packet);
|
||||
|
|
|
@ -25,7 +25,7 @@ import net.shadow.client.helper.event.events.PacketEvent;
|
|||
import net.shadow.client.helper.render.Renderer;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
@ -33,8 +33,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
|
||||
public class TpRange extends Module {
|
||||
static final ExecutorService esv = Executors.newFixedThreadPool(1);
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.PaperBypass).name("Mode")
|
||||
.description("How to exploit the range, Instant works on vanilla, PaperBypass on almost everything").get());
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.PaperBypass).name("Mode").description("How to exploit the range, Instant works on vanilla, PaperBypass on almost everything").get());
|
||||
final AtomicBoolean running = new AtomicBoolean(false);
|
||||
Vec3d spoofedPos = null;
|
||||
Vec3d previousSpoofedPos = null;
|
||||
|
@ -74,8 +73,7 @@ public class TpRange extends Module {
|
|||
void doIt() {
|
||||
Vec3d goal = Objects.requireNonNull(ShadowMain.client.player).getRotationVec(1f).multiply(200);
|
||||
Box b = ShadowMain.client.player.getBoundingBox().stretch(goal).expand(1, 1, 1);
|
||||
EntityHitResult ehr = ProjectileUtil.raycast(ShadowMain.client.player, ShadowMain.client.player.getCameraPosVec(0), ShadowMain.client.player.getCameraPosVec(0)
|
||||
.add(goal), b, Entity::isAttackable, 200 * 200);
|
||||
EntityHitResult ehr = ProjectileUtil.raycast(ShadowMain.client.player, ShadowMain.client.player.getCameraPosVec(0), ShadowMain.client.player.getCameraPosVec(0).add(goal), b, Entity::isAttackable, 200 * 200);
|
||||
if (ehr == null) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -18,10 +18,8 @@ import net.shadow.client.mixin.IEntityVelocityUpdateS2CPacketMixin;
|
|||
|
||||
public class Velocity extends Module {
|
||||
|
||||
final DoubleSetting multiplierX = this.config.create(new DoubleSetting.Builder(0.2).name("Horizontal velocity").description("How much to multiply X and Z velocity by").min(-2.5).max(2.5)
|
||||
.precision(1).get());
|
||||
final DoubleSetting multiplierY = this.config.create(new DoubleSetting.Builder(0.2).name("Vertical velocity").description("How much to multiply Y velocity by").min(-2.5).max(2.5).precision(1)
|
||||
.get());
|
||||
final DoubleSetting multiplierX = this.config.create(new DoubleSetting.Builder(0.2).name("Horizontal velocity").description("How much to multiply X and Z velocity by").min(-2.5).max(2.5).precision(1).get());
|
||||
final DoubleSetting multiplierY = this.config.create(new DoubleSetting.Builder(0.2).name("Vertical velocity").description("How much to multiply Y velocity by").min(-2.5).max(2.5).precision(1).get());
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.Modify).name("Mode").description("How to modify velocity").get());
|
||||
|
||||
public Velocity() {
|
||||
|
@ -86,4 +84,3 @@ public class Velocity extends Module {
|
|||
Modify, Ignore
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,8 @@ public class ArmorStandCrash extends Module {
|
|||
super("ArmorStandCrash", "Crash servers with armor stands in creative (really fast)", ModuleType.CRASH);
|
||||
Events.registerEventHandler(EventType.PACKET_SEND, pevent -> {
|
||||
PacketEvent event = (PacketEvent) pevent;
|
||||
if (!this.isEnabled()) return;
|
||||
if (!this.isEnabled())
|
||||
return;
|
||||
if (event.getPacket() instanceof PlayerInteractBlockC2SPacket packet) {
|
||||
for (int i = 0; i < slider.getValue(); i++) {
|
||||
ItemStack load = new ItemStack(Items.ARMOR_STAND, 1);
|
||||
|
|
|
@ -47,9 +47,12 @@ public class ClientCrasher extends Module {
|
|||
|
||||
@EventListener(type = EventType.PACKET_SEND)
|
||||
void giveAShit(PacketEvent event) {
|
||||
if (mode.getValue() != Mode.Place) return;
|
||||
if (!sends) return;
|
||||
if (!this.isEnabled()) return;
|
||||
if (mode.getValue() != Mode.Place)
|
||||
return;
|
||||
if (!sends)
|
||||
return;
|
||||
if (!this.isEnabled())
|
||||
return;
|
||||
if (!(event.getPacket() instanceof PlayerMoveC2SPacket packet))
|
||||
return;
|
||||
|
||||
|
@ -71,8 +74,7 @@ public class ClientCrasher extends Module {
|
|||
if (packet instanceof PlayerMoveC2SPacket.PositionAndOnGround)
|
||||
newPacket = new PlayerMoveC2SPacket.PositionAndOnGround(x, y + r.nextDouble(), z, true);
|
||||
else
|
||||
newPacket = new PlayerMoveC2SPacket.Full(x, y + r.nextDouble(), z, packet.getYaw(0),
|
||||
packet.getPitch(0), true);
|
||||
newPacket = new PlayerMoveC2SPacket.Full(x, y + r.nextDouble(), z, packet.getYaw(0), packet.getPitch(0), true);
|
||||
sends = false;
|
||||
client.player.networkHandler.getConnection().send(newPacket);
|
||||
sends = true;
|
||||
|
@ -91,7 +93,8 @@ public class ClientCrasher extends Module {
|
|||
client.player.updatePosition(selectedbreaker.getX() + 0.5, selectedbreaker.getY() + 1, selectedbreaker.getZ() + 0.5);
|
||||
int b4slot = client.player.getInventory().selectedSlot;
|
||||
int slot = TheJ();
|
||||
if (slot == -1) return;
|
||||
if (slot == -1)
|
||||
return;
|
||||
if (client.player.world.getBlockState(selectedbreaker).isAir()) {
|
||||
client.player.getInventory().selectedSlot = slot;
|
||||
client.interactionManager.interactBlock(client.player, client.world, Hand.MAIN_HAND, new BlockHitResult(new Vec3d(selectedbreaker.getX(), selectedbreaker.getY(), selectedbreaker.getZ()).add(0.5, 0.5, 0.5), Direction.UP, selectedbreaker, false));
|
||||
|
@ -173,9 +176,6 @@ public class ClientCrasher extends Module {
|
|||
}
|
||||
|
||||
public enum Mode {
|
||||
Place,
|
||||
Offhand,
|
||||
Lagbook,
|
||||
Poof
|
||||
Place, Offhand, Lagbook, Poof
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,8 @@ public class CraftCrash extends Module {
|
|||
|
||||
@EventListener(type = EventType.PACKET_SEND)
|
||||
public void onPacketSend(PacketEvent event) {
|
||||
if (!this.isEnabled()) return;
|
||||
if (!this.isEnabled())
|
||||
return;
|
||||
if (event.getPacket() instanceof CraftRequestC2SPacket packet) {
|
||||
if (isListening) {
|
||||
if (stick == null) {
|
||||
|
|
|
@ -22,7 +22,8 @@ public class EntityCrash extends Module {
|
|||
|
||||
public Entity getNearestLikelyEntity() {
|
||||
for (Entity ent : client.world.getEntities()) {
|
||||
if (distanceTo(ent) > 5 || ent == client.player) continue;
|
||||
if (distanceTo(ent) > 5 || ent == client.player)
|
||||
continue;
|
||||
return ent;
|
||||
}
|
||||
return null;
|
||||
|
@ -38,7 +39,8 @@ public class EntityCrash extends Module {
|
|||
@Override
|
||||
public void tick() {
|
||||
target = getNearestLikelyEntity();
|
||||
if (target == null) return;
|
||||
if (target == null)
|
||||
return;
|
||||
for (int i = 0; i < repeat.getValue(); i++) {
|
||||
client.player.networkHandler.sendPacket(PlayerInteractEntityC2SPacket.attack(target, client.player.isSneaking()));
|
||||
}
|
||||
|
|
|
@ -78,8 +78,6 @@ public class ErrorCrash extends Module {
|
|||
|
||||
|
||||
public enum Mode {
|
||||
Click,
|
||||
Trade,
|
||||
Button
|
||||
Click, Trade, Button
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public class FlightCrash extends Module {
|
|||
|
||||
public FlightCrash() {
|
||||
super("FlightCrash", "Generates a ton of chunks", ModuleType.CRASH);
|
||||
// Events.registerEventHandlerClass(this);
|
||||
// Events.registerEventHandlerClass(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -66,8 +66,10 @@ public class FlightCrash extends Module {
|
|||
|
||||
@EventListener(type = EventType.PACKET_SEND)
|
||||
void onSentPacket(PacketEvent event) {
|
||||
if (!this.isEnabled()) return;
|
||||
if (!capture) return;
|
||||
if (!this.isEnabled())
|
||||
return;
|
||||
if (!capture)
|
||||
return;
|
||||
|
||||
if (!(event.getPacket() instanceof PlayerMoveC2SPacket packet))
|
||||
return;
|
||||
|
@ -89,8 +91,7 @@ public class FlightCrash extends Module {
|
|||
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);
|
||||
newPacket = new PlayerMoveC2SPacket.Full(x, y + randomboolnum(), z, packet.getYaw(0), packet.getPitch(0), true);
|
||||
|
||||
capture = false;
|
||||
client.player.networkHandler.getConnection().send(newPacket);
|
||||
|
|
|
@ -28,7 +28,7 @@ public class InteractCrash extends Module {
|
|||
|
||||
public InteractCrash() {
|
||||
super("InteractCrash", "Crash using interaction packets", ModuleType.CRASH);
|
||||
// Events.registerEventHandlerClass(this);
|
||||
// Events.registerEventHandlerClass(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -36,7 +36,8 @@ public class InteractCrash extends Module {
|
|||
switch (mode.getValue()) {
|
||||
case Block -> {
|
||||
BlockHitResult bhr = (BlockHitResult) client.crosshairTarget;
|
||||
if (client.world.getBlockState(bhr.getBlockPos()).isAir()) return;
|
||||
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));
|
||||
}
|
||||
|
@ -64,7 +65,8 @@ public class InteractCrash extends Module {
|
|||
|
||||
@EventListener(type = EventType.PACKET_RECEIVE)
|
||||
void onGotPacket(PacketEvent event) {
|
||||
if (!this.isEnabled()) return;
|
||||
if (!this.isEnabled())
|
||||
return;
|
||||
if (event.getPacket() instanceof OpenScreenS2CPacket packet) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
@ -94,8 +96,6 @@ public class InteractCrash extends Module {
|
|||
}
|
||||
|
||||
public enum Mode {
|
||||
Block,
|
||||
Item,
|
||||
Entity
|
||||
Block, Item, Entity
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,8 @@ public class LoominaCrash extends Module {
|
|||
Notification.create(1000, "Loomina", Notification.Type.ERROR, "out of dye!");
|
||||
}
|
||||
} else {
|
||||
if (this.expl != null) expl.duration = 0;
|
||||
if (this.expl != null)
|
||||
expl.duration = 0;
|
||||
expl = null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,8 @@ public class MinehutCrash extends Module {
|
|||
|
||||
@EventListener(type = EventType.PACKET_RECEIVE)
|
||||
void blockBounces(PacketEvent event) {
|
||||
if (this.isEnabled() && this.bb.getValue()) event.setCancelled(true);
|
||||
if (this.isEnabled() && this.bb.getValue())
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,9 +19,7 @@ import net.shadow.client.helper.util.Utils;
|
|||
import java.util.Objects;
|
||||
|
||||
public class OOBCrash extends Module {
|
||||
final Step[] bogusSteps = new Step[]{new Step("Exploiting packet handler", 2000), new Step("Attempting to override isValid(Lnet/minecraft/util/math/Vec3d;)Z method", 1000),
|
||||
new Step("Packet handler dump: 0x05 0x13 0x11 0x92 (INJECTING HERE) 0x00 0x00 0x00 0x00", 2000), new Step("Requesting out of bounds", 1000), new Step("Sending packet", 100),
|
||||
new Step("Overwriting isValid:Z", 100), new Step("Cancelling packet checks", 100), new Step("Finalizing", 1000), new Step("", 1000)};
|
||||
final Step[] bogusSteps = new Step[]{new Step("Exploiting packet handler", 2000), new Step("Attempting to override isValid(Lnet/minecraft/util/math/Vec3d;)Z method", 1000), new Step("Packet handler dump: 0x05 0x13 0x11 0x92 (INJECTING HERE) 0x00 0x00 0x00 0x00", 2000), new Step("Requesting out of bounds", 1000), new Step("Sending packet", 100), new Step("Overwriting isValid:Z", 100), new Step("Cancelling packet checks", 100), new Step("Finalizing", 1000), new Step("", 1000)};
|
||||
long startTime = System.currentTimeMillis();
|
||||
Step current;
|
||||
|
||||
|
@ -35,8 +33,7 @@ public class OOBCrash extends Module {
|
|||
}
|
||||
|
||||
void doIt() {
|
||||
BlockHitResult bhr = new BlockHitResult(Objects.requireNonNull(ShadowMain.client.player)
|
||||
.getPos(), Direction.DOWN, new BlockPos(new Vec3d(Double.POSITIVE_INFINITY, 100, Double.NEGATIVE_INFINITY)), false);
|
||||
BlockHitResult bhr = new BlockHitResult(Objects.requireNonNull(ShadowMain.client.player).getPos(), Direction.DOWN, new BlockPos(new Vec3d(Double.POSITIVE_INFINITY, 100, Double.NEGATIVE_INFINITY)), false);
|
||||
PlayerInteractBlockC2SPacket p = new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, bhr);
|
||||
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(p);
|
||||
Utils.Logging.message("Wait a bit for this to complete, the server will run fine until it autosaves the world. After that, it will just brick itself.");
|
||||
|
@ -87,4 +84,3 @@ public class OOBCrash extends Module {
|
|||
record Step(String t, long takes) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,11 +7,7 @@ package net.shadow.client.feature.module.impl.crash;
|
|||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
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.nbt.*;
|
||||
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
|
||||
import net.minecraft.util.Hand;
|
||||
|
|
|
@ -23,7 +23,7 @@ import net.shadow.client.feature.module.impl.world.XRAY;
|
|||
import net.shadow.client.helper.render.Renderer;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -35,14 +35,12 @@ public class AntiAntiXray extends Module {
|
|||
final List<BlockPos> renders = new ArrayList<>();
|
||||
final List<BlockPos> visitsAfter = new ArrayList<>();
|
||||
final DoubleSetting range = this.config.create(new DoubleSetting.Builder(16).name("Range").description("How far to scan").min(2).max(64).precision(0).get());
|
||||
final DoubleSetting customYSize = this.config.create(new DoubleSetting.Builder(-1).name("Custom Y size").description("Custom Y size of the scanner box (-1 to disable)").min(-1).max(128)
|
||||
.precision(0).get());
|
||||
final DoubleSetting customYSize = this.config.create(new DoubleSetting.Builder(-1).name("Custom Y size").description("Custom Y size of the scanner box (-1 to disable)").min(-1).max(128).precision(0).get());
|
||||
final DoubleSetting skipDistance = this.config.create(new DoubleSetting.Builder(2).name("Skip distance").description("In which interval to skip blocks").min(0).max(6).precision(1).get());
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.Ores).name("Mode").description("Which blocks to scan").get());
|
||||
final DoubleSetting blocksPerTick = this.config.create(new DoubleSetting.Builder(10).name("Blocks per tick").description("How many blocks to scan per tick").min(1).max(20).precision(0).get());
|
||||
final DoubleSetting delay = this.config.create(new DoubleSetting.Builder(0).name("Delay").description("How much to wait between scan bursts").min(0).max(20).precision(0).get());
|
||||
final BooleanSetting showAura = this.config.create(new BooleanSetting.Builder(false).name("Show aura").description("Shows a nice effect around the scanner (VERY performance intensive)")
|
||||
.get());
|
||||
final BooleanSetting showAura = this.config.create(new BooleanSetting.Builder(false).name("Show aura").description("Shows a nice effect around the scanner (VERY performance intensive)").get());
|
||||
// final SliderValue customYSize = (SliderValue) this.config.create("Custom Y size", -1, -1, 255, 0).description("Custom Y size of scanner box (-1 to disable)");
|
||||
List<BlockPos> permanentToScan = new ArrayList<>();
|
||||
Vec3d startPos;
|
||||
|
@ -196,4 +194,3 @@ public class AntiAntiXray extends Module {
|
|||
Ores, Stone, Diamond, Redstone, Iron, Netherite, Everything
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import net.shadow.client.feature.module.ModuleType;
|
|||
import net.shadow.client.helper.render.Renderer;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.Objects;
|
||||
|
||||
public class BoatCrash extends Module {
|
||||
|
@ -88,4 +88,3 @@ public class BoatCrash extends Module {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,13 +17,7 @@ import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
|
|||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.hit.EntityHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Box;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Quaternion;
|
||||
import net.minecraft.util.math.Vec2f;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.*;
|
||||
import net.minecraft.world.RaycastContext;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.config.DoubleSetting;
|
||||
|
@ -39,7 +33,7 @@ import net.shadow.client.helper.event.events.MouseEvent;
|
|||
import net.shadow.client.helper.render.Renderer;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -50,8 +44,7 @@ public class CarpetBomb extends Module {
|
|||
final DoubleSetting spacing = this.config.create(new DoubleSetting.Builder(2).name("Spacing").description("How far away the fireballs should be").min(0.1).max(10).precision(1).get());
|
||||
final DoubleSetting speed = this.config.create(new DoubleSetting.Builder(5).name("Speed").description("Speed of the fired fireball").min(0.01).max(1).precision(3).get());
|
||||
final DoubleSetting power = this.config.create(new DoubleSetting.Builder(10).name("Power").description("How powerful the fireballs are gonna be").min(0).max(127).precision(0).get());
|
||||
final DoubleSetting spawnDelay = this.config.create(new DoubleSetting.Builder(10).name("Delay").description("How long to wait until spawning another fireball").min(10).max(500).precision(0)
|
||||
.get());
|
||||
final DoubleSetting spawnDelay = this.config.create(new DoubleSetting.Builder(10).name("Delay").description("How long to wait until spawning another fireball").min(10).max(500).precision(0).get());
|
||||
final Timer spawnTimer = new Timer();
|
||||
List<Entity> positions = new ArrayList<>();
|
||||
net.minecraft.entity.Entity eTarget = null;
|
||||
|
@ -77,8 +70,7 @@ public class CarpetBomb extends Module {
|
|||
if (mode.getValue() == Mode.Entity) {
|
||||
Vec3d goal = Objects.requireNonNull(ShadowMain.client.player).getRotationVec(1f).multiply(200);
|
||||
Box b = ShadowMain.client.player.getBoundingBox().stretch(goal).expand(1, 1, 1);
|
||||
EntityHitResult ehr = ProjectileUtil.raycast(ShadowMain.client.player, ShadowMain.client.player.getCameraPosVec(0), ShadowMain.client.player.getCameraPosVec(0)
|
||||
.add(goal), b, net.minecraft.entity.Entity::isAttackable, 200 * 200);
|
||||
EntityHitResult ehr = ProjectileUtil.raycast(ShadowMain.client.player, ShadowMain.client.player.getCameraPosVec(0), ShadowMain.client.player.getCameraPosVec(0).add(goal), b, net.minecraft.entity.Entity::isAttackable, 200 * 200);
|
||||
if (ehr == null) {
|
||||
Notification.create(6000, "Error", false, Notification.Type.ERROR, "You aren't looking at an entity");
|
||||
return;
|
||||
|
@ -89,8 +81,7 @@ public class CarpetBomb extends Module {
|
|||
for (int oz = -10; oz < 11; oz++) {
|
||||
Vec3d off = new Vec3d(ox, oz, 0);
|
||||
off = off.multiply(spacing.getValue());
|
||||
Vec3d a = Rotations.relativeToAbsolute(Objects.requireNonNull(ShadowMain.client.player)
|
||||
.getCameraPosVec(ShadowMain.client.getTickDelta()), ShadowMain.client.player.getRotationClient(), off);
|
||||
Vec3d a = Rotations.relativeToAbsolute(Objects.requireNonNull(ShadowMain.client.player).getCameraPosVec(ShadowMain.client.getTickDelta()), ShadowMain.client.player.getRotationClient(), off);
|
||||
Vec3d rot = switch (mode.getValue()) {
|
||||
case Relative -> ShadowMain.client.player.getRotationVector();
|
||||
case Focussed -> {
|
||||
|
@ -162,8 +153,7 @@ public class CarpetBomb extends Module {
|
|||
motion.add(NbtDouble.of(vel.z));
|
||||
entityTag.put("power", motion);
|
||||
entityTag.put("ExplosionPower", NbtDouble.of(power.getValue()));
|
||||
CreativeInventoryActionC2SPacket set = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(Objects.requireNonNull(ShadowMain.client.player)
|
||||
.getInventory().selectedSlot), spawnEgg);
|
||||
CreativeInventoryActionC2SPacket set = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(Objects.requireNonNull(ShadowMain.client.player).getInventory().selectedSlot), spawnEgg);
|
||||
CreativeInventoryActionC2SPacket clr = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot), new ItemStack(Items.AIR));
|
||||
BlockHitResult bhr = new BlockHitResult(ShadowMain.client.player.getPos(), Direction.DOWN, new BlockPos(ShadowMain.client.player.getPos()), false);
|
||||
PlayerInteractBlockC2SPacket put = new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, bhr);
|
||||
|
|
|
@ -26,10 +26,8 @@ import java.util.Random;
|
|||
|
||||
public class ChunkCrash extends Module {
|
||||
final Random r = new Random();
|
||||
final DoubleSetting packets = this.config.create(new DoubleSetting.Builder(5).precision(0).name("Packets per tick").description("How many crash packets to send per tick").min(1).max(100)
|
||||
.get());
|
||||
final EnumSetting<Method> method = this.config.create(new EnumSetting.Builder<>(Method.Interact).name("Method")
|
||||
.description("Chunk loading method. Interact works on vanilla/spigot, Creative on creative mode").get());
|
||||
final DoubleSetting packets = this.config.create(new DoubleSetting.Builder(5).precision(0).name("Packets per tick").description("How many crash packets to send per tick").min(1).max(100).get());
|
||||
final EnumSetting<Method> method = this.config.create(new EnumSetting.Builder<>(Method.Interact).name("Method").description("Chunk loading method. Interact works on vanilla/spigot, Creative on creative mode").get());
|
||||
int i = 0;
|
||||
|
||||
public ChunkCrash() {
|
||||
|
@ -98,4 +96,3 @@ public class ChunkCrash extends Module {
|
|||
Interact, Creative, ChunkERR
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,12 +11,7 @@ import net.minecraft.item.Items;
|
|||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.nbt.NbtString;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.network.packet.c2s.play.AdvancementTabC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.CustomPayloadC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.SelectMerchantTradeC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.UpdateSelectedSlotC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.*;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.shadow.client.feature.config.EnumSetting;
|
||||
import net.shadow.client.feature.gui.notifications.Notification;
|
||||
|
@ -98,9 +93,6 @@ public class ConsoleSpammer extends Module {
|
|||
}
|
||||
|
||||
public enum Mode {
|
||||
Book,
|
||||
Merchant,
|
||||
Move,
|
||||
BadPackets
|
||||
Book, Merchant, Move, BadPackets
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ public class FilterBypass extends Module {
|
|||
|
||||
public FilterBypass() {
|
||||
super("FilterBypass", "Bypass chat filters", ModuleType.EXPLOIT);
|
||||
// Events.registerEventHandlerClass(this);
|
||||
// Events.registerEventHandlerClass(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -41,8 +41,9 @@ public class FilterBypass extends Module {
|
|||
|
||||
@EventListener(type = EventType.PACKET_SEND)
|
||||
void onSendPacket(PacketEvent event) {
|
||||
// if (!this.isEnabled()) return;
|
||||
if (!blockPackets) return;
|
||||
// if (!this.isEnabled()) return;
|
||||
if (!blockPackets)
|
||||
return;
|
||||
if (event.getPacket() instanceof ChatMessageC2SPacket packet) {
|
||||
String message = packet.getChatMessage();
|
||||
if (message.startsWith("/")) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue