aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java
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 /src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java
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
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java159
1 files changed, 1 insertions, 158 deletions
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