1
0
Fork 0
mirror of https://github.com/Miasmusa/Shadow.git synced 2025-04-22 01:03:26 -04:00

jesse im changing formatting definitions

This commit is contained in:
0x3C50 2022-05-02 23:54:00 +02:00
parent 15bc5b1bda
commit a19b6c7bd0
157 changed files with 779 additions and 596 deletions
src/main/java/net/shadow/client
ShadowMain.java
feature
addon
command
config
gui
items
module

View file

@ -28,7 +28,8 @@ import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.awt.*;
import java.awt.Font;
import java.awt.FontFormatException;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;

View file

@ -29,7 +29,11 @@ import java.nio.file.FileVisitor;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
@ -38,21 +42,17 @@ 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);
@ -158,8 +158,7 @@ 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) {
@ -198,29 +197,25 @@ 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() {
@ -248,8 +243,7 @@ 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();

View file

@ -6,7 +6,61 @@ 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.*;
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.helper.util.Utils;
import java.util.ArrayList;
@ -123,8 +177,7 @@ 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();

View file

@ -23,11 +23,9 @@ 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");

View file

@ -19,8 +19,7 @@ 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) {

View file

@ -16,8 +16,7 @@ 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;

View file

@ -8,7 +8,7 @@ import net.minecraft.client.network.AbstractClientPlayerEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import java.awt.*;
import java.awt.Color;
public enum ArgumentType {
STRING(new Color(0x55FF55), String.class),

View file

@ -6,8 +6,7 @@ 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];
}
}

View file

@ -33,8 +33,7 @@ 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);

View file

@ -9,7 +9,11 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import net.minecraft.text.*;
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.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import net.shadow.client.feature.command.coloring.ArgumentType;

View file

@ -26,8 +26,7 @@ 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)");

View file

@ -34,15 +34,13 @@ 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));
}

View file

@ -37,8 +37,7 @@ 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);
}
}

View file

@ -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.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -49,8 +49,7 @@ 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);

View file

@ -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.*;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.InputStream;
import java.net.HttpURLConnection;
@ -38,8 +38,7 @@ 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:")) {

View file

@ -36,8 +36,7 @@ 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.");
@ -83,8 +82,7 @@ public class ItemData extends Command {
return;
}
if (slot < 9)
slot += 36;
if (slot < 9) slot += 36;
CreativeInventoryActionC2SPacket packet = new CreativeInventoryActionC2SPacket(slot, stack);
ShadowMain.client.player.networkHandler.sendPacket(packet);

View file

@ -78,8 +78,7 @@ 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) {
@ -87,16 +86,14 @@ public class ItemExploit extends Command {
argStack = new StringBuilder();
}
}
if (!argStack.isEmpty())
argsWhitespaced.add(argStack.toString().trim());
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 {
@ -110,14 +107,12 @@ 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) {

View file

@ -33,8 +33,7 @@ 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);

View file

@ -10,7 +10,11 @@ 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.*;
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.text.Text;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;

View file

@ -143,7 +143,7 @@ public class Kill extends Command {
if (player.equals(ShadowMain.client.player)) {
continue;
}
onExecute(new String[]{player.getGameProfile().getName()});
onExecute(new String[] { player.getGameProfile().getName() });
}
return;
}
@ -195,7 +195,7 @@ public class Kill extends Command {
error("Couldn't find user's uuid. If you know it, run the command again with \"U(uuid)\"");
return;
}
onExecute(new String[]{"U" + u});
onExecute(new String[] { "U" + u });
return;
}
if (targets.size() > 1) {

View file

@ -40,7 +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();

View file

@ -60,8 +60,7 @@ 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)"));
}
@ -86,8 +85,7 @@ 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");
}

View file

