aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/commands/dev
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <roman.graef@gmail.com>2023-03-04 02:54:50 +0100
committerGitHub <noreply@github.com>2023-03-04 12:54:50 +1100
commit5dd063fbba6bde64806a7620541dc2d9bdf42871 (patch)
tree01aee1a743a32a0b2546513c59a43559ce3085fe /src/main/java/io/github/moulberry/notenoughupdates/commands/dev
parentdb86c98e0c72b18663ef26cd46cef7d53c1d6414 (diff)
downloadnotenoughupdates-5dd063fbba6bde64806a7620541dc2d9bdf42871.tar.gz
notenoughupdates-5dd063fbba6bde64806a7620541dc2d9bdf42871.tar.bz2
notenoughupdates-5dd063fbba6bde64806a7620541dc2d9bdf42871.zip
Replace all commands in NEU with a brigadier implementation (#599)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/dev')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java292
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DiagCommand.java134
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DungeonWinTestCommand.java42
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dev/EnableStorageCommand.java39
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dev/NullzeeSphereCommand.java61
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dev/PackDevCommand.java304
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dev/ReloadRepoCommand.java39
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dev/ResetRepoCommand.java42
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dev/StatsCommand.java200
9 files changed, 0 insertions, 1153 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java
deleted file mode 100644
index 1a1400ab..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * Copyright (C) 2022 NotEnoughUpdates contributors
- *
- * This file is part of NotEnoughUpdates.
- *
- * NotEnoughUpdates is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation, either
- * version 3 of the License, or (at your option) any later version.
- *
- * NotEnoughUpdates is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package io.github.moulberry.notenoughupdates.commands.dev;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import io.github.moulberry.notenoughupdates.BuildFlags;
-import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
-import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
-import io.github.moulberry.notenoughupdates.core.config.GuiPositionEditor;
-import io.github.moulberry.notenoughupdates.core.util.MiscUtils;
-import io.github.moulberry.notenoughupdates.miscfeatures.FishingHelper;
-import io.github.moulberry.notenoughupdates.miscfeatures.customblockzones.CustomBiomes;
-import io.github.moulberry.notenoughupdates.miscfeatures.customblockzones.LocationChangeEvent;
-import io.github.moulberry.notenoughupdates.miscfeatures.customblockzones.SpecialBlockZone;
-import io.github.moulberry.notenoughupdates.miscgui.GuiPriceGraph;
-import io.github.moulberry.notenoughupdates.miscgui.minionhelper.MinionHelperManager;
-import io.github.moulberry.notenoughupdates.util.ApiCache;
-import io.github.moulberry.notenoughupdates.util.PronounDB;
-import io.github.moulberry.notenoughupdates.util.SBInfo;
-import io.github.moulberry.notenoughupdates.util.TabListUtils;
-import io.github.moulberry.notenoughupdates.util.Utils;
-import io.github.moulberry.notenoughupdates.util.hypixelapi.ProfileCollectionInfo;
-import lombok.var;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.launchwrapper.Launch;
-import net.minecraft.util.BlockPos;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.EnumParticleTypes;
-import net.minecraftforge.common.MinecraftForge;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.stream.Collectors;
-
-public class DevTestCommand extends ClientCommandBase {
-
- private static final List<String> DEV_TESTERS =
- Arrays.asList(
- "d0e05de7-6067-454d-beae-c6d19d886191", // moulberry
- "66502b40-6ac1-4d33-950d-3df110297aab", // lucycoconut
- "a5761ff3-c710-4cab-b4f4-3e7f017a8dbf", // ironm00n
- "5d5c548a-790c-4fc8-bd8f-d25b04857f44", // ariyio
- "53924f1a-87e6-4709-8e53-f1c7d13dc239", // throwpo
- "d3cb85e2-3075-48a1-b213-a9bfb62360c1", // lrg89
- "0b4d470f-f2fb-4874-9334-1eaef8ba4804", // dediamondpro
- "ebb28704-ed85-43a6-9e24-2fe9883df9c2", // lulonaut
- "698e199d-6bd1-4b10-ab0c-52fedd1460dc", // craftyoldminer
- "8a9f1841-48e9-48ed-b14f-76a124e6c9df", // eisengolem
- "a7d6b3f1-8425-48e5-8acc-9a38ab9b86f7", // whalker
- "0ce87d5a-fa5f-4619-ae78-872d9c5e07fe", // ascynx
- "a049a538-4dd8-43f8-87d5-03f09d48b4dc", // egirlefe
- "7a9dc802-d401-4d7d-93c0-8dd1bc98c70d", // efefury
- "bb855349-dfd8-4125-a750-5fc2cf543ad5" // hannibal2
- );
-
- private static final String[] DEV_FAIL_STRINGS = {
- "No.",
- "I said no.",
- "You aren't allowed to use this.",
- "Are you sure you want to use this? Type 'Yes' in chat.",
- "Are you sure you want to use this? Type 'Yes' in chat.",
- "Lmao you thought",
- "Ok please stop",
- "What do you want from me?",
- "This command almost certainly does nothing useful for you",
- "Ok, this is the last message, after this it will repeat",
- "No.",
- "I said no.",
- "Dammit. I thought that would work. Uhh...",
- "\u00a7dFrom \u00a7c[ADMIN] Minikloon\u00a77: If you use that command again, I'll have to ban you",
- "",
- "Ok, this is actually the last message, use the command again and you'll crash I promise"
- };
- private int devFailIndex = 0;
-
- public static int testValue = 0;
-
- public DevTestCommand() {
- super("neudevtest");
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- if (!DEV_TESTERS.contains(Minecraft.getMinecraft().thePlayer.getUniqueID().toString())
- && !(boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment")) {
- if (devFailIndex >= DEV_FAIL_STRINGS.length) {
- throw new Error("L") {
- @Override
- public void printStackTrace() {
- throw new Error("L");
- }
- };
- }
- if (devFailIndex == DEV_FAIL_STRINGS.length - 2) {
- devFailIndex++;
-
- ChatComponentText component = new ChatComponentText("\u00a7cYou are permanently banned from this server!");
- component.appendText("\n");
- component.appendText("\n\u00a77Reason: \u00a7rI told you not to run the command - Moulberry");
- component.appendText("\n\u00a77Find out more: \u00a7b\u00a7nhttps://www.hypixel.net/appeal");
- component.appendText("\n");
- component.appendText("\n\u00a77Ban ID: \u00a7r#49871982");
- component.appendText("\n\u00a77Sharing your Ban ID may affect the processing of your appeal!");
- Minecraft.getMinecraft().getNetHandler().getNetworkManager().closeChannel(component);
- return;
- }
- Utils.addChatMessage(EnumChatFormatting.RED + DEV_FAIL_STRINGS[devFailIndex++]);
- return;
- }
- if (args.length == 1 && args[0].equalsIgnoreCase("dumpapihistogram")) {
- synchronized (ApiCache.INSTANCE) {
- Utils.addChatMessage("§e[NEU] API Request Histogram");
- Utils.addChatMessage("§e[NEU] §bClass Name§e: §aCached§e/§cNonCached§e/§dTotal");
- ApiCache.INSTANCE.getHistogramTotalRequests().forEach((className, totalRequests) -> {
- var nonCachedRequests = ApiCache.INSTANCE.getHistogramNonCachedRequests().getOrDefault(className, 0);
- var cachedRequests = totalRequests - nonCachedRequests;
- Utils.addChatMessage(
- String.format(
- "§e[NEU] §b%s §a%d§e/§c%d§e/§d%d",
- className,
- cachedRequests,
- nonCachedRequests,
- totalRequests
- ));
- });
- }
- }
- if (args.length == 1 && args[0].equalsIgnoreCase("testprofile")) {
- NotEnoughUpdates.INSTANCE.manager.apiUtils.newHypixelApiRequest("skyblock/profiles")
- .queryArgument(
- "uuid",
- "" + Minecraft.getMinecraft().thePlayer.getUniqueID()
- )
- .requestJson()
- .thenApply(jsonObject -> {
- JsonArray profiles = jsonObject.get("profiles").getAsJsonArray();
- JsonObject cp = null;
- for (JsonElement profile : profiles) {
- JsonObject asJsonObject = profile.getAsJsonObject();
- if ((asJsonObject.has("selected") &&
- asJsonObject.get("selected").getAsBoolean()) || cp == null) {
- cp = asJsonObject;
- }
- }
- return cp;
- })
- .thenCompose(obj -> ProfileCollectionInfo.getCollectionData(
- obj,
- Minecraft.getMinecraft().thePlayer.getUniqueID().toString()
- ))
- .thenAccept(it ->
- Utils.addChatMessage("Response: " + it));
- }
- if (args.length >= 1 && args[0].equalsIgnoreCase("profileinfo")) {
- String currentProfile = SBInfo.getInstance().currentProfile;
- SBInfo.Gamemode gamemode = SBInfo.getInstance().getGamemodeForProfile(currentProfile);
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD +
- "You are on Profile " +
- currentProfile +
- " with the mode " +
- gamemode));
- }
- if (args.length >= 1 && args[0].equalsIgnoreCase("buildflags")) {
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(
- "BuildFlags: \n" +
- BuildFlags.getAllFlags().entrySet().stream()
- .map(it -> " + " + it.getKey() + " - " + it.getValue())
- .collect(Collectors.joining("\n"))));
- return;
- }
- if (args.length >= 1 && args[0].equalsIgnoreCase("exteditor")) {
- if (args.length > 1) {
- NotEnoughUpdates.INSTANCE.config.hidden.externalEditor = String.join(
- " ",
- Arrays.copyOfRange(args, 1, args.length)
- );
- }
- Utils.addChatMessage(
- "§e[NEU] §fYour external editor is: §Z" + NotEnoughUpdates.INSTANCE.config.hidden.externalEditor);
- return;
- }
- if (args.length >= 1 && args[0].equalsIgnoreCase("pricetest")) {
- if (args.length == 1) {
- NotEnoughUpdates.INSTANCE.manager.auctionManager.updateBazaar();
- } else {
- NotEnoughUpdates.INSTANCE.openGui = new GuiPriceGraph(args[1]);
- }
- }
- if (args.length == 1 && args[0].equalsIgnoreCase("zone")) {
- BlockPos target = Minecraft.getMinecraft().objectMouseOver.getBlockPos();
- if (target == null) target = Minecraft.getMinecraft().thePlayer.getPosition();
- SpecialBlockZone zone = CustomBiomes.INSTANCE.getSpecialZone(target);
- Arrays.asList(
- new ChatComponentText("Showing Zone Info for: " + target),
- new ChatComponentText("Zone: " + (zone != null ? zone.name() : "null")),
- new ChatComponentText("Location: " + SBInfo.getInstance().getLocation()),
- new ChatComponentText("Biome: " + CustomBiomes.INSTANCE.getCustomBiome(target))
- ).forEach(Minecraft.getMinecraft().thePlayer::addChatMessage);
- MinecraftForge.EVENT_BUS.post(new LocationChangeEvent(SBInfo.getInstance().getLocation(), SBInfo
- .getInstance()
- .getLocation()));
- }
- if (args.length == 1 && args[0].equalsIgnoreCase("positiontest")) {
- NotEnoughUpdates.INSTANCE.openGui = new GuiPositionEditor();
- return;
- }
-
- if (args.length == 2 && args[0].equalsIgnoreCase("pt")) {
- FishingHelper.type = EnumParticleTypes.valueOf(args[1]);
- return;
- }
- if (args.length == 1 && args[0].equalsIgnoreCase("dev")) {
- NotEnoughUpdates.INSTANCE.config.hidden.dev = !NotEnoughUpdates.INSTANCE.config.hidden.dev;
- Utils.addChatMessage(
- "§e[NEU] Dev mode " + (NotEnoughUpdates.INSTANCE.config.hidden.dev ? "§aenabled" : "§cdisabled"));
- return;
- }
- if (args.length == 1 && args[0].equalsIgnoreCase("saveconfig")) {
- NotEnoughUpdates.INSTANCE.saveConfig();
- return;
- }
- if (args.length == 1 && args[0].equalsIgnoreCase("searchmode")) {
- NotEnoughUpdates.INSTANCE.config.hidden.firstTimeSearchFocus = true;
- Utils.addChatMessage(EnumChatFormatting.AQUA + "I would never search");
- return;
- }
- if (args.length == 1 && args[0].equalsIgnoreCase("bluehair")) {
- PronounDB.test();
- return;
- }
- if (args.length == 2 && args[0].equalsIgnoreCase("openGui")) {
- try {
- NotEnoughUpdates.INSTANCE.openGui = (GuiScreen) Class.forName(args[1]).newInstance();
- Utils.addChatMessage("Opening gui: " + NotEnoughUpdates.INSTANCE.openGui);
- } catch (InstantiationException | IllegalAccessException | ClassNotFoundException | ClassCastException e) {
- e.printStackTrace();
- Utils.addChatMessage("Failed to open this GUI.");
- }
- }
- if (args.length == 1 && args[0].equalsIgnoreCase("center")) {
- double x = Math.floor(Minecraft.getMinecraft().thePlayer.posX) + 0.5f;
- double z = Math.floor(Minecraft.getMinecraft().thePlayer.posZ) + 0.5f;
- Minecraft.getMinecraft().thePlayer.setPosition(x, Minecraft.getMinecraft().thePlayer.posY, z);
- }
- if (args.length >= 1 && args[0].equalsIgnoreCase("minion")) {
- MinionHelperManager.getInstance().handleCommand(args);
- }
- if (args.length == 1 && args[0].equalsIgnoreCase("copytablist")) {
- StringBuilder builder = new StringBuilder();
- for (String name : TabListUtils.getTabList()) {
- builder.append(name).append("\n");
- }
- MiscUtils.copyToClipboard(builder.toString());
- Utils.addChatMessage("§e[NEU] Copied tablist to clipboard!");
- }
- if (args.length >= 1 && args[0].equalsIgnoreCase("useragent")) {
- String newUserAgent = args.length == 1 ? null : String.join(" ", Arrays.copyOfRange(args, 1, args.length));
- Utils.addChatMessage("§e[NEU] Changed user agent override to: " + newUserAgent);
- NotEnoughUpdates.INSTANCE.config.hidden.customUserAgent = newUserAgent;
- }
- if (args.length == 2 && args[0].equalsIgnoreCase("value")) {
- try {
- testValue = Integer.parseInt(args[1]);
- } catch (NumberFormatException e) {
- Utils.addChatMessage("NumberFormatException!");
- }
- }
- }
-}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DiagCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DiagCommand.java
deleted file mode 100644
index fb546efb..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DiagCommand.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (C) 2022 NotEnoughUpdates contributors
- *
- * This file is part of NotEnoughUpdates.
- *
- * NotEnoughUpdates is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation, either
- * version 3 of the License, or (at your option) any later version.
- *
- * NotEnoughUpdates is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package io.github.moulberry.notenoughupdates.commands.dev;
-
-import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
-import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
-import io.github.moulberry.notenoughupdates.miscfeatures.CrystalMetalDetectorSolver;
-import io.github.moulberry.notenoughupdates.miscfeatures.CrystalWishingCompassSolver;
-import io.github.moulberry.notenoughupdates.options.customtypes.NEUDebugFlag;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-
-public class DiagCommand extends ClientCommandBase {
- public DiagCommand() {
- super("neudiag");
- }
-
- private static final String USAGE_TEXT = EnumChatFormatting.WHITE +
- "Usage: /neudiag <metal | wishing | debug>\n\n" +
- "/neudiag metal Metal Detector Solver diagnostics\n" +
- " <no sub-command> Show current solution diags\n" +
- " center=<off | on> Disable / enable using center\n" +
- "/neudiag wishing Wishing Compass Solver diagnostics\n" +
- "/neudiag debug\n" +
- " <no sub-command> Show all enabled flags\n" +
- " <list> Show all flags\n"+
- " <enable | disable> <flag> Enable/disable flag\n";
-
- private void showUsage(ICommandSender sender) {
- sender.addChatMessage(new ChatComponentText(USAGE_TEXT));
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- if (args.length == 0) {
- showUsage(sender);
- return;
- }
-
- String command = args[0].toLowerCase();
- switch (command) {
- case "metal":
- if (args.length == 1) {
- CrystalMetalDetectorSolver.logDiagnosticData(true);
- return;
- }
-
- String subCommand = args[1].toLowerCase();
- if (subCommand.equals("center=off")) {
- CrystalMetalDetectorSolver.setDebugDoNotUseCenter(true);
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW +
- "Center coordinates-based solutions disabled"));
- } else if (subCommand.equals("center=on")) {
- CrystalMetalDetectorSolver.setDebugDoNotUseCenter(false);
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW +
- "Center coordinates-based solutions enabled"));
- } else {
- showUsage(sender);
- return;
- }
-
- break;
- case "wishing":
- CrystalWishingCompassSolver.getInstance().logDiagnosticData(true);
- break;
- case "debug":
- if (args.length > 1) {
- boolean enablingFlag = true;
- String action = args[1];
- switch (action) {
- case "list":
- sender.addChatMessage(new ChatComponentText(
- EnumChatFormatting.YELLOW + "Here are all flags:\n" + NEUDebugFlag.getFlagList()));
- return;
- case "disable":
- enablingFlag = false;
- // falls through
- case "enable":
- if (args.length != 3) {
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.RED +
- "You must specify a flag:\n" +
- NEUDebugFlag.getFlagList()));
- return;
- }
-
- String flagName = args[2].toUpperCase();
- try {
- NEUDebugFlag debugFlag = NEUDebugFlag.valueOf(flagName);
- if (enablingFlag) {
- NotEnoughUpdates.INSTANCE.config.hidden.debugFlags.add(debugFlag);
- } else {
- NotEnoughUpdates.INSTANCE.config.hidden.debugFlags.remove(debugFlag);
- }
- } catch (IllegalArgumentException e) {
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.RED +
- flagName + " is invalid. Valid flags are:\n" +
- NEUDebugFlag.getFlagList()));
- return;
- }
- break;
- default:
- showUsage(sender);
- return;
- }
- }
-
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Effective debug flags: \n" +
- NEUDebugFlag.getEnabledFlags()));
- break;
- default:
- showUsage(sender);
- return;
- }
- }
-}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DungeonWinTestCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DungeonWinTestCommand.java
deleted file mode 100644
index be25e697..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DungeonWinTestCommand.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2022 NotEnoughUpdates contributors
- *
- * This file is part of NotEnoughUpdates.
- *
- * NotEnoughUpdates is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation, either
- * version 3 of the License, or (at your option) any later version.
- *
- * NotEnoughUpdates is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package io.github.moulberry.notenoughupdates.commands.dev;
-
-import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
-import io.github.moulberry.notenoughupdates.dungeons.DungeonWin;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.util.ResourceLocation;
-
-public class DungeonWinTestCommand extends ClientCommandBase {
-
- public DungeonWinTestCommand() {
- super("neudungeonwintest");
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- if (args.length > 0) {
- DungeonWin.TEAM_SCORE = new ResourceLocation("notenoughupdates:dungeon_win/" + args[0].toLowerCase() + ".png");
- }
-
- DungeonWin.displayWin();
- }
-}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/EnableStorageCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/EnableStorageCommand.java
deleted file mode 100644
index 3415b030..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/EnableStorageCommand.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2022 NotEnoughUpdates contributors
- *
- * This file is part of NotEnoughUpdates.
- *
- * NotEnoughUpdates is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation, either
- * version 3 of the License, or (at your option) any later version.
- *
- * NotEnoughUpdates is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package io.github.moulberry.notenoughupdates.commands.dev;
-
-import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
-import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-
-public class EnableStorageCommand extends ClientCommandBase {
-
- public EnableStorageCommand() {
- super("neuenablestorage");
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- NotEnoughUpdates.INSTANCE.config.storageGUI.enableStorageGUI3 = true;
- NotEnoughUpdates.INSTANCE.saveConfig();
- }
-
-}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/NullzeeSphereCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/NullzeeSphereCommand.java
deleted file mode 100644
index 3a9ce90f..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/NullzeeSphereCommand.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2022 NotEnoughUpdates contributors
- *
- * This file is part of NotEnoughUpdates.
- *
- * NotEnoughUpdates is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation, either
- * version 3 of the License, or (at your option) any later version.
- *
- * NotEnoughUpdates is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package io.github.moulberry.notenoughupdates.commands.dev;
-
-import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
-import io.github.moulberry.notenoughupdates.miscfeatures.NullzeeSphere;
-import net.minecraft.client.entity.EntityPlayerSP;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.util.BlockPos;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-
-public class NullzeeSphereCommand extends ClientCommandBase {
-
- public NullzeeSphereCommand() {
- super("neuzeesphere");
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- if (args.length != 1) {
- sender.addChatMessage(new ChatComponentText(
- EnumChatFormatting.RED + "Usage: /neuzeesphere [on/off] or /neuzeesphere (radius) or /neuzeesphere setCenter"));
- return;
- }
- if (args[0].equalsIgnoreCase("on")) {
- NullzeeSphere.enabled = true;
- } else if (args[0].equalsIgnoreCase("off")) {
- NullzeeSphere.enabled = false;
- } else if (args[0].equalsIgnoreCase("setCenter")) {
- EntityPlayerSP p = ((EntityPlayerSP) sender);
- NullzeeSphere.centerPos = new BlockPos(p.posX, p.posY, p.posZ);
- NullzeeSphere.overlayVBO = null;
- } else {
- try {
- NullzeeSphere.size = Float.parseFloat(args[0]);
- NullzeeSphere.overlayVBO = null;
- } catch (Exception e) {
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Can't parse radius: " + args[0]));
- }
- }
- }
-}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/PackDevCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/PackDevCommand.java
deleted file mode 100644
index 1d30a15f..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/PackDevCommand.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Copyright (C) 2022 NotEnoughUpdates contributors
- *
- * This file is part of NotEnoughUpdates.
- *
- * NotEnoughUpdates is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation, either
- * version 3 of the License, or (at your option) any later version.
- *
- * NotEnoughUpdates is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package io.github.moulberry.notenoughupdates.commands.dev;
-
-import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
-import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
-import io.github.moulberry.notenoughupdates.core.util.MiscUtils;
-import io.github.moulberry.notenoughupdates.util.Utils;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.entity.AbstractClientPlayer;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.item.EntityArmorStand;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.BlockPos;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.function.Supplier;
-
-public class PackDevCommand extends ClientCommandBase {
- static Minecraft mc = Minecraft.getMinecraft();
-
- public PackDevCommand() {
- super("neupackdev");
- }
-
- private static final HashMap<String, Command<?, ?>> commands = new HashMap<String, Command<?, ?>>() {{
- put(
- "getnpc",
- new Command<>(
- "NPC",
- () -> mc.theWorld.playerEntities,
- true,
- AbstractClientPlayer.class
- )
- );
- put(
- "getnpcs",
- new Command<>(
- "NPC",
- () -> mc.theWorld.playerEntities,
- false,
- AbstractClientPlayer.class
- )
- );
- put(
- "getmob",
- new Command<>(
- "mob",
- () -> mc.theWorld.loadedEntityList,
- true,
- EntityLiving.class
- )
- );
- put(
- "getmobs",
- new Command<>(
- "mob",
- () -> mc.theWorld.loadedEntityList,
- false,
- EntityLiving.class
- )
- );
- put(
- "getarmorstand",
- new Command<>(
- "armor stand",
- () -> mc.theWorld.loadedEntityList,
- true,
- EntityArmorStand.class
- )
- );
- put(
- "getarmorstands",
- new Command<>(
- "armor stand",
- () -> mc.theWorld.loadedEntityList,
- false,
- EntityArmorStand.class
- )
- );
- }};
-
- @Override
- public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
- return args.length == 1 ? getListOfStringsMatchingLastWord(args, commands.keySet()) : null;
- }
-
- public static void togglePackDeveloperMode(ICommandSender sender) {
- NotEnoughUpdates.INSTANCE.packDevEnabled = !NotEnoughUpdates.INSTANCE.packDevEnabled;
- if (NotEnoughUpdates.INSTANCE.packDevEnabled) {
- sender.addChatMessage(new ChatComponentText(
- EnumChatFormatting.GREEN + "Enabled pack developer mode."));
- } else {
- sender.addChatMessage(new ChatComponentText(
- EnumChatFormatting.RED + "Disabled pack developer mode."));
- }
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- if (args.length == 0) {
- togglePackDeveloperMode(sender);
- return;
- }
-
- double dist = 5.0;
- if (args.length >= 2) {
- try {
- dist = Double.parseDouble(args[1]);
- } catch (NumberFormatException e) {
- sender.addChatMessage(new ChatComponentText(
- EnumChatFormatting.RED + "Invalid distance! Must be a number, defaulting to a radius of 5."));
- }
- }
-
- StringBuilder output;
- String subCommand = args[0].toLowerCase();
- if (commands.containsKey(subCommand)) {
- Command<?, ?> command = commands.get(subCommand);
- output = command.getData(dist);
- } else if (subCommand.equals("getall")) {
- output = getAll(dist);
- } else if (subCommand.equals("getallclose")) {
- output = getAllClose(dist);
- } else {
- sender.addChatMessage(new ChatComponentText(
- EnumChatFormatting.RED + "Invalid sub-command."));
- return;
- }
-
- if (output.length() != 0) {
- MiscUtils.copyToClipboard(output.toString());
- }
- }
-
- private static StringBuilder getAllClose(Double dist) {
- StringBuilder sb = new StringBuilder();
- sb.append(commands.get("getmob").getData(dist));
- sb.append(commands.get("getarmorstand").getData(dist));
- sb.append(commands.get("getnpc").getData(dist));
- return sb;
- }
-
- private static StringBuilder getAll(Double dist) {
- StringBuilder sb = new StringBuilder();
- sb.append(commands.get("getmobs").getData(dist));
- sb.append(commands.get("getarmorstands").getData(dist));
- sb.append(commands.get("getnpcs").getData(dist));
- return sb;
- }
-
- public static <T extends EntityLivingBase> StringBuilder livingBaseDataBuilder(T entity, Class<T> clazz) {
- StringBuilder entityData = new StringBuilder();
- if (EntityPlayer.class.isAssignableFrom(entity.getClass())) {
- EntityPlayer entityPlayer = (EntityPlayer) entity;
-
- // NPC Information
- String skinResourcePath = ((AbstractClientPlayer) entityPlayer).getLocationSkin().getResourcePath();
- entityData
- .append("Player Id: ")
- .append(entityPlayer.getUniqueID() != null ? entityPlayer.getUniqueID().toString() : "null")
- .append(entityPlayer.getCustomNameTag() != null ? entityPlayer.getCustomNameTag() : "null")
- .append("\nEntity Texture Id: ")
- .append(skinResourcePath != null ? skinResourcePath.replace("skins/", "") : "null");
- }
-
- if (!clazz.isAssignableFrom(entity.getClass())) {
- return entityData;
- }
-
- //Entity Information
- entityData
- .append("Entity Id: ")
- .append(entity.getEntityId())
- .append("\nMob: ")
- .append(entity.getName() != null ? entity.getName() : "null")
- .append("\nCustom Name: ")
- .append(entity.getCustomNameTag() != null ? entity.getCustomNameTag() : "null");
-
- //Held Item
- if (entity.getHeldItem() != null) {
- entityData
- .append("\nItem: ")
- .append(entity.getHeldItem())
- .append("\nItem Display Name: ")
- .append(entity.getHeldItem().getDisplayName() != null
- ? entity.getHeldItem().getDisplayName()
- : "null")
- .append("\nItem Tag Compound: ");
- NBTTagCompound heldItemTagCompound = entity.getHeldItem().getTagCompound();
- if (heldItemTagCompound != null) {
- String heldItemString = heldItemTagCompound.toString();
- NBTBase extraAttrTag = heldItemTagCompound.getTag("ExtraAttributes");
- entityData
- .append(heldItemString != null ? heldItemString : "null")
- .append("\nItem Tag Compound Extra Attributes: ")
- .append(extraAttrTag != null ? extraAttrTag : "null");
- } else {
- entityData.append("null");
- }
-
- } else {
- entityData.append("\nItem: null");
- }