From 0f7fb90f9a757117584daf37b6eba8b37add1518 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Tue, 12 Apr 2022 16:23:58 +0000 Subject: Added an command to change repo url and commits url (#109) * Added an command to change repo url and commits url * Added new armor types to itemlist category * made /neurepomode setRepoURL not a pain to use Co-authored-by: jani270 --- .../moulberry/notenoughupdates/NEUOverlay.java | 7 ++++- .../commands/repo/RepoModeCommand.java | 32 +++++++++++++++++++--- 2 files changed, 34 insertions(+), 5 deletions(-) (limited to 'src/main') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index b7aa42d6..75bff803 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -1390,7 +1390,12 @@ public class NEUOverlay extends Gui { "DUNGEON HELMET", "DUNGEON CHESTPLATE", "DUNGEON LEGGINGS", - "DUNGEON BOOTS" + "DUNGEON BOOTS", + "BELT", + "GLOVES", + "CLOAK", + "NECKLACE", + "BRACELET" ) >= 0; } else if (getSortMode() == SORT_MODE_ACCESSORY) { return checkItemType(item.get("lore").getAsJsonArray(), "ACCESSORY", "HATCCESSORY", "DUNGEON ACCESSORY") >= 0; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/RepoModeCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/RepoModeCommand.java index bb6e1675..a8f53460 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/RepoModeCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/RepoModeCommand.java @@ -15,9 +15,33 @@ public class RepoModeCommand extends ClientCommandBase { @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { - NotEnoughUpdates.INSTANCE.config.hidden.dev = !NotEnoughUpdates.INSTANCE.config.hidden.dev; - NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing = - !NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing; - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("\u00a75Toggled NEU repo dev mode.")); + if (args.length == 1 && args[0].equalsIgnoreCase("toggle")) { + NotEnoughUpdates.INSTANCE.config.hidden.dev = !NotEnoughUpdates.INSTANCE.config.hidden.dev; + NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing = + !NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing; + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("\u00a75Toggled NEU repo dev mode.")); + } else if (args.length >= 2 && args[0].equalsIgnoreCase("setrepourl")) { + String githubUser = "Moulberry"; + String githubRepo = "NotEnoughUpdates-REPO"; + String githubBranch = "master"; + if (!args[1].equalsIgnoreCase("reset")) { + githubUser = args[1]; + if (args.length >= 3) { + githubRepo = args[2]; + } + if (args.length >= 4) { + githubBranch = args[3]; + } + } + NotEnoughUpdates.INSTANCE.config.hidden.repoURL = "https://github.com/" + githubUser + "/" + githubRepo + "/archive/" + githubBranch + ".zip"; + NotEnoughUpdates.INSTANCE.config.hidden.repoCommitsURL = "https://api.github.com/repos/" + githubUser + "/" + githubRepo + "/commits/" + githubBranch; + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("\u00a75Set NEU repo URL to " + NotEnoughUpdates.INSTANCE.config.hidden.repoURL + + "\n\u00a75Set NEU repo commits URL to " + NotEnoughUpdates.INSTANCE.config.hidden.repoCommitsURL)); + + } else { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("\u00a7cUsage:" + + "\n\u00a75/neurepomode Toggles on/off dev mode and item editing." + + "\n\u00a75/neurepomode [reponame] [branch] Sets the repo URL for downloading from.")); + } } } -- cgit