@ -15,7 +15,12 @@ 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.*;
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.util.Arm;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
@ -169,7 +174,7 @@ public class ServerCrash extends Command {
private String rndStr(int size) {
StringBuilder buf = new StringBuilder();
String[] chars = new String[]{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};
String[] chars = new String[] { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" };
Random r = new Random();
for (int i = 0; i < size; i++) {
buf.append(chars[r.nextInt(chars.length)]);

View file

@ -11,7 +11,11 @@ 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.*;
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.text.Text;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;

View file

@ -56,8 +56,7 @@ public class SpawnData extends Command {
case "position" -> {
validateArgumentsLength(args, 4, "Provide X, Y and Z coordinates");
ItemStack stack = ShadowMain.client.player.getInventory().getMainHandStack();
if (!stack.hasNbt())
stack.setNbt(new NbtCompound());
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()))));
NbtCompound tag = ng.toCompound();
@ -68,8 +67,7 @@ public class SpawnData extends Command {
case "velocity" -> {
validateArgumentsLength(args, 4, "Provide X, Y and Z velocity");
ItemStack stack = ShadowMain.client.player.getInventory().getMainHandStack();
if (!stack.hasNbt())
stack.setNbt(new NbtCompound());
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()))));
NbtCompound tag = ng.toCompound();
stack.getOrCreateNbt().copyFrom(tag);
@ -78,8 +76,7 @@ public class SpawnData extends Command {
}
case "cursor" -> {
ItemStack stack = ShadowMain.client.player.getInventory().getMainHandStack();
if (!stack.hasNbt())
stack.setNbt(new NbtCompound());
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))));
NbtCompound tag = ng.toCompound();

View file

@ -108,8 +108,7 @@ 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();

View file

@ -5,7 +5,16 @@
package net.shadow.client.feature.command.impl;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.*;
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.text.Text;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;

View file

@ -4,7 +4,7 @@
package net.shadow.client.feature.config;
import java.awt.*;
import java.awt.Color;
import java.util.function.Consumer;
public class ColorSetting extends SettingBase<Color> {

View file

@ -90,8 +90,7 @@ public abstract class SettingBase<V> {
public void setValue(V 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() {

View file

@ -27,10 +27,16 @@ import net.shadow.client.helper.render.Renderer;
import net.shadow.client.helper.util.Transitions;
import org.lwjgl.glfw.GLFW;
import java.awt.*;
import java.awt.Color;
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.*;
import java.util.Map;
import java.util.Objects;
public class ClickGUI extends Screen implements FastTickable {
// public static final Theme theme = new SipoverV1();
@ -71,15 +77,13 @@ 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) {
@ -96,8 +100,7 @@ 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);
}
}
@ -150,8 +153,7 @@ 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);
}

View file

@ -5,7 +5,12 @@
package net.shadow.client.feature.gui.clickgui;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.render.*;
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.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Matrix4f;
@ -17,7 +22,7 @@ import net.shadow.client.helper.render.Renderer;
import net.shadow.client.helper.util.Transitions;
import org.lwjgl.opengl.GL11;
import java.awt.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;

View file

@ -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.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@ -115,8 +115,7 @@ 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());
@ -195,8 +194,7 @@ 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,8 +221,7 @@ 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()) {

View file

@ -5,10 +5,22 @@
package net.shadow.client.feature.gui.clickgui.element.impl;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.feature.config.*;
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.gui.clickgui.ClickGUI;
import net.shadow.client.feature.gui.clickgui.element.Element;
import net.shadow.client.feature.gui.clickgui.element.impl.config.*;
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.theme.Theme;
import net.shadow.client.feature.gui.clickgui.theme.ThemeManager;
import net.shadow.client.helper.render.Renderer;
@ -63,12 +75,10 @@ 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;
@ -156,8 +166,7 @@ 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);
}

View file

@ -121,8 +121,7 @@ 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);
}

View file

