aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorMoulberry <james.jenour@student.scotch.wa.edu.au>2020-10-18 21:01:11 +1100
committerMoulberry <james.jenour@student.scotch.wa.edu.au>2020-10-18 21:01:11 +1100
commita0402708801b525145d01d0f4da17f0ba9d93455 (patch)
treece0b58df707388449558073df3aa9492efaf8978 /src/main
parent275fe45caa8eb1048914d864aafae21f3f3a1157 (diff)
downloadNotEnoughUpdates-a0402708801b525145d01d0f4da17f0ba9d93455.tar.gz
NotEnoughUpdates-a0402708801b525145d01d0f4da17f0ba9d93455.tar.bz2
NotEnoughUpdates-a0402708801b525145d01d0f4da17f0ba9d93455.zip
1.4
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/AccessoryBagOverlay.java299
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/BetterContainers.java92
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/CustomItemEffects.java7
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/DungeonBlocks.java315
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/DungeonMap.java416
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/GuiEnchantColour.java35
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/GuiTextures.java6
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java260
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java22
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java102
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java193
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java20
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java77
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java32
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/cosmetics/GuiCosmetics.java46
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/cosmetics/NEUCape.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/gamemodes/SBGamemodes.java14
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/infopanes/CollectionLogInfoPane.java6
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/infopanes/InfoPane.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/infopanes/SettingsInfoPane.java366
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementTextField.java69
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityPlayer.java34
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiChest.java20
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java10
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderBat.java40
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderList.java38
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTileEntitySpecialRenderer.java33
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinVboRenderList.java42
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/Options.java125
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java47
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/Panorama.java11
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/questing/SBInfo.java (renamed from src/main/java/io/github/moulberry/notenoughupdates/questing/SBScoreboardData.java)61
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/questing/requirements/RequirementIslandType.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/HypixelApi.java14
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/SpecialColour.java81
-rw-r--r--src/main/resources/assets/notenoughupdates/button_white.pngbin0 -> 6570 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/capes/lava.pngbin0 -> 169280 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/capes/mbstaff.pngbin0 -> 470630 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/capes/packshq.pngbin0 -> 22716 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/colour_selector_bar.pngbin0 -> 245 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/colour_selector_bar_alpha.pngbin0 -> 240 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/colour_selector_chroma.pngbin0 -> 211 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/colour_selector_dot.pngbin0 -> 3677 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style1/dynamic_54.pngbin5234 -> 4299 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style1/dynamic_54_button_ctm.pngbin607 -> 4312 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style1/dynamic_54_slot_ctm.pngbin539 -> 4721 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style1/dynamic_config.json3
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style2/dynamic_54.pngbin5429 -> 4424 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style2/dynamic_54_button_ctm.pngbin0 -> 4723 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style2/dynamic_54_slot_ctm.pngbin0 -> 4721 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style2/dynamic_config.json3
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style3/dynamic_54.pngbin5519 -> 2555 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style3/dynamic_54_button_ctm.pngbin539 -> 4602 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style3/dynamic_54_slot_ctm.pngbin0 -> 4602 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style3/dynamic_config.json3
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style4/dynamic_54.pngbin0 -> 5234 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style4/dynamic_54_button_ctm.pngbin3437 -> 607 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style4/dynamic_54_slot_ctm.pngbin0 -> 539 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style5/dynamic_54.pngbin0 -> 5429 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style5/dynamic_54_button_ctm.png (renamed from src/main/resources/assets/notenoughupdates/dynamic_54/dynamic_54_button_ctm.png)bin543 -> 543 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style5/dynamic_54_slot_ctm.pngbin0 -> 539 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style6/dynamic_54.pngbin0 -> 5519 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style6/dynamic_54_button_ctm.pngbin0 -> 539 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style6/dynamic_54_slot_ctm.pngbin0 -> 539 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style7/dynamic_54.pngbin0 -> 5234 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style7/dynamic_54_button_ctm.pngbin0 -> 3437 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/style7/dynamic_54_slot_ctm.pngbin0 -> 539 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/toggle_off.pngbin0 -> 389 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/dynamic_54/toggle_on.pngbin0 -> 406 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/shaders/lava_cape.frag32
-rw-r--r--src/main/resources/assets/notenoughupdates/shaders/lava_cape.vert12
-rw-r--r--src/main/resources/assets/notenoughupdates/supersecretassets/bald.pngbin0 -> 19909 bytes
-rw-r--r--src/main/resources/mixins.notenoughupdates.json7
73 files changed, 2682 insertions, 321 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/AccessoryBagOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/AccessoryBagOverlay.java
index 65d4efc7..1011f3cc 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/AccessoryBagOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/AccessoryBagOverlay.java
@@ -1,11 +1,13 @@
package io.github.moulberry.notenoughupdates;
import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import io.github.moulberry.notenoughupdates.profileviewer.PlayerStats;
import io.github.moulberry.notenoughupdates.util.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.gui.inventory.GuiChest;
import net.minecraft.client.gui.inventory.GuiContainer;
@@ -41,6 +43,7 @@ public class AccessoryBagOverlay {
private static final int TAB_BONUS = 2;
private static final int TAB_DUP = 3;
private static final int TAB_MISSING = 4;
+ private static final int TAB_OPTIMIZER = 5;
private static final ItemStack[] TAB_STACKS = new ItemStack[] {
Utils.createItemStack(Items.dye, EnumChatFormatting.DARK_AQUA+"Basic Information",
@@ -53,6 +56,8 @@ public class AccessoryBagOverlay {
8),
Utils.createItemStack(Item.getItemFromBlock(Blocks.barrier), EnumChatFormatting.DARK_AQUA+"Missing",
0),
+ Utils.createItemStack(Item.getItemFromBlock(Blocks.redstone_block), EnumChatFormatting.DARK_AQUA+"Optimizer",
+ 0),
};
private static int currentTab = TAB_BASIC;
@@ -82,6 +87,36 @@ public class AccessoryBagOverlay {
if(currentTab > TAB_MISSING) currentTab = TAB_MISSING;
}
+ if(currentTab == TAB_OPTIMIZER) {
+ int x = guiLeft+xSize+3;
+ int y = guiTop;
+
+ if(mouseY > y+92 && mouseY < y+103) {
+ if(mouseX > x+5 && mouseX < x+75) {
+ mainWeapon = (int)Math.floor((mouseX-x-5)/70f*9);
+ if(mainWeapon < 1) {
+ mainWeapon = 1;
+ } else if(mainWeapon > 9) {
+ mainWeapon = 9;
+ }
+ }
+ }
+
+ if(mouseX > x+5 && mouseX < x+35 || mouseX > x+45 && mouseX < x+75) {
+ boolean set = mouseX > x+5 && mouseX < x+35;
+
+ if(mouseY > y+32 && mouseY < y+43) {
+ forceCC = set;
+ } else if(mouseY > y+52 && mouseY < y+63) {
+ forceAS = set;
+ } else if(mouseY > y+72 && mouseY < y+83) {
+ useGodPot = set;
+ } else if(mouseY > y+92 && mouseY < y+103) {
+ allowShaded = set;
+ }
+ }
+ }
+
return true;
} catch(Exception e) {
return false;
@@ -94,6 +129,8 @@ public class AccessoryBagOverlay {
talismanCountRarity = null;
totalStats = null;
reforgeStats = null;
+ duplicates = null;
+ missing = null;
}
private static Set<ItemStack> accessoryStacks = new HashSet<>();
@@ -116,7 +153,7 @@ public class AccessoryBagOverlay {
}
}
- Utils.drawStringCenteredScaledMaxWidth("# By Rarity", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, true, 70,
+ Utils.drawStringCenteredScaledMaxWidth("# By Rarity", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70,
new Color(80, 80, 80).getRGB());
int yIndex = 0;
@@ -137,7 +174,7 @@ public class AccessoryBagOverlay {
}
}
- Utils.drawStringCenteredScaledMaxWidth("Total Stats", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, true, 70,
+ Utils.drawStringCenteredScaledMaxWidth("Total Stats", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70,
new Color(80, 80, 80).getRGB());
int yIndex = 0;
for(int i=0; i<PlayerStats.defaultStatNames.length; i++) {
@@ -166,7 +203,7 @@ public class AccessoryBagOverlay {
}
}
- Utils.drawStringCenteredScaledMaxWidth("Reforge Stats", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, true, 70,
+ Utils.drawStringCenteredScaledMaxWidth("Reforge Stats", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70,
new Color(80, 80, 80).getRGB());
int yIndex = 0;
for(int i=0; i<PlayerStats.defaultStatNames.length; i++) {
@@ -186,13 +223,241 @@ public class AccessoryBagOverlay {
}
}
- private static Set<ItemStack> duplicates = new HashSet<>();
+ private static Set<ItemStack> duplicates = null;
public static void renderDuplicatesOverlay(int x, int y) {
- Utils.drawStringCenteredScaledMaxWidth("Duplicates", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, true, 70,
- new Color(80, 80, 80).getRGB());
+ if(duplicates == null) {
+ JsonObject misc = Utils.getConstant("misc");
+ if(misc == null) {
+ Utils.drawStringCenteredScaledMaxWidth("Duplicates: ERROR", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70,
+ new Color(80, 80, 80).getRGB());
+ return;
+ }
+ JsonElement talisman_upgrades_element = misc.get("talisman_upgrades");
+ if(talisman_upgrades_element == null) {
+ Utils.drawStringCenteredScaledMaxWidth("Duplicates: ERROR", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70,
+ new Color(80, 80, 80).getRGB());
+ return;
+ }
+ JsonObject talisman_upgrades = talisman_upgrades_element.getAsJsonObject();
+
+ duplicates = new HashSet<>();
+
+ Set<String> prevInternalnames = new HashSet<>();
+ for(ItemStack stack : accessoryStacks) {
+ String internalname = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(stack);
+
+ if(prevInternalnames.contains(internalname)) {
+ duplicates.add(stack);
+ continue;
+ }
+ prevInternalnames.add(internalname);
+
+ if(talisman_upgrades.has(internalname)) {
+ JsonArray upgrades = talisman_upgrades.get(internalname).getAsJsonArray();
+ for(ItemStack stack2 : accessoryStacks) {
+ if(stack != stack2) {
+ String internalname2 = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(stack2);
+ for(int j=0; j<upgrades.size(); j++) {
+ String upgrade = upgrades.get(j).getAsString();
+ if(internalname2.equals(upgrade)) {
+ duplicates.add(stack);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if(duplicates.isEmpty()) {
+ Utils.drawStringCenteredScaledMaxWidth("No Duplicates", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70,
+ new Color(80, 80, 80).getRGB());
+ } else {
+ Utils.drawStringCenteredScaledMaxWidth("Duplicates: " + duplicates.size(), Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70,
+ new Color(80, 80, 80).getRGB());
+
+ int yIndex = 0;
+ for(ItemStack duplicate : duplicates) {
+ renderAlignedString(duplicate.getDisplayName(), "", x+5, y+20+11*yIndex, 70);
+ if(duplicates.size() > 11) {
+ if(++yIndex >= 10) break;
+ } else {
+ if(++yIndex >= 11) break;
+ }
+ }
+
+ if(duplicates.size() > 11) {
+ Utils.drawStringCenteredScaledMaxWidth("+" + (duplicates.size()-10) + " More",
+ Minecraft.getMinecraft().fontRendererObj, x+40, y+16+121, false, 70,
+ new Color(80, 80, 80).getRGB());
+ }
+ }
}
+ private static List<ItemStack> missing = null;
public static void renderMissingOverlay(int x, int y) {
+ if(missing == null) {
+ JsonObject misc = Utils.getConstant("misc");
+ if(misc == null) {
+ Utils.drawStringCenteredScaledMaxWidth("Duplicates: ERROR", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70,
+ new Color(80, 80, 80).getRGB());
+ return;
+ }
+ JsonElement talisman_upgrades_element = misc.get("talisman_upgrades");
+ if(talisman_upgrades_element == null) {
+ Utils.drawStringCenteredScaledMaxWidth("Duplicates: ERROR", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70,
+ new Color(80, 80, 80).getRGB());
+ return;
+ }
+ JsonObject talisman_upgrades = talisman_upgrades_element.getAsJsonObject();
+
+ missing = new ArrayList<>();
+
+ List<String> missingInternal = new ArrayList<>();
+ for(Map.Entry<String, JsonObject> entry : NotEnoughUpdates.INSTANCE.manager.getItemInformation().entrySet()) {
+ if(entry.getValue().has("lore")) {
+ if(checkItemType(entry.getValue().get("lore").getAsJsonArray(), "ACCESSORY", "HATCCESSORY") >= 0) {
+ missingInternal.add(entry.getKey());
+ }
+ }
+ }
+
+ for(ItemStack stack : accessoryStacks) {
+ String internalname = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(stack);
+ missingInternal.remove(internalname);
+
+ for(Map.Entry<String, JsonElement> talisman_upgrade_element : talisman_upgrades.entrySet()) {
+ JsonArray upgrades = talisman_upgrade_element.getValue().getAsJsonArray();
+ for(int j=0; j<upgrades.size(); j++) {
+ String upgrade = upgrades.get(j).getAsString();
+ if(internalname.equals(upgrade)) {
+ missingInternal.remove(talisman_upgrade_element.getKey());
+ break;
+ }
+ }
+ }
+ }
+
+ missingInternal.sort(getItemComparator());
+
+ for(String internal : missingInternal) {
+ missing.add(NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get(internal)));
+ }
+ }
+ if(missing.isEmpty()) {
+ Utils.drawStringCenteredScaledMaxWidth("No Missing", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70,
+ new Color(80, 80, 80).getRGB());
+ } else {
+ Utils.drawStringCenteredScaledMaxWidth("Missing: " + missing.size(), Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70,
+ new Color(80, 80, 80).getRGB());
+
+ int yIndex = 0;
+ for(ItemStack missingStack : missing) {
+ renderAlignedString(missingStack.getDisplayName(), "", x+5, y+20+11*yIndex, 70);
+ if(missing.size() > 11) {
+ if(++yIndex >= 10) break;
+ } else {
+ if(++yIndex >= 11) break;
+ }
+ }
+
+ if(missing.size() > 11) {
+ Utils.drawStringCenteredScaledMaxWidth("+" + (missing.size()-10) + " More",
+ Minecraft.getMinecraft().fontRendererObj, x+40, y+16+121, false, 70,
+ new Color(80, 80, 80).getRGB());
+ }
+ }
+ }
+
+ private static boolean forceCC = false;
+ private static boolean forceAS = false;
+ private static boolean useGodPot = true;
+ private static boolean allowShaded = true;
+ private static int mainWeapon = 1;
+
+ public static void renderOptimizerOverlay(int x, int y) {
+ Utils.drawStringCenteredScaledMaxWidth("Optimizer", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70,
+ new Color(80, 80, 80).getRGB());
+
+ int light = new Color(220, 220, 220).getRGB();
+ int dark = new Color(170, 170, 170).getRGB();
+
+