aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2022-10-21 13:25:11 -0700
committerGitHub <noreply@github.com>2022-10-21 15:25:11 -0500
commite4d4a7c4179d2359dcdadcc49b38470c9db873e3 (patch)
tree6d5756eb215fd55cd685b79d3db8d5d15225a7f8
parent2f57d3891a25630a41323c029bbe0b0a87d2fd33 (diff)
downloadNotEnoughUpdates-e4d4a7c4179d2359dcdadcc49b38470c9db873e3.tar.gz
NotEnoughUpdates-e4d4a7c4179d2359dcdadcc49b38470c9db873e3.tar.bz2
NotEnoughUpdates-e4d4a7c4179d2359dcdadcc49b38470c9db873e3.zip
Code Cleanup (#333)
* Remove NeuConfigTutorial.java * Remove NeuTutorial.java * Remove TutorialBase.java * Remove NEU Tutorial Command Initialization from Commands.java * Remove commented-out filter defaults Remove commented-out and replaced rarities String array Remove commented out code for old rendering Invert if statement due to empty if body and used else body * Remove commented-out render Remove commented out divine mentions Remove duplicate additions of Divine rarity * Remove ButtonsCommand.java - Unused, empty, and uninitialized * Remove excessive commented out code of old /neurename * Remove usused initialization Removed old debug console prints * Remove commented out removed options * Remove commented and unused String List Remove commented and unused size settings * Remove unused commented out code * Remove unused commented out code * Remove unused commented code
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java16
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java1
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/misc/ButtonsCommand.java35
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CustomizeCommand.java85
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java13
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java159
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementTextField.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java1
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuConfigTutorial.java26
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuTutorial.java168
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/TutorialBase.java399
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java5
13 files changed, 2 insertions, 913 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java b/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java
index 7b4542d0..07ec4a59 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java
@@ -190,8 +190,6 @@ public class CustomAH extends Gui {
private static final int SORT_MODE_LOW = 1;
private static final int SORT_MODE_SOON = 2;
- // private static final String[] rarities = {"COMMON", "UNCOMMON", "RARE", "EPIC",
-// "LEGENDARY", "MYTHIC", "SPECIAL", "VERY SPECIAL", "SUPREME", "DIVINE"};
private static final String[] rarityColours = {
"" + EnumChatFormatting.WHITE,
"" + EnumChatFormatting.GREEN, "" + EnumChatFormatting.BLUE, "" + EnumChatFormatting.DARK_PURPLE,
@@ -264,10 +262,8 @@ public class CustomAH extends Gui {
if (searchField == null || priceField == null) init();
if (System.currentTimeMillis() - lastOpen < 1000) Mouse.setGrabbed(false);
- //sortMode = SORT_MODE_HIGH;
rarityFilter = -1;
filterMyAuctions = false;
- //binFilter = BIN_FILTER_ALL;
enchFilter = ENCH_FILTER_ALL;
dungeonFilter = DUNGEON_FILTER_ALL;
@@ -995,14 +991,6 @@ public class CustomAH extends Gui {
searchField.drawTextBox();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- /*if(auctionIds.size() == 0 && searchField.getText().length() == 0) {
- drawRect(guiLeft+8, guiTop+17, guiLeft+170, guiTop+107+18*splits,
- new Color(100, 100, 100, 100).getRGB());
-
- FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
- int strWidth = fr.getStringWidth("Loading items...");
- fr.drawString("Loading items...", guiLeft+(8+170-strWidth)/2, guiTop+(17+107+18*splits)/2, Color.BLACK.getRGB());
- }*/
Minecraft.getMinecraft().getTextureManager().bindTexture(creativeInventoryTabs);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
@@ -1409,9 +1397,7 @@ public class CustomAH extends Gui {
for (String internalname : itemMatches) {
for (String aucid : manager.auctionManager.getAuctionsForInternalname(internalname)) {
APIManager.Auction auc = manager.auctionManager.getAuctionItems().get(aucid);
- if (doesAucMatch(auc)) {
- //matches.add(aucid);
- } else {
+ if (!doesAucMatch(auc)) {
dontMatch.add(aucid);
}
}
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 62981a30..91365cd1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java
@@ -95,7 +95,6 @@ public class Commands {
ClientCommandHandler.instance.registerCommand(new ScreenCommand("neubuttons", GuiInvButtonEditor::new));
ClientCommandHandler.instance.registerCommand(new ScreenCommand("neuec", GuiEnchantColour::new));
ClientCommandHandler.instance.registerCommand(new ScreenCommand("neuoverlay", NEUOverlayPlacements::new));
- //ClientCommandHandler.instance.registerCommand(new ScreenCommand("neututorial", NeuTutorial::new));
ClientCommandHandler.instance.registerCommand(new AhCommand());
ClientCommandHandler.instance.registerCommand(new CalculatorCommand());
ClientCommandHandler.instance.registerCommand(new CalendarCommand());
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/ButtonsCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/ButtonsCommand.java
deleted file mode 100644
index 55113462..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/ButtonsCommand.java
+++ /dev/null
@@ -1,35 +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.misc;
-
-import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-
-public class ButtonsCommand extends ClientCommandBase {
- protected ButtonsCommand(String name) {
- super(name);
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) throws CommandException {
-
- }
-}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CustomizeCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CustomizeCommand.java
index 2b184fa0..28c2893d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CustomizeCommand.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CustomizeCommand.java
@@ -60,89 +60,4 @@ public class CustomizeCommand extends ClientCommandBase {
NotEnoughUpdates.INSTANCE.openGui = new GuiItemCustomize(held, heldUUID);
}
-
- /*SimpleCommand itemRenameCommand = new SimpleCommand("neurename", new SimpleCommand.ProcessCommandRunnable() {
- public void processCommand(ICommandSender sender, String[] args) {
- if (args.length == 0) {
- args = new String[]{"help"};
- }
- String heldUUID = NotEnoughUpdates.INSTANCE.manager.getUUIDForItem(Minecraft.getMinecraft().thePlayer.getHeldItem());
- switch (args[0].toLowerCase()) {
- case "clearall":
- NotEnoughUpdates.INSTANCE.manager.itemRenameJson = new JsonObject();
- NotEnoughUpdates.INSTANCE.manager.saveItemRenameConfig();
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "[NEU] Cleared custom name for all items"));
- break;
- case "clear":
- if (heldUUID == null) {
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "[NEU] Can't clear rename - no UUID"));
- return;
- }
- NotEnoughUpdates.INSTANCE.manager.itemRenameJson.remove(heldUUID);
- NotEnoughUpdates.INSTANCE.manager.saveItemRenameConfig();
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "[NEU] Cleared custom name for held item"));
- break;
- case "copyuuid":
- if (heldUUID == null) {
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "[NEU] Can't clear rename - no UUID"));
- return;
- }
- StringSelection selection = new StringSelection(heldUUID);
- Toolkit.getDefaultToolkit().getSystemClipboard().setContents(selection, selection);
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "[NEU] UUID copied to clipboard"));
- break;
- case "uuid":
- if (heldUUID == null) {
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "[NEU] Can't get UUID - no UUID"));
- return;
- }
- ChatStyle style = new ChatStyle();
- style.setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,
- new ChatComponentText(EnumChatFormatting.GRAY + "Click to copy to clipboard")));
- style.setChatClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/neurename copyuuid"));
-
- ChatComponentText text = new ChatComponentText(EnumChatFormatting.YELLOW + "[NEU] The UUID of your currently held item is: " +
- EnumChatFormatting.GREEN + heldUUID);
- text.setChatStyle(style);
- sender.addChatMessage(text);
- break;
- case "set":
- if (heldUUID == null) {
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "[NEU] Can't rename item - no UUID"));
- return;
- }
- if (args.length == 1) {
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "[NEU] Usage: /neurename set [name...]"));
- return;
- }
- StringBuilder sb = new StringBuilder();
- for (int i = 1; i < args.length; i++) {
- sb.append(args[i]);
- if (i < args.length - 1) sb.append(" ");
- }
- String name = sb.toString()
- .replace("\\&", "{amp}")
- .replace("&", "\u00a7")
- .replace("{amp}", "&");
- name = new UnicodeUnescaper().translate(name);
- NotEnoughUpdates.INSTANCE.manager.itemRenameJson.addProperty(heldUUID, name);
- NotEnoughUpdates.INSTANCE.manager.saveItemRenameConfig();
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "[NEU] Set custom name for held item"));
- break;
- default:
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "[NEU] Unknown subcommand \"" + args[0] + "\""));
- case "help":
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "[NEU] Available commands:"));
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "help: Print this message"));
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "clearall: Clears all custom names "
- + EnumChatFormatting.BOLD + "(Cannot be undone)"));
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "clear: Clears held item name "
- + EnumChatFormatting.BOLD + "(Cannot be undone)"));
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "uuid: Returns the UUID of the currently held item"));
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "set: Sets the custom name of the currently held item"));
- sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Usage: /neurename set [name...]"));
-
- }
- }
- });*/
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java
index a4c5a60a..88c89773 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java
@@ -122,9 +122,6 @@ public class DungeonMap {
private int startRoomY = -1;
private int connectorSize = 5;
private int roomSize = 0;
-
- //private final List<MapDecoration> decorations = new ArrayList<>();
- //private final List<MapDecoration> lastDecorations = new ArrayList<>();
private long lastDecorationsMillis = -1;
private long lastLastDecorationsMillis = -1;
@@ -1475,9 +1472,7 @@ public class DungeonMap {
}
}
- //System.out.println("--- PERM START ---");
for (Map.Entry<String, Integer> entry : smallestPermutation.entrySet()) {
- //System.out.println(entry.getKey() + ":" + entry.getValue() + " : Total dist: " + smallestTotalDistance);
finalUsedIndexes.add(entry.getValue());
playerMarkerMapPositions.put(entry.getKey(), positions.get(entry.getValue()));
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java
index 8ce9d505..735fa3e6 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java
@@ -152,15 +152,6 @@ public class GuiDungeonMapEditor extends GuiScreen {
public GuiDungeonMapEditor() {
DungeonMapConfig options = NotEnoughUpdates.INSTANCE.config.dungeonMap;
- //Map Border Size
- //buttons.add(new Button(0, 6, 37, "Small", options.dmBorderSize));
- //buttons.add(new Button(1, 52, 37, "Medium", options.dmBorderSize));
- //buttons.add(new Button(2, 98, 37, "Large", options.dmBorderSize));
-
- //Map Rooms Size
- //buttons.add(new Button(3, 6, 67+19, "Small", options.dmRoomSize));
- //buttons.add(new Button(4, 52, 67+19, "Medium", options.dmRoomSize));
- //buttons.add(new Button(5, 98, 67+19, "Large", options.dmRoomSize));
//Map Border Styles
buttons.add(new Button(6, 6, 97 + 30, "None"));
@@ -241,9 +232,6 @@ public class GuiDungeonMapEditor extends GuiScreen {
e.printStackTrace();
}
- //buttons.add(new Button(29, 52, 86+19, "XLarge", options.dmRoomSize));
- //buttons.add(new Button(30, 52, 56, "XLarge", options.dmBorderSize));
-
{
double val = NotEnoughUpdates.INSTANCE.config.dungeonMap.dmBackgroundBlur;
String strVal;
@@ -466,7 +454,6 @@ public class GuiDungeonMapEditor extends GuiScreen {
button.render();
}
- //List<String> textLines, final int mouseX, final int mouseY, final int screenWidth, final int screenHeight, final int maxTextWidth, FontRenderer font
if (tooltipToDisplay != null) {
Utils.drawHoveringText(
tooltipToDisplay,
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java
index 0b1963d6..253cc245 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java
@@ -60,24 +60,6 @@ public class DevInfoPane extends TextInfoPane {
private String getText() {
String text = "";
- /*for(Map.Entry<String, JsonObject> item : manager.getItemInformation().entrySet()) {
- if(!item.getValue().has("infoType") || item.getValue().get("infoType").getAsString().isEmpty()) {
- text += item.getKey() + "\n";
- }
- }*/
- /*for(String s : manager.neuio.getRemovedItems(manager.getItemInformation().keySet())) {
- text += s + "\n";
- }
-
- if(true) return text;*/
-
- /*for(Map.Entry<String, JsonObject> item : manager.getItemInformation().entrySet()) {
- if(!item.getValue().has("infoType") || item.getValue().get("infoType").getAsString().isEmpty()) {
- text += item.getKey() + "\n";
- }
- }*/
- //if(true) return text;
-
for (String internalname : manager.auctionManager.getItemAuctionInfoKeySet()) {
if (internalname.matches("^.*-[0-9]{1,3}$")) continue;
if (!manager.getItemInformation().containsKey(internalname)) {
@@ -86,23 +68,11 @@ public class DevInfoPane extends TextInfoPane {
}
}
- /*for(Map.Entry<String, JsonElement> entry : manager.getAuctionPricesJson().get("prices").getAsJsonObject().entrySet()) {
- if(!manager.getItemInformation().keySet().contains(entry.getKey())) {
- if(entry.getKey().contains("-")) {
- continue;
- }
- if(entry.getKey().startsWith("PERFECT")) continue;
- if(Item.itemRegistry.getObject(new ResourceLocation(entry.getKey().toLowerCase())) != null) {
- continue;
- }
- text += entry.getKey() + "\n";
- }
- }*/
+
return text;
}
//#region add vanilla items
-
AtomicBoolean running = new AtomicBoolean(false);
ScheduledExecutorService ses = Executors.newScheduledThreadPool(1);
@@ -555,7 +525,6 @@ public class DevInfoPane extends TextInfoPane {
if (stack.getItemDamage() != 0 && stack.getItemDamage() < 32000) {
stacki += "-" + stack.getItemDamage();
}
- //stacki += ":"+stack.stackSize;
stacki += ":1";
}
}
@@ -595,7 +564,6 @@ public class DevInfoPane extends TextInfoPane {
if (stack.getItemDamage() != 0 && stack.getItemDamage() < 32000) {
stacki += "-" + stack.getItemDamage();
}
- //stacki += ":"+stack.stackSize;
stacki += ":1";
}
}
@@ -645,7 +613,6 @@ public class DevInfoPane extends TextInfoPane {
if (stack.getItemDamage() != 0 && stack.getItemDamage() < 32000) {
stacki += "-" + stack.getItemDamage();
}
- //stacki += ":"+stack.stackSize;
stacki += ":1";
}
}
@@ -705,7 +672,6 @@ public class DevInfoPane extends TextInfoPane {
for (String bukkit : bukkitList) {
String internalname = bukkit.split("@")[0];
if (true || !manager.getItemInformation().containsKey(internalname)) {
- //System.out.println("adding vanilla: " + internalname);
String vanilla = internalname.toLowerCase().replace("_item", "");
if (bukkit.contains("@")) {
vanilla = bukkit.split("@")[1];
@@ -750,7 +716,6 @@ public class DevInfoPane extends TextInfoPane {
if (stack.getItemDamage() != 0 && stack.getItemDamage() < 32000) {
stacki += "-" + stack.getItemDamage();
}
- //stacki += ":"+stack.stackSize;
stacki += ":1";
}
}
@@ -801,7 +766,6 @@ public class DevInfoPane extends TextInfoPane {
if (stack.getItemDamage() != 0 && stack.getItemDamage() < 32000) {
stacki += "-" + stack.getItemDamage();
}
- //stacki += ":"+stack.stackSize;
stacki += ":1";
}
}
@@ -839,7 +803,6 @@ public class DevInfoPane extends TextInfoPane {
if (stack.getItemDamage() != 0 && stack.getItemDamage() < 32000) {
stacki += "-" + stack.getItemDamage();
}
- //stacki += ":"+stack.stackSize;
stacki += ":1";
}
}
@@ -887,7 +850,6 @@ public class DevInfoPane extends TextInfoPane {
if (stack.getItemDamage() != 0 && stack.getItemDamage() < 32000) {
stacki += "-" + stack.getItemDamage();
}
- //stacki += ":"+stack.stackSize;
stacki += ":1";
}
}
@@ -967,126 +929,7 @@ public class DevInfoPane extends TextInfoPane {
}
}
- //for(Map.Entry<String, JsonObject> item : manager.getItemInformation().entrySet()) {
- /*if(!item.getValue().has("infoType") || item.getValue().get("infoType").getAsString().isEmpty()) {
- if(item.getValue().has("info") && item.getValue().get("info").getAsJsonArray().size()>0) {
- item.getValue().addProperty("infoType", "WIKI_URL");
- try {
- manager.writeJsonDefaultDir(item.getValue(), item.getKey()+".json");
- } catch(IOException e){}
- manager.loadItem(item.getKey());
- }
- }*/
- /*if(item.getKey().startsWith("PET_ITEM_")) {
- item.getValue().addProperty("infoType", "WIKI_URL");
- JsonArray array = new JsonArray();
- array.add(new JsonPrimitive("https://hypixel-skyblock.fandom.com/wiki/Pet_Items"));
- item.getValue().add("info", array);
- try {
- manager.writeJsonDefaultDir(item.getValue(), item.getKey()+".json");
- } catch(IOException e){}
- manager.loadItem(item.getKey());
- }*/
- /*if(!item.getValue().has("infoType") || item.getValue().get("infoType").getAsString().isEmpty()) {
- //String prettyName =
-
- String itemS = item.getKey().split("-")[0].split(";")[0];
- StringBuilder prettyName = new StringBuilder();
- boolean capital = true;
- for(int i=0; i<itemS.length(); i++) {
- char c = itemS.charAt(i);
- if(capital) {
- prettyName.append(String.valueOf(c).toUpperCase());
- capital = false;
- } else {
- prettyName.append(String.valueOf(c).toLowerCase());
- }
- if(String.valueOf(c).equals("_")) {
- capital = true;
- }
- }
- String prettyNameS = prettyName.toString();
- File f = manager.getWebFile("https://hypixel-skyblock.fandom.com/wiki/"+prettyNameS);
- if(f == null) {
- continue;
- //#REDIRECT [[Armor of Magma]]
- }
- StringBuilder sb = new StringBuilder();
- try(BufferedReader br = new BufferedReader(new InputStreamReader(
- new FileInputStream(f), StandardCharsets.UTF_8))) {
- String l;
- while((l = br.readLine()) != null){
- sb.append(l).append("\n");
- }
- } catch(IOException e) {
- continue;
- }
- if(sb.toString().isEmpty()) {
- continue;
- }
- if(sb.toString().startsWith("#REDIRECT")) {
- prettyNameS = sb.toString().split("\\[\\[")[1].split("]]")[0].replaceAll(" ", "_");
- }
- item.getValue().addProperty("infoType", "WIKI_URL");
- JsonArray array = new JsonArray();
- array.add(new JsonPrimitive("https://hypixel-skyblock.fandom.com/wiki/"+prettyNameS));
- item.getValue().add("info", array);
- try {
- manager.writeJsonDefaultDir(item.getValue(), item.getKey()+".json");
- } catch(IOException e){}
- manager.loadItem(item.getKey());
- }*/
}
-
- /*if(running.get()) {
- List<String> add = new ArrayList<>();
- for(Map.Entry<String, JsonObject> item : manager.getItemInformation().entrySet()) {
- if(item.getValue().has("recipe")) {
- if(!item.getKey().contains("-") && !item.getKey().contains(";")) {
- add.add(item.getKey());
- }
- }
- }
- AtomicInteger index = new AtomicInteger(0);
-
- ses.schedule(new Runnable() {
- public void run() {
- if(!running.get()) return;
-
- int i = index.getAndIncrement();
- String item = add.get(i).split("-")[0].split(";")[0];
- Minecraft.getMinecraft().thePlayer.sendChatMessage("/viewrecipe " + item);
- ses.schedule(this, 1000L, TimeUnit.MILLISECONDS);
- }
- }, 1000L, TimeUnit.MILLISECONDS);
- }*/
- //}
- /*if(Keyboard.isKeyDown(Keyboard.KEY_J) && !running) {
- running = true;
- List<String> add = new ArrayList<>();
- for(Map.Entry<String, JsonElement> entry : manager.getAuctionPricesJson().get("prices").getAsJsonObject().entrySet()) {
- if(!manager.getItemInformation().keySet().contains(entry.getKey())) {
- if(entry.getKey().contains("-")) {
- continue;
- }
- if(entry.getKey().startsWith("PERFECT")) continue;
- if(Item.itemRegistry.getObject(new ResourceLocation(entry.getKey().toLowerCase())) != null) {
- continue;
- }
- add.add(entry.getKey());
- }
- }
- AtomicInteger index = new AtomicInteger(0);
-
- ses.schedule(new Runnable() {
- public void run() {
- int i = index.getAndIncrement();
- String item = add.get(i).split("-")[0].split(";")[0];
- Minecraft.getMinecraft().thePlayer.sendChatMessage("/viewrecipe " + item);
- ses.schedule(this, 1000L, TimeUnit.MILLISECONDS);
- }
- }, 1000L, TimeUnit.MILLISECONDS);
- }*/
return false;
}
//#endregion
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementTextField.java b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementTextField.java
index 71c4d498..7cc96d42 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementTextField.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementTextField.java
@@ -557,8 +557,6 @@ public class GuiElementTextField extends GuiElement {
continue;
}
- //String c2 = bold ? EnumChatFormatting.BOLD.toString() : "" + c;
-
int len = Minecraft.getMinecraft().fontRendererObj.getStringWidth(String.valueOf(c));
if (bold) len++;
if (i >= leftIndex && i < rightIndex) {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
index f85c165a..0ad9fd99 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
@@ -242,7 +242,6 @@ public class ChatListener {
} else if (unformatted.startsWith(" RNG Meter")) {
RNGMeter = unformatted.substring(" RNG Meter - ".length());
} else if (matcher.matches()) {
- //matcher.group(1);
SlayerOverlay.slayerLVL = matcher.group(2);
if (!SlayerOverlay.slayerLVL.equals("9")) {
SlayerOverlay.slayerXp = matcher.group(3);
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuConfigTutorial.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuConfigTutorial.java
deleted file mode 100644
index 6a2602f8..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuConfigTutorial.java
+++ /dev/null
@@ -1,26 +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.miscgui.tutorials;
-
-public class NeuConfigTutorial extends TutorialBase {
- static {
- title = "NEU Config Tutorial";
- }
-}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuTutorial.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuTutorial.java
deleted file mode 100644
index c0a5d8c8..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuTutorial.java
+++ /dev/null
@@ -1,168 +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.miscgui.tutorials;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.util.ResourceLocation;
-
-public class NeuTutorial extends TutorialBase {
- static {
- title = "NEU Tutorial";
- }
-
- @Override
- public void setWorldAndResolution(Minecraft mc, int width, int height) {
- super.setWorldAndResolution(mc, width, height);
- screenshots = new ResourceLocation[18];
- for (int i = 0; i <= 17; i++) {
- screenshots[i] = new ResourceLocation("notenoughupdates:ss_small/ss" + (i + 1) + "-0.jpg");
- }
- }
-
- //static {
- // texts[0].put(new Vector2f(0.73f, 0.60f), Utils.createList(
- // EnumChatFormatting.GOLD + "Itemlist",
- // EnumChatFormatting.GRAY + "Here you will find a list of (most) skyblock items",
- // EnumChatFormatting.GRAY + "The itemlist can be accessed by opening your inventory or most menus while on skyblock"
- // ));
- // texts[1].put(new Vector2f(0.73f, 0.16f), Utils.createList(
- // EnumChatFormatting.GOLD + "Itemlist",
- // EnumChatFormatting.GRAY + "These are the page controls for the itemlist",
- // EnumChatFormatting.GRAY + "Clicking these controls will bring you to other pages of the itemlist"
- // ));
- // texts[2].put(new Vector2f(0.73f, 1.05f), Utils.createList(
- // EnumChatFormatting.GOLD + "Itemlist",
- // EnumChatFormatting.GRAY + "These are the sorting controls for the itemlist",
- // EnumChatFormatting.GRAY + "The buttons on the left control the ordering of the items",
- // EnumChatFormatting.GRAY + "The buttons on the right can be used to filter a certain type of item"
- // ));
- // texts[3].put(new Vector2f(0.39f, 1.04f), Utils.createList(
- // EnumChatFormatting.GOLD + "Itemlist",
- // EnumChatFormatting.GRAY + "This is the search bar for the itemlist",
- // EnumChatFormatting.GRAY + "Double-click the bar to enable inventory search mode",
- // EnumChatFormatting.GRAY + "The button on the left opens up the mod settings",
- // EnumChatFormatting.GRAY + "The button on the right displays this tutorial"
- // ));
- // texts[4].put(new Vector2f(0.39f, 0.99f), Utils.createList(
- // EnumChatFormatting.GOLD + "QuickCommands",
- // EnumChatFormatting.GRAY + "These are the QuickCommands",
- // EnumChatFormatting.GRAY + "They let you warp around or access certain menus more easily"
- // ));
- // texts[5].put(new Vector2f(0.7f, 0.71f), Utils.createList(
- // EnumChatFormatting.GOLD + "Itemlist",
- // EnumChatFormatting.GRAY + "Hover over an item in the list to display it's lore",
- // EnumChatFormatting.GRAY + "Left clicking some items will display the recipe for that item",
- // EnumChatFormatting.GRAY + "Right clicking some items will display a wiki page for that item",
- // EnumChatFormatting.GRAY + "'F' will favourite an item, putting it to the top of the itemlist"
- // ));
- // texts[6].put(new Vector2f(0.17f, 0.21f), Utils.createList(
- // EnumChatFormatting.GOLD + "Collection Log",
- // EnumChatFormatting.GRAY +
- // "This is the collection log. It can be accessed using the /neucl command, or via the QuickCommand",
- // EnumChatFormatting.GRAY +
- // "The collection log keeps track of all items that enter your inventory while you are playing skyblock",
- // EnumChatFormatting.GRAY + "If you are a completionist, this feature is for you"
- // ));
- // texts[7].put(new Vector2f(0.05f, 0.13f), Utils.createList(
- // EnumChatFormatting.GOLD + "Collection Log",
- // EnumChatFormatting.GRAY + "Clicking on 'Filter' will change the items that",
- // EnumChatFormatting.GRAY + "appear in the list"
- // ));
- // texts[8].put(new Vector2f(0.35f, 0.74f), Utils.createList(
- // EnumChatFormatting.GOLD + "NeuAH",
- // EnumChatFormatting.GRAY + "This is the NEU Auction House (NeuAH)",
- // EnumChatFormatting.GRAY +
- // "This AH can be accessed from anywhere using the /neuah command, or via the QuickCommand",
- // EnumChatFormatting.GRAY +
- // "The items here refresh automatically, so there is no need to close the GUI to see the latest auctions",
- // EnumChatFormatting.GRAY + "Sometimes, you might have to wait until the list is populated with items from the API"
- // ));
- // texts[9].put(new Vector2f(0.41f, 0.40f), Utils.createList(
- // EnumChatFormatting.GOLD + "NeuAH",
- // EnumChatFormatting.GRAY + "These tabs control the items that appear in NeuAH",
- // EnumChatFormatting.GRAY +
- // "You can find the main categories on the top of the GUI and subcategories appear on the side of the GUI once a main category is selected"
- // ));
- // texts[10].put(new Vector2f(0.57f, 0.38f), Utils.createList(
- // EnumChatFormatting.GOLD + "NeuAH",
- // EnumChatFormatting.GRAY + "Search for items using the search bar at the top",
- // EnumChatFormatting.GRAY + "Boolean operators such as &, | or ! work here."
- // ));
- // texts[10].put(new Vector2f(0.40f, 0.72f), Utils.createList(
- // EnumChatFormatting.GOLD + "NeuAH",
- // EnumChatFormatting.GRAY + "This toolbar contains many useful features",
- // EnumChatFormatting.GRAY + "which control the sorting and ordering of",
- // EnumChatFormatting.GRAY + "the auction house, similar to the normal AH"
- // ));
- // texts[11].put(new Vector2f(0.55f, 0.72f), Utils.createList(
- // EnumChatFormatting.GOLD + "NeuAH",
- // EnumChatFormatting.GRAY + "Clicking on an item will bring up the auction view",
- // EnumChatFormatting.GRAY + "Here you can viewer the buyer/seller and place bids or make purchases",
- // EnumChatFormatting.GRAY + "Trying to purchase an item will result in a confirmation GUI similar to the normal AH"
- // ));
- // texts[12].put(new Vector2f(0.28f, 0.82f), Utils.createList(
- // EnumChatFormatting.GOLD + "Profile Viewer",
- // EnumChatFormatting.GRAY + "Access the profile viewer using /neuprofile (ign) or /pv (ign)",
- // EnumChatFormatting.GRAY + "This is the main page of the profile viewer",
- // EnumChatFormatting.GRAY + "This page contains basic information like stats and skill levels"
- // ));
- // texts[12].put(new Vector2f(0.72f, 0.55f), Utils.createList(
- // EnumChatFormatting.GOLD + "Profile Viewer",
- // EnumChatFormatting.GRAY +
- // "Click the button on the left to switch profiles and use the bar on the right to switch players"
- // ));
- // texts[13].put(new Vector2f(0.28f, 0.82f), Utils.createList(
- // EnumChatFormatting.GOLD + "Profile Viewer",
- // EnumChatFormatting.GRAY + "This is the extra info page of the profile viewer",
- // EnumChatFormatting.GRAY +
- // "This page contains all the small bits of information about a player that don't fit anywhere else"
- // ));
- // texts[14].put(new Vector2f(0.28f, 0.82f), Utils.createList(
- // EnumChatFormatting.GOLD + "Profile Viewer",
- // EnumChatFormatting.GRAY + "This is the inventories page of the profile viewer",
- // EnumChatFormatting.GRAY +
- // "Click on the inventory icons in the top-left or use your keyboard to switch the inventory type",
- // EnumChatFormatting.GRAY + "The bar on the bottom-left searches the current inventory for matching items"
- // ));
- // texts[15].put(new Vector2f(0.28f, 0.82f), Utils.createList(
- // EnumChatFormatting.GOLD + "Profile Viewer",
- // EnumChatFormatting.GRAY + "This is the collections page of the profile viewer",
- // EnumChatFormatting.GRAY + "Click on the icons on the left or use the keyboard shortcut to switch collection type"
- // ));
- // texts[16].put(new Vector2f(0.28f, 0.82f), Utils.createList(
- // EnumChatFormatting.GOLD + "Profile Viewer",
- // EnumChatFormatting.GRAY + "This is the pets page of the profile viewer",
- // EnumChatFormatting.GRAY + "Click to select the pet on the left",
- // EnumChatFormatting.GRAY + "The selected pet's stats will display on the right"
- // ));
- // texts[17].put(new Vector2f(0.27f, 0.40f), Utils.createList(
- // EnumChatFormatting.GOLD + "Overlay",
- // EnumChatFormatting.GRAY + "Rearrange certain GUI elements of the main overlay using /neuoverlay",
- // EnumChatFormatting.GRAY +
- // "If you accidentally move them off screen, use the button in the top left to reset the GUI"
- // ));
- //}
- //
- //static {
- // buttons = new ArrayList<JsonObject>() {{
- // add(createNewButton(0.27f, 0.40f, new int[]{1, 2}, "TESTSHIT", "neu"));
- // }};
- //}
-}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/TutorialBase.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/TutorialBase.java
deleted file mode 100644
index 27172ed8..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/TutorialBase.java
+++ /dev/null
@@ -1,399 +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.miscgui.tutorials;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonPrimitive;
-import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
-import io.github.moulberry.notenoughupdates.util.Utils;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.client.gui.ScaledResolution;
-import net.minecraft.client.renderer.GlStateManager;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.ClientCommandHandler;
-import org.lwjgl.input.Keyboard;
-import org.lwjgl.opengl.GL11;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import static io.github.moulberry.notenoughupdates.miscgui.GuiEnchantColour.custom_ench_colour;
-
-public class TutorialBase extends GuiScreen {
- private int guiLeft = 0;
- private int guiTop = 0;
- private int sizeX = 0;
- private int sizeY = 0;
-
- protected static String title;
-
- private int page = 0;
- private final ResourceLocation screenshotBorder = new ResourceLocation("notenoughupdates:ss_border.jpg");
-
- protected ResourceLocation[] screenshots = null;
-
- int scaleFactor = 0;
-
- @Override
- public void setWorldAndResolution(Minecraft mc, int width, int height) {
- super.setWorldAndResolution(mc, width, height);
- }
-
- @Override
- protected void keyTyped(char typedChar, int keyCode) throws IOException {
- super.keyTyped(typedChar, keyCode);
- if (keyCode == Keyboard.KEY_LEFT) {
- page--;
- } else if (keyCode == Keyboard.KEY_RIGHT) {
- page++;
- }
- }
-
- @Override
- public void drawScreen(int mouseX, int mouseY, float partialTicks) {
- super.drawScreen(mouseX, mouseY, partialTicks);
-
- drawDefaultBackground();
-
- ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft());
- scaleFactor = scaledResolution.getScaleFactor();
-
- sizeX = width / 2 + 40 / scaleFactor;
- sizeY = height / 2 + 40 / scaleFactor;
- guiLeft = width / 4 - 20 / scaleFactor;
- guiTop = height / 4 - 20 / scaleFactor;
-
- Minecraft.getMinecraft().getTextureManager().bindTexture(screenshotBorder);
- Utils.drawTexturedRect(guiLeft, guiTop, sizeX, sizeY);
-
- page = Math.max(0, Math.min(17, page));
-
- Minecraft.getMinecraft().getTextureManager().bindTexture(screenshots[page]);
- Utils.drawTexturedRect(
- guiLeft + 20f / scaleFactor,
- guiTop + 20f / scaleFactor,
- sizeX - 40f / scaleFactor,
- sizeY - 40f / scaleFactor
- );
-
- Utils.drawStringCentered(
- EnumChatFormatting.GOLD + title + " - Page " + (page + 1) + "/" + (texts.size()) + " - Use arrow keys",
- Minecraft.getMinecraft().fontRendererObj,
- width / 2,
- guiTop + 8,
- true,
- 0
- );
- if (scaleFactor != 2)
- Utils.drawStringCentered(
- EnumChatFormatting.GOLD + "Use GUI Scale normal for better reading experience",
- Minecraft.getMinecraft().fontRendererObj,
- width / 2,
- guiTop + 18,
- true,
- 0
- );
- JsonArray pageTexts = texts.get(page);
- for (int i = 0; i < pageTexts.size(); i++) {
- JsonObject textElement = pageTexts.get(i).getAsJsonObject();
- float oldX = textElement.get("x").getAsFloat();
- float oldY = textElement.get("y").getAsFloat();
-
- // List<String> text = entry.getValue();
- JsonArray textArray = textElement.getAsJsonArray("lines");
- List<String> text = new ArrayList<>();
- for (int j = 0; j < textArray.size(); j++) {
- text.add(textArray.get(j).getAsString());
- }
-
- float x = guiLeft + 20f / scaleFactor + (sizeX - 40f / scaleFactor) * oldX;
- float y = guiTop + 20f / scaleFactor + (sizeY - 40f / scaleFactor) * oldY;
-
- Utils.drawHoveringText(
- text,
- (int) x,
- (int) y + 12,
- 100000,
- 100000,
- 200,
- Minecraft.getMinecraft().fontRendererObj
- );
- }
-
- drawButtons();
- }
-
- protected void drawButtons() {
-
- for (JsonObject button : buttons) {
- JsonArray pages = button.get("pages").getAsJsonArray();
- boolean drawButton = false;
- for (int i1 = 0; i1 < pages.size(); i1++) {
- if (pages.get(i1).getAsInt() == page) {
- drawButton = true;
- break;
- }
- }
- if (!drawButton) {
- continue;
- }
- float x = button.get("x").getAsFloat();
- float y = button.get("y").getAsFloat();
- String text = button.get("text").getAsString();
- // String command = button.get("command").getAsString();
- Minecraft.getMinecraft().getTextureManager().bindTexture(custom_ench_colour);
- GlStateManager.color(1, 1, 1, 1);
- Utils.drawTexturedRect(
- guiLeft + 20f / scaleFactor + (sizeX - 40f / scaleFactor) * x,
- guiTop + 20f / scaleFactor + (sizeY - 40f / scaleFactor) * y,
- 88,
- 20,
- 64 / 217f,
- 152 / 217f,
- 48 / 78f,
- 68 / 78f,
- GL11.GL_NEAREST
- );
- Utils.drawStringCenteredScaledMaxWidth(
- text,
- fontRendererObj,
- (guiLeft + 20f / scaleFactor + (sizeX - 40f / scaleFactor) * x) + 44,
- (guiTop + 20f / scaleFactor + (sizeY - 40f / scaleFactor) * y) + 10,
- false,
- 86,
- 4210752
- );
-
- }
- }
-
- @Override
- protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
- super.mouseClicked(mouseX, mouseY, mouseButton);
- int width = 88;
- int height = 20;
-
- for (JsonObject button : buttons) {
- JsonArray pages = button.get("pages").getAsJsonArray();
- boolean drawButton = false;
- for (int i1 = 0; i1 < pages.size(); i1++) {
- if (pages.get(i1).getAsInt() == page) {
- drawButton = true;
- break;
- }
- }
- if (!drawButton) {
- continue;
- }
- float x = button.get("x").getAsFloat();
- float y = button.get("y").getAsFloat();
- // String text = button.get("text").getAsString();
- float realX = guiLeft + 20f / scaleFactor + (sizeX - 40f / scaleFactor) * x;
- float realY = guiTop + 20f / scaleFactor + (sizeY - 40f / scaleFactor) * y;
- if (mouseX > realX && mouseX < realX + width && mouseY > realY && mouseY < realY + height) {
- String command = button.get("command").getAsString();
- NotEnoughUpdates.INSTANCE.openGui = null;
- ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/" + command);
- return;
- }
- }
- }
-
- protected static List<JsonArray> texts = new ArrayList<>();
-
- protected static List<JsonObject> buttons = new ArrayList<>();
-
- protected static JsonObject createNewButton(float x, float y, int[] pages, String text, String command) {
- JsonObject button = new JsonObject();
- JsonArray pagesArray = new JsonArray();
- for (int j : pages) {
- pagesArray.add(new JsonPrimitive(j));
- }
- button.add("pages", pagesArray);
- button.add("x", new JsonPrimitive(x));
- button.add("y", new JsonPrimitive(y));
- button.add("text", new JsonPrimitive(text));
- button.add("command", new JsonPrimitive(command));
- return button;
- }
-
- protected static JsonArray createNewTexts(JsonObject... texts) {
- JsonArray textArray = new JsonArray();
- for (JsonObject text : texts) {
- textArray.add(text);
- }
- return textArray;
- }
-
- protected static JsonObject createNewText(float x, float y, String... texts) {
- JsonObject tooltip = new JsonObject();
- tooltip.add("x", new JsonPrimitive(x));
- tooltip.add("y", new JsonPrimitive(y));
- JsonArray lines = new JsonArray();
- for (String text : texts) {
- lines.add(new JsonPrimitive(text));
- }
- tooltip.add("lines", lines);
- return tooltip;
- }
-
- protected static JsonObject createNewText(float x, float y, List<String> texts) {
- JsonObject tooltip = new JsonObject();
- tooltip.add("x", new JsonPrimitive(x));
- tooltip.add("y", new JsonPrimitive(y));
- JsonArray lines = new JsonArray();
- for (String text : texts) {
- lines.add(new JsonPrimitive(text));
- }
- tooltip.add("lines", lines);
- return tooltip;
- }
-
- //static {
- // for (int i = 0; i < 18; i++) {
- // texts[i] = new HashMap<>();
- // }
- // texts[0].put(new Vector2f(0.73f, 0.60f), Utils.createList(
- // EnumChatFormatting.GOLD + "Itemlist",
- // EnumChatFormatting.GRAY + "Here you will find a list of (most) skyblock items",
- // EnumChatFormatting.GRAY + "The itemlist can be accessed by opening your inventory or most menus while on skyblock"
- // ));
- // texts[1].put(new Vector2f(0.73f, 0.16f), Utils.createList(
- // EnumChatFormatting.GOLD + "Itemlist",
- // EnumChatFormatting.GRAY + "These are the page controls for the itemlist",
- // EnumChatFormatting.GRAY + "Clicking these controls will bring you to other pages of the itemlist"
- // ));
- // texts[2].put(new Vector2f(0.73f, 1.05f), Utils.createList(
- // EnumChatFormatting.GOLD + "Itemlist",
- // EnumChatFormatting.GRAY + "These are the sorting controls for the itemlist",
- // EnumChatFormatting.GRAY + "The buttons on the left control the ordering of the items",
- // EnumChatFormatting.GRAY + "The buttons on the right can be used to filter a certain type of item"
- // ));
- // texts[3].put(new Vector2f(0.39f, 1.04f), Utils.createList(
- // EnumChatFormatting.GOLD + "Itemlist",
- // EnumChatFormatting.GRAY + "This is the search bar for the itemlist",
- // EnumChatFormatting.GRAY + "Double-click the bar to enable inventory search mode",
- // EnumChatFormatting.GRAY + "The button on the left opens up the mod settings",
- // EnumChatFormatting.GRAY + "The button on the right displays this tutorial"
- // ));
- // texts[4].put(new Vector2f(0.39f, 0.99f), Utils.createList(
- // EnumChatFormatting.GOLD + "QuickCommands",
- // EnumChatFormatting.GRAY + "These are the QuickCommands",
- // EnumChatFormatting.GRAY + "They let you warp around or access certain menus more easily"
- // ));
- // texts[5].put(new Vector2f(0.7f, 0.71f), Utils.createList(
- // EnumChatFormatting.GOLD + "Itemlist",
- // EnumChatFormatting.GRAY + "Hover over an item in the list to display it's lore",
- // EnumChatFormatting.GRAY + "Left clicking some items will display the recipe for that item",
- // EnumChatFormatting.GRAY + "Right clicking some items will display a wiki page for that item",
- // EnumChatFormatting.GRAY + "'F' will favourite an item, putting it to the top of the itemlist"
- // ));
- // texts[6].put(new Vector2f(0.17f, 0.21f), Utils.createList(
- // EnumChatFormatting.GOLD + "Collection Log",
- // EnumChatFormatting.GRAY +
- // "This is the collection log. It can be accessed using the /neucl command, or via the QuickCommand",
- // EnumChatFormatting.GRAY +
- // "The collection log keeps track of all items that enter your inventory while you are playing skyblock",
- // EnumChatFormatting.GRAY + "If you are a completionist, this feature is for you"
- // ));
- // texts[7].put(new Vector2f(0.05f, 0.13f), Utils.createList(
- // EnumChatFormatting.GOLD + "Collection Log",
- // EnumChatFormatting.GRAY + "Clicking on 'Filter' will change the items that",
- // EnumChatFormatting.GRAY + "appear in the list"
- // ));
- // texts[8].put(new Vector2f(0.35f, 0.74f), Utils.createList(
- // EnumChatFormatting.GOLD + "NeuAH",
- // EnumChatFormatting.GRAY + "This is the NEU Auction House (NeuAH)",
- // EnumChatFormatting.GRAY +
- // "This AH can be accessed from anywhere using the /neuah command, or via the QuickCommand",
- // EnumChatFormatting.GRAY +
- // "The items here refresh automatically, so there is no need to close the GUI to see the latest auctions",
- // EnumChatFormatting.GRAY + "Sometimes, you might have to wait until the list is populated with items from the API"
- // ));
- // texts[9].put(new Vector2f(0.41f, 0.40f), Utils.createList(
- // EnumChatFormatting.GOLD + "NeuAH",
- // EnumChatFormatting.GRAY + "These tabs control the items that appear in NeuAH",
- // EnumChatFormatting.GRAY +
- // "You can find the main categories on the top of the GUI and subcategories appear on the side of the GUI once a main category is selected"
- // ));
- // texts[10].put(new Vector2f(0.57f, 0.38f), Utils.createList(
- // EnumChatFormatting.GOLD + "NeuAH",
- // EnumChatFormatting.GRAY + "Search for items using the search bar at the top",
- // EnumChatFormatting.GRAY + "Boolean operators such as &, | or ! work here."
- // ));
- // texts[10].put(new Vector2f(0.40f, 0.72f), Utils.createList(
- // EnumChatFormatting.GOLD + "NeuAH",
- // EnumChatFormatting.GRAY + "This toolbar contains many useful features",
- // EnumChatFormatting.GRAY + "which control the sorting and ordering of",
- // EnumChatFormatting.GRAY + "the auction house, similar to the normal AH"
- // ));
- // texts[11].put(new Vector2f(0.55f, 0.72f), Utils.createList(
- // EnumChatFormatting.GOLD + "NeuAH",
- // EnumChatFormatting.GRAY + "Clicking on an item will bring up the auction view",
- // EnumChatFormatting.GRAY + "Here you can viewer the buyer/seller and place bids or make purchases",
- // EnumChatFormatting.GRAY + "Trying to purchase an item will result in a confirmation GUI similar to the normal AH"
- // ));
- // texts[12].put(new Vector2f(0.28f, 0.82f), Utils.createList(
- // EnumChatFormatting.GOLD + "Profile Viewer",
- // EnumChatFormatting.GRAY + "Access the profile viewer using /neuprofile (ign) or /pv (ign)",
- // EnumChatFormatting.GRAY + "This is the main page of the profile viewer",
- // EnumChatFormatting.GRAY + "This page contains basic information like stats and skill levels"
- // ));
- // texts[12].put(new Vector2f(0.72f, 0.55f), Utils.createList(
- // EnumChatFormatting.GOLD + "Profile Viewer",
- // EnumChatFormatting.GRAY +
- // "Click the button on the left to switch profiles and use the bar on the right to switch players"
- // ));
- // texts[13].put(new Vector2f(0.28f, 0.82f), Utils.createList(
- // EnumChatFormatting.GOLD + "Profile Viewer",
- // EnumChatFormatting.GRAY + "This is the extra info page of the profile viewer",
- // EnumChatFormatting.GRAY +
- // "This page contains all the small bits of information about a player that don't fit anywhere else"
- // ));
- // texts[14].put(new Vector2f(0.28f, 0.82f), Utils.createList(
- // EnumChatFormatting.GOLD + "Profile Viewer",
- // EnumChatFormatting.GRAY + "This is the inventories page of the profile viewer",
- // EnumChatFormatting.GRAY +
- // "Click on the inventory icons in the top-left or use your keyboard to switch the inventory type",
- // EnumChatFormatting.GRAY + "The bar on the bottom-left searches the current inventory for matching items"
- // ));
- // texts[15].put(new Vector2f(0.28f, 0.82f), Utils.createList(
- // EnumChatFormatting.GOLD + "Profile Viewer",
- // EnumChatFormatting.GRAY + "This is the collections page of the profile viewer",
- // EnumChatFormatting.GRAY + "Click on the icons on the left or use the keyboard shortcut to switch collection type"
- // ));
- // texts[16].put(new Vector2f(0.28f, 0.82f), Utils.createList(
- // EnumChatFormatting.GOLD + "Profile Viewer",
- // EnumChatFormatting.GRAY + "This is the pets page of the profile viewer",
- // EnumChatFormatting.GRAY + "Click to select the pet on the left",
- // EnumChatFormatting.GRAY + "The selected pet's stats will display on the right"
- // ));
- // texts[17].put(new Vector2f(0.27f, 0.40f), Utils.createList(
- // EnumChatFormatting.GOLD + "Overlay",
- // EnumChatFormatting.GRAY + "Rearrange certain GUI elements of the main overlay using /neuoverlay",
- // EnumChatFormatting.GRAY +
- // "If you accidentally move them off screen, use the button in the top left to reset the GUI"
- // ));
- //}
-}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
index 1ee24ec8..b02565cd 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
@@ -117,7 +117,6 @@ public class Utils {
"VERY SPECIAL",
"SUPREME",
"^^ THAT ONE IS DIVINE ^^"
-//, "DIVINE"
};
public static String[] rarityArrC = new String[]{
EnumChatFormatting.WHITE + EnumChatFormatting.BOLD.toString() + "COMMON",
@@ -129,8 +128,6 @@ public class Utils {
EnumChatFormatting.RED + EnumChatFormatting.BOLD.toString() + "SPECIAL",
EnumChatFormatting.RED + EnumChatFormatting.BOLD.toString() + "VERY SPECIAL",
EnumChatFormatting.AQUA + EnumChatFormatting.BOLD.toString() + "DIVINE",
- EnumChatFormatting.AQUA + EnumChatFormatting.BOLD.toString() + "DIVINE",
- //EnumChatFormatting.AQUA+EnumChatFormatting.BOLD.toString()+"DIVINE",
};
public static final HashMap<String, String> rarityArrMap = new HashMap<String, String>() {{
put("COMMON", rarityArrC[0]);
@@ -142,7 +139,6 @@ public class Utils {
put("SPECIAL", rarityArrC[6]);
put("VERY SPECIAL", rarityArrC[7]);
put("DIVINE", rarityArrC[8]);
- // put("DIVINE", rarityArrC[9]);
}};
public static Splitter PATH_SPLITTER = Splitter.on(".").omitEmptyStrings().limit(2);
private static ScaledResolution lastScale = new ScaledResolution(Minecraft.getMinecraft());
@@ -1228,7 +1224,6 @@ public class Utils {
while ((lines++ < maxLines) || maxLines < 0) {
if (trimmed.length() == str.length()) {
drawStringScaled(trimmed, fr, x, y + yOff, shadow, colour, scale);
- //fr.drawString(trimmed, x, y + yOff, colour, shadow);
break;
} else if (trimmed.isEmpty()) {
yOff -= 12 * scale;