@ -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.*;
import java.awt.Color;
import static java.lang.Math.pow;
@ -96,15 +96,14 @@ 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()) {
@ -122,8 +121,7 @@ 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;
}
@ -166,8 +164,7 @@ 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()) {

View file

@ -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.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;

View file

@ -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.*;
import java.awt.Color;
import java.lang.reflect.Field;
public class KeybindEditor extends ConfigBase<DoubleSetting> {
@ -57,8 +57,7 @@ public class KeybindEditor extends ConfigBase<DoubleSetting> {
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;
@ -90,8 +89,7 @@ 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);

View file

@ -4,7 +4,7 @@
package net.shadow.client.feature.gui.clickgui.theme;
import java.awt.*;
import java.awt.Color;
public interface Theme {
String getName();

View file

@ -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.*;
import java.awt.Color;
public class Coffee implements Theme {

View file

@ -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.*;
import java.awt.Color;
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);

View file

@ -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.*;
import java.awt.Color;
public class Shadow implements Theme {
static final Color accent = new Color(214, 255, 255);

View file

@ -9,7 +9,12 @@ 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.*;
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.screen.HudEditorScreen;
import net.shadow.client.helper.event.EventType;
import net.shadow.client.helper.event.Events;

View file

@ -21,7 +21,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.*;
import java.awt.Color;
public class RadarElement extends HudElement {
public RadarElement() {
@ -53,8 +53,7 @@ public class RadarElement extends HudElement {
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) {

View file

@ -23,8 +23,7 @@ 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;
}

View file

@ -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.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;

View file

@ -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.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;

View file

@ -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.*;
import java.awt.Color;
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
public class HudNotification {

View file

@ -23,7 +23,7 @@ public class HudNotificationRenderer {
public void render(MatrixStack stack) {
notifs.removeIf(HudNotification::isDead);
double x = ShadowMain.client.getWindow().getScaledWidth() - 5;
final double[] y = {5};
final double[] y = { 5 };
MSAAFramebuffer.use(MSAAFramebuffer.MAX_SAMPLES, () -> {
for (HudNotification notif : notifs) {
notif.render(stack, x, y[0]);

View file

@ -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.*;
import java.awt.Color;
public class PanelButton extends Element {
static final double h = FontRenderers.getRenderer().getFontHeight() + 2;

View file

@ -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.*;
import java.awt.Color;
import java.util.HashMap;
public class PanelFrame extends Element implements FastTickable {
@ -31,7 +31,7 @@ public class PanelFrame extends Element implements FastTickable {
this.xGoal = x;
this.yGoal = y;
for (Element el : this.elements) {
positions.put(el, new double[]{el.getX(), el.getY(), el.getWidth(), el.getHeight()});
positions.put(el, new double[] { el.getX(), el.getY(), el.getWidth(), el.getHeight() });
}
}
@ -154,8 +154,7 @@ 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;

View file

@ -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.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
@ -122,10 +122,8 @@ 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();
});
@ -152,11 +150,9 @@ 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);

View file

@ -27,8 +27,11 @@ 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.*;
import net.shadow.client.helper.render.Renderer;
import net.shadow.client.helper.util.Transitions;
import net.shadow.client.mixin.IMinecraftClientAccessor;
import net.shadow.client.mixin.SessionAccessor;
@ -36,12 +39,18 @@ import org.apache.commons.io.FileUtils;
import org.apache.logging.log4j.Level;
import org.lwjgl.opengl.GL40C;
import java.awt.*;
import java.awt.Color;
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.*;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
@ -340,7 +349,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) {
@ -378,7 +387,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);
@ -396,8 +405,7 @@ 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);
@ -971,7 +979,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);

View file

@ -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.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

View file

@ -27,13 +27,17 @@ import net.shadow.client.helper.render.Renderer;
import org.apache.commons.io.IOUtils;
import org.lwjgl.opengl.GL40C;
import java.awt.*;
import java.awt.Color;
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.*;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
public class HomeScreen extends ClientScreen {
static final double padding = 6;
@ -131,8 +135,7 @@ public class HomeScreen extends ClientScreen {
if (loaded) {
updateCurrentAccount(() -> {
}); // already loaded this instance, refresh on the fly
} else
load();
} else load();
}
void complete() {

View file

@ -20,7 +20,7 @@ import net.shadow.client.helper.util.Utils;
import org.apache.logging.log4j.Level;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;

View file

@ -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.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
@ -33,8 +33,8 @@ import java.util.List;
public class NbtEditorScreen extends ClientScreen implements FastTickable {
final ItemStack stack;
final List<String> initial = new ArrayList<>();
final char[] suffixes = {'b', 's', 'L', 'f', 'd'};
final char[][] appendPairs = {{'"', '"'}, {'{', '}'}, {'\'', '\''}, {'[', ']'}};
final char[] suffixes = { 'b', 's', 'L', 'f', 'd' };
final char[][] appendPairs = { { '"', '"' }, { '{', '}' }, { '\'', '\'' }, { '[', ']' } };
int editorX = 0;
int editorY = 0;
double scrollX = 0;
@ -252,10 +252,8 @@ 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;
@ -325,7 +323,7 @@ public class NbtEditorScreen extends ClientScreen implements FastTickable {
editorY++;
initial.add(editorY, " ".repeat(indent) + overtake);
} else {
char[] control = {'{', '[', ',', '.'};
char[] control = { '{', '[', ',', '.' };
boolean isControl = false;
for (char c : control) {
if (c == previous.charAt(previous.length() - 1)) {

View file

@ -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.*;
import java.awt.Color;
public class NotificationScreen extends ClientScreen implements FastTickable {
final String t;

View file

@ -26,12 +26,15 @@ import net.shadow.client.helper.render.Renderer;
import net.shadow.client.helper.render.Scroller;
import net.shadow.client.helper.ws.SimpleWebsocket;
import java.awt.*;
import java.awt.Color;
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.*;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.function.BiConsumer;
@ -47,8 +50,7 @@ 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;
}
@ -84,15 +86,13 @@ 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,8 +121,7 @@ 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);
}
@ -130,8 +129,7 @@ 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);
}
@ -139,8 +137,7 @@ 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);
}
@ -148,8 +145,7 @@ 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);
}
@ -166,13 +162,12 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
}
Element[] getEl() {
return new Element[]{user, pass, reg};
return new Element[] { user, pass, reg };
}
@Override
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
if (user == null || pass == null || reg == null)
initWidgets();
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);
@ -195,8 +190,7 @@ 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);
}
@ -204,8 +198,7 @@ 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);
}
@ -256,8 +249,7 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
@Override
public void onFastTick() {
if (deleteBtn != null)
deleteBtn.onFastTick();
if (deleteBtn != null) deleteBtn.onFastTick();
}
@Override
@ -362,10 +354,8 @@ 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);
}
@ -414,16 +404,14 @@ 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);
}
@ -431,8 +419,7 @@ 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);
}
@ -440,8 +427,7 @@ 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);
}
@ -463,8 +449,7 @@ 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);
}
@ -472,8 +457,7 @@ 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);
}
@ -481,8 +465,7 @@ 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);
}

