aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-02-06 21:01:55 +0100
committernea <nea@nea.moe>2023-02-06 21:01:55 +0100
commit5a113b83d0429a712d70b3b6ef22224493d69b32 (patch)
tree5da696b6b9d8b0820690bfa70403c206a8255b47 /src/main/java
parent0b5c9a711f92aa0967b4ceedf7bd9205fcfb496c (diff)
downloadNotEnoughUpdates-5a113b83d0429a712d70b3b6ef22224493d69b32.tar.gz
NotEnoughUpdates-5a113b83d0429a712d70b3b6ef22224493d69b32.tar.bz2
NotEnoughUpdates-5a113b83d0429a712d70b3b6ef22224493d69b32.zip
Dungeon commands
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java12
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/DhCommand.java37
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/DnCommand.java40
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java57
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java131
5 files changed, 0 insertions, 277 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java
index e530809a..0c8597bb 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java
@@ -20,12 +20,6 @@
package io.github.moulberry.notenoughupdates.commands;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
-import io.github.moulberry.notenoughupdates.commands.dev.DiagCommand;
-import io.github.moulberry.notenoughupdates.commands.dev.PackDevCommand;
-import io.github.moulberry.notenoughupdates.commands.dungeon.DhCommand;
-import io.github.moulberry.notenoughupdates.commands.dungeon.DnCommand;
-import io.github.moulberry.notenoughupdates.commands.dungeon.JoinDungeonCommand;
-import io.github.moulberry.notenoughupdates.commands.dungeon.MapCommand;
import io.github.moulberry.notenoughupdates.commands.misc.AhCommand;
import io.github.moulberry.notenoughupdates.commands.misc.CalculatorCommand;
import io.github.moulberry.notenoughupdates.commands.misc.CalendarCommand;
@@ -52,12 +46,6 @@ public class Commands {
ClientCommandHandler.instance.registerCommand(new PvCommand());
if (!Loader.isModLoaded("skyblockextras")) ClientCommandHandler.instance.registerCommand(new CataCommand());
- // Dungeon Commands
- ClientCommandHandler.instance.registerCommand(new MapCommand());
- ClientCommandHandler.instance.registerCommand(new JoinDungeonCommand());
- ClientCommandHandler.instance.registerCommand(new DnCommand());
- ClientCommandHandler.instance.registerCommand(new DhCommand());
-
// Misc Commands
ClientCommandHandler.instance.registerCommand(new CosmeticsCommand());
ClientCommandHandler.instance.registerCommand(new CustomizeCommand());
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/DhCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/DhCommand.java
deleted file mode 100644
index 222862f9..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/DhCommand.java
+++ /dev/null
@@ -1,37 +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.dungeon;
-
-import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
-import net.minecraft.client.Minecraft;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-
-public class DhCommand extends ClientCommandBase {
-
- public DhCommand() {
- super("dh");
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- Minecraft.getMinecraft().thePlayer.sendChatMessage("/warp dungeon_hub");
- }
-}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/DnCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/DnCommand.java
deleted file mode 100644
index 3b697905..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/DnCommand.java
+++ /dev/null
@@ -1,40 +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.dungeon;
-
-import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
-import io.github.moulberry.notenoughupdates.util.Utils;
-import net.minecraft.client.Minecraft;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.util.EnumChatFormatting;
-
-public class DnCommand extends ClientCommandBase {
-
- public DnCommand() {
- super("dn");
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- Minecraft.getMinecraft().thePlayer.sendChatMessage("/warp dungeon_hub");
- Utils.addChatMessage(EnumChatFormatting.AQUA + "Warping to:" + EnumChatFormatting.YELLOW + " Deez Nuts lmao");
- }
-}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java
deleted file mode 100644
index 58bfbef2..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java
+++ /dev/null
@@ -1,57 +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.dungeon;
-
-import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
-import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
-import io.github.moulberry.notenoughupdates.util.Utils;
-import net.minecraft.client.Minecraft;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.util.EnumChatFormatting;
-import org.apache.commons.lang3.StringUtils;
-
-public class JoinDungeonCommand extends ClientCommandBase {
-
- public JoinDungeonCommand() {
- super("join");
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- if (!NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) {
- Minecraft.getMinecraft().thePlayer.sendChatMessage("/join " + StringUtils.join(args, " "));
- } else {
- if (args.length != 1) {
- Utils.addChatMessage(EnumChatFormatting.RED + "Example Usage: /join f7, /join m6 or /join 7");
- } else {
- String cataPrefix = "catacombs";
- if (args[0].toLowerCase().startsWith("m")) {
- cataPrefix = "master_catacombs";
- }
- String cmd = "/joindungeon " + cataPrefix + " " + args[0].charAt(args[0].length() - 1);
- Utils.addChatMessage(EnumChatFormatting.YELLOW + "Running command: " + cmd);
- Utils.addChatMessage(EnumChatFormatting.YELLOW +
- "The dungeon should start soon. If it doesn't, make sure you have a party of 5 people");
- Minecraft.getMinecraft().thePlayer.sendChatMessage(cmd);
- }
- }
- }
-}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java
deleted file mode 100644
index d52ed196..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java
+++ /dev/null
@@ -1,131 +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.dungeon;
-
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
-import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
-import io.github.moulberry.notenoughupdates.dungeons.GuiDungeonMapEditor;
-import io.github.moulberry.notenoughupdates.util.Utils;
-import net.minecraft.block.material.MapColor;
-import net.minecraft.client.Minecraft;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.item.ItemMap;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.storage.MapData;
-
-import java.awt.*;
-import java.io.File;
-import java.util.Map;
-
-public class MapCommand extends ClientCommandBase {
-
- public MapCommand() {
- super("neumap");
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) throws CommandException {
-
- if (!NotEnoughUpdates.INSTANCE.config.hidden.dev) {
- NotEnoughUpdates.INSTANCE.openGui = new GuiDungeonMapEditor(null);
- return;
- }
-
- if (args.length == 1 && args[0].equals("reset")) {
- NotEnoughUpdates.INSTANCE.colourMap = null;
- return;
- }
-
- if (args.length != 2) {
- NotEnoughUpdates.INSTANCE.openGui = new GuiDungeonMapEditor(null);
- return;
- }
-
- if (args[0].equals("save")) {
- ItemStack stack = Minecraft.getMinecraft().thePlayer.getHeldItem();
- if (stack != null && stack.getItem() instanceof ItemMap) {
- ItemMap map = (ItemMap) stack.getItem();
- MapData mapData = map.getMapData(stack, Minecraft.getMinecraft().theWorld);
-
- if (mapData == null) return;
-
- JsonObject json = new JsonObject();
- for (int i = 0; i < 16384; ++i) {
- int x = i % 128;
- int y = i / 128;
-
- int j = mapData.colors[i] & 255;
-
- Color c;
- if (j / 4 == 0) {
- c = new Color((i + i / 128 & 1) * 8 + 16 << 24, true);
- } else {
- c = new Color(MapColor.mapColorArray[j / 4].getMapColor(j & 3), true);
- }
-
- json.addProperty(x + ":" + y, c.getRGB());
- }
-
- try {
- new File(NotEnoughUpdates.INSTANCE.manager.configLocation, "maps").mkdirs();
- NotEnoughUpdates.INSTANCE.manager.writeJson(
- json,
- new File(NotEnoughUpdates.INSTANCE.manager.configLocation, "maps/" + args[1] + ".json")
- );
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- Utils.addChatMessage(EnumChatFormatting.GREEN + "Saved to file.");
- }
-
- return;
- }
-
- if (args[0].equals("load")) {
- JsonObject json = NotEnoughUpdates.INSTANCE.manager.getJsonFromFile(new File(
- NotEnoughUpdates.INSTANCE.manager.configLocation,
- "maps/" + args[1] + ".json"
- ));
-
- NotEnoughUpdates.INSTANCE.colourMap = new Color[128][128];
- for (int x = 0; x < 128; x++) {
- for (int y = 0; y < 128; y++) {
- NotEnoughUpdates.INSTANCE.colourMap[x][y] = new Color(0, 0, 0, 0);
- }
- }
- for (Map.Entry<String, JsonElement> entry : json.entrySet()) {
- int x = Integer.parseInt(entry.getKey().split(":")[0]);
- int y = Integer.parseInt(entry.getKey().split(":")[1]);
-
- NotEnoughUpdates.INSTANCE.colourMap[x][y] = new Color(entry.getValue().getAsInt(), true);
- }
-
- return;
- }
-
- NotEnoughUpdates.INSTANCE.openGui = new GuiDungeonMapEditor(null);
- }
-}