View file

@ -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.*;
import java.awt.Color;
public class ProxyManagerScreen extends ClientScreen {
static final double widgetWidth = 300;

View file

@ -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.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -140,8 +140,7 @@ 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++;
@ -163,17 +162,14 @@ 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
@ -225,8 +221,7 @@ 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);
}

View file

@ -43,8 +43,7 @@ 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);
}
}

View file

@ -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.*;
import java.awt.Color;
public class TestScreen extends ClientScreen implements FastTickable {

View file

@ -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.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
@ -48,8 +48,7 @@ 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) {

View file

@ -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.*;
import java.awt.Color;
public class RoundButton implements Element, Drawable, Selectable, FastTickable, DoesMSAA, HasSpecialCursor {
@ -121,8 +121,7 @@ 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);
@ -147,8 +146,7 @@ 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;

View file

@ -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.*;
import java.awt.Color;
public class RoundTextFieldWidget implements Element, Drawable, Selectable, DoesMSAA, HasSpecialCursor {
protected final String suggestion;

View file

@ -4,7 +4,11 @@
package net.shadow.client.feature.items;
import net.shadow.client.feature.items.impl.*;
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 java.util.ArrayList;
import java.util.List;

View file

@ -17,11 +17,11 @@ public class Backdoor extends Item {
final Option<String> title = new Option<>("title", "generateForMe", String.class);
final Option<String> content = new Option<>("content", "generateForMe", String.class);
final Option<String> command = new Option<>("command", "generateForMe", String.class);
final String[] nouns = new String[]{"bird", "clock", "boy", "plastic", "duck", "teacher", "old lady", "professor", "hamster", "dog"};
final String[] verbs = new String[]{"kicked", "ran", "flew", "dodged", "sliced", "rolled", "died", "breathed", "slept", "killed"};
final String[] adjectives = new String[]{"beautiful", "lazy", "professional", "lovely", "dumb", "rough", "soft", "hot", "vibrating", "slimy"};
final String[] adverbs = new String[]{"slowly", "elegantly", "precisely", "quickly", "sadly", "humbly", "proudly", "shockingly", "calmly", "passionately"};
final String[] preposition = new String[]{"down", "into", "up", "on", "upon", "below", "above", "through", "across", "towards"};
final String[] nouns = new String[] { "bird", "clock", "boy", "plastic", "duck", "teacher", "old lady", "professor", "hamster", "dog" };
final String[] verbs = new String[] { "kicked", "ran", "flew", "dodged", "sliced", "rolled", "died", "breathed", "slept", "killed" };
final String[] adjectives = new String[] { "beautiful", "lazy", "professional", "lovely", "dumb", "rough", "soft", "hot", "vibrating", "slimy" };
final String[] adverbs = new String[] { "slowly", "elegantly", "precisely", "quickly", "sadly", "humbly", "proudly", "shockingly", "calmly", "passionately" };
final String[] preposition = new String[] { "down", "into", "up", "on", "upon", "below", "above", "through", "across", "towards" };
public Backdoor() {
super("BackdoorBook", "Makes a book that automatically runs a command when clicked viewed");

View file

@ -32,16 +32,11 @@ 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";
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;

View file

@ -53,8 +53,7 @@ public abstract class Module {
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());
}

View file

@ -7,14 +7,141 @@ 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.*;
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 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 org.apache.logging.log4j.Level;
import java.lang.reflect.Constructor;
@ -45,8 +172,7 @@ 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();
@ -90,8 +216,7 @@ public class ModuleRegistry {
}
private static void initInner() {
if (initialized.get())
return;
if (initialized.get()) return;
initialized.set(true);
vanillaModules.clear();

View file

@ -20,31 +20,31 @@ import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.render.Renderer;
import java.awt.*;
import java.awt.Color;
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[][] buildOffsetsBig = new double[][]{
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},
new double[] { -.5, -1, -.5 }, new double[] { -.5, -1, .5 }, new double[] { .5, -1, .5 }, new double[] { .5, -1, -.5 },
// begin sides
// -x
new double[]{-1.5, 1, -.5}, new double[]{-1.5, 1, .5},
new double[] { -1.5, 1, -.5 }, new double[] { -1.5, 1, .5 },
// +x
new double[]{1.5, 1, -.5}, new double[]{1.5, 1, .5},
new double[] { 1.5, 1, -.5 }, new double[] { 1.5, 1, .5 },
// -z
new double[]{-.5, 1, -1.5}, new double[]{.5, 1, -1.5},
new double[] { -.5, 1, -1.5 }, new double[] { .5, 1, -1.5 },
// +z
new double[]{-.5, 1, 1.5}, new double[]{.5, 1, 1.5},
new double[] { -.5, 1, 1.5 }, new double[] { .5, 1, 1.5 },
// begin top
new double[]{-.5, 2, -.5}, new double[]{-.5, 2, .5}, new double[]{.5, 2, .5}, new double[]{.5, 2, -.5},
new double[] { -.5, 2, -.5 }, new double[] { -.5, 2, .5 }, new double[] { .5, 2, .5 }, new double[] { .5, 2, -.5 },
};
@ -64,7 +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 -> {

View file

@ -19,7 +19,7 @@ import net.shadow.client.helper.Rotations;
import net.shadow.client.helper.render.Renderer;
import net.shadow.client.helper.util.Utils;
import java.awt.*;
import java.awt.Color;
import java.util.Objects;
public class FireballDeflector extends Module {

View file

@ -61,14 +61,11 @@ 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(() -> {

View file

@ -57,8 +57,7 @@ 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);

View file

@ -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.*;
import java.awt.Color;
import java.util.Objects;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

View file

@ -27,8 +27,7 @@ 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);

View file

@ -47,14 +47,10 @@ 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 (!(event.getPacket() instanceof PlayerMoveC2SPacket packet))
return;
if (mode.getValue() != Mode.Place) return;
if (!sends) return;
if (!this.isEnabled()) return;
if (!(event.getPacket() instanceof PlayerMoveC2SPacket packet)) return;
if (!(packet instanceof PlayerMoveC2SPacket.PositionAndOnGround || packet instanceof PlayerMoveC2SPacket.Full))
return;
@ -93,8 +89,7 @@ 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));
@ -143,8 +138,7 @@ public class ClientCrasher extends Module {
private int TheJ() {
for (int i = 0; i < 9; i++) {
ItemStack stack = client.player.getInventory().getStack(i);
if (stack.isEmpty() || !(stack.getItem() instanceof BlockItem))
continue;
if (stack.isEmpty() || !(stack.getItem() instanceof BlockItem)) continue;
return i;
}

View file

@ -32,8 +32,7 @@ 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) {

View file

@ -22,8 +22,7 @@ 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;
@ -39,8 +38,7 @@ 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()));
}

View file

@ -66,13 +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;
if (!(event.getPacket() instanceof PlayerMoveC2SPacket packet)) return;
if (!(packet instanceof PlayerMoveC2SPacket.PositionAndOnGround || packet instanceof PlayerMoveC2SPacket.Full))
return;

View file

@ -36,8 +36,7 @@ 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));
}
@ -65,8 +64,7 @@ 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);
}

View file

@ -49,8 +49,7 @@ 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;
}
}

View file

@ -25,8 +25,7 @@ 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

View file

@ -19,7 +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;

View file

@ -7,7 +7,11 @@ 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.*;
import net.minecraft.nbt.NbtByte;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtInt;
import net.minecraft.nbt.NbtList;
import net.minecraft.nbt.NbtString;
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
import net.minecraft.util.Hand;
@ -80,7 +84,7 @@ public class SSRFCrash extends Module {
private String rndStr(int size) {
StringBuilder buf = new StringBuilder();
String[] chars = new String[]{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};
String[] chars = new String[] { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" };
Random r = new Random();
for (int i = 0; i < size; i++) {
buf.append(chars[r.nextInt(chars.length)]);

View file

@ -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.*;
import java.awt.Color;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.List;

View file

@ -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.*;
import java.awt.Color;
import java.util.Objects;
public class BoatCrash extends Module {

View file

@ -17,7 +17,13 @@ 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.*;
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.world.RaycastContext;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.DoubleSetting;
@ -33,7 +39,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.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

View file

@ -11,7 +11,12 @@ 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.*;
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.util.Identifier;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.gui.notifications.Notification;

View file

@ -35,8 +35,7 @@ public class Equipper extends Module {
private int getSaveSlot() {
for (int i = 0; i < 9; i++) {
if (!client.player.getInventory().getStack(i).isEmpty())
continue;
if (!client.player.getInventory().getStack(i).isEmpty()) continue;
return i + 36;
}

View file

@ -42,8 +42,7 @@ public class FilterBypass extends Module {
@EventListener(type = EventType.PACKET_SEND)
void onSendPacket(PacketEvent event) {
// if (!this.isEnabled()) return;
if (!blockPackets)
return;
if (!blockPackets) return;
if (event.getPacket() instanceof ChatMessageC2SPacket packet) {
String message = packet.getChatMessage();
if (message.startsWith("/")) {

View file

@ -24,14 +24,14 @@ import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.render.Renderer;
import net.shadow.client.helper.util.Utils;
import java.awt.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
public class AutoFireball extends Module {
final DoubleSetting radius = this.config.create(new DoubleSetting.Builder(15).max(100).min(10).name("Radius").description("The radius to search in").get());
final Block[] blocks = new Block[]{Blocks.COBBLESTONE, Blocks.GLASS, Blocks.GLASS_PANE, Blocks.OAK_DOOR, Blocks.IRON_DOOR, Blocks.BRICKS, Blocks.OAK_PLANKS, Blocks.DARK_OAK_PLANKS, Blocks.WHITE_WOOL, Blocks.BLACK_WOOL, Blocks.BARREL, Blocks.CHEST, Blocks.CRAFTING_TABLE, Blocks.FURNACE};
final Block[] blocks = new Block[] { Blocks.COBBLESTONE, Blocks.GLASS, Blocks.GLASS_PANE, Blocks.OAK_DOOR, Blocks.IRON_DOOR, Blocks.BRICKS, Blocks.OAK_PLANKS, Blocks.DARK_OAK_PLANKS, Blocks.WHITE_WOOL, Blocks.BLACK_WOOL, Blocks.BARREL, Blocks.CHEST, Blocks.CRAFTING_TABLE, Blocks.FURNACE };
final BlockPos walkman = new BlockPos(0, 0, 0);
final List<BlockPos> targets = new ArrayList<>();

View file

@ -31,8 +31,7 @@ public class AutoIgnite extends Module {
int getLighterSlot() {
for (int i = 0; i < 9; i++) {
ItemStack is = ShadowMain.client.player.getInventory().getStack(i);
if (is.getItem() == Items.FLINT_AND_STEEL)
return i;
if (is.getItem() == Items.FLINT_AND_STEEL) return i;
}
return -1;
}
@ -40,8 +39,7 @@ public class AutoIgnite extends Module {
@Override
public void tick() {
int lighterSlot = getLighterSlot();
if (lighterSlot == -1)
return;
if (lighterSlot == -1) return;
double searchRad = Math.ceil(ShadowMain.client.interactionManager.getReachDistance());
List<BlockPos> blocksToIgnite = new ArrayList<>();
for (double x = -searchRad; x < searchRad; x++) {
@ -58,8 +56,7 @@ public class AutoIgnite extends Module {
}
}
}
if (blocksToIgnite.isEmpty())
return;
if (blocksToIgnite.isEmpty()) return;
int prevSlot = ShadowMain.client.player.getInventory().selectedSlot;
ShadowMain.client.getNetworkHandler().sendPacket(new UpdateSelectedSlotC2SPacket(lighterSlot));

View file

@ -21,9 +21,13 @@ import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.render.Renderer;
import java.awt.*;
import java.awt.Color;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.*;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
public class AutoTNT extends Module {

View file

@ -15,7 +15,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.*;
import java.awt.Color;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean;

View file

@ -47,14 +47,12 @@ public class AntiCrash extends Module {
}
public static AntiCrash instance() {
if (instance == null)
instance = ModuleRegistry.getByClass(AntiCrash.class);
if (instance == null) instance = ModuleRegistry.getByClass(AntiCrash.class);
return instance;
}
void handlePacketEvent(Event e) {
if (!this.isEnabled())
return;
if (!this.isEnabled()) return;
PacketEvent pe = (PacketEvent) e;
if (pe.getPacket() instanceof OpenScreenS2CPacket && screenGui.getValue()) {
long current = System.currentTimeMillis();

View file

@ -54,21 +54,18 @@ public class IRC extends Module {
void initSock() {
this.wsS = new IRCWebSocket(URI.create(ShadowAPIWrapper.BASE_WS + "/irc"), ShadowAPIWrapper.getAuthKey(), () -> {
this.wsS = null;
if (this.isEnabled())
this.setEnabled(false);
if (this.isEnabled()) this.setEnabled(false);
});
this.wsS.connect();
}
@Override
public void disable() {
if (this.wsS != null)
this.wsS.close();
if (this.wsS != null) this.wsS.close();
}
public void reconnect() {
if (this.wsS != null)
this.wsS.close();
if (this.wsS != null) this.wsS.close();
initSock();
}

View file

@ -31,8 +31,7 @@ public class Test extends Module {
@EventListener(type = EventType.BLOCK_RENDER)
@SuppressWarnings("unused")
void onBlockRender(BlockRenderEvent event) {
if (!this.isEnabled())
return;
if (!this.isEnabled()) return;
BlockPos b = new BlockPos(event.getPosition());
boolean listContains = discovered.stream().anyMatch(blockPos -> blockPos.equals(b));
if (event.getBlockState().getBlock() == searchTerm) {

View file

@ -18,7 +18,7 @@ import net.shadow.client.helper.render.Renderer;
import net.shadow.client.helper.util.Utils;
import org.lwjgl.glfw.GLFW;
import java.awt.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;

View file

@ -13,7 +13,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.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;

Some files were not shown because too many files have changed in this diff Show more