aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBuildTools <james.jenour@protonmail.com>2021-02-20 23:37:59 +0800
committerBuildTools <james.jenour@protonmail.com>2021-02-20 23:37:59 +0800
commit06cb4d208801e276a0e4d96252c00ae01d9e522d (patch)
treeedb9ea57e98398c004433be0b9a7fd7ce324b385
parentde834a97505c66b5655ee7ff91e78e84da3f81f3 (diff)
downloadNotEnoughUpdates-06cb4d208801e276a0e4d96252c00ae01d9e522d.tar.gz
NotEnoughUpdates-06cb4d208801e276a0e4d96252c00ae01d9e522d.tar.bz2
NotEnoughUpdates-06cb4d208801e276a0e4d96252c00ae01d9e522d.zip
charzard just 4 u
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java40
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java32
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java18
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java19
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/BackgroundBlur.java37
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigAccordionId.java14
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorAccordion.java14
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorAccordion.java86
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java1
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/config/struct/ConfigProcessor.java16
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/util/lerp/LerpingInteger.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/util/render/RenderUtils.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java10
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/cosmetics/GuiCosmetics.java41
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/cosmetics/NEUCape.java82
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonBlocks.java22
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java101
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java10
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/gamemodes/SBGamemodes.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/infopanes/InfoPane.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java126
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomSkulls.java22
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java46
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java64
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemCameraTransforms.java18
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java13
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRender.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderFish.java6
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTileEntitySpecialRenderer.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorld.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java900
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfigEditor.java338
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java1
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java9
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java57
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java10
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java338
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java12
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/HypixelApi.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java15
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/XPInformation.java4
-rw-r--r--src/main/resources/assets/notenoughupdates/capes/soldier.pngbin0 -> 72369 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/capes/soldier_preview.pngbin0 -> 29839 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/core/search.pngbin0 -> 401 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/hhh.json22
-rw-r--r--src/main/resources/mixins.notenoughupdates.json3
51 files changed, 1782 insertions, 800 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
index 401898d2..58efa371 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
@@ -28,14 +28,7 @@ public class ItemPriceInformation {
NumberFormat format = NumberFormat.getInstance(Locale.US);
if(bazaarItem) {
- int[] lines = {
- NotEnoughUpdates.INSTANCE.config.priceInfoBaz.line1,
- NotEnoughUpdates.INSTANCE.config.priceInfoBaz.line2,
- NotEnoughUpdates.INSTANCE.config.priceInfoBaz.line3,
- NotEnoughUpdates.INSTANCE.config.priceInfoBaz.line4,
- NotEnoughUpdates.INSTANCE.config.priceInfoBaz.line5,
- NotEnoughUpdates.INSTANCE.config.priceInfoBaz.line6
- };
+ List<Integer> lines = NotEnoughUpdates.INSTANCE.config.tooltipTweaks.priceInfoBaz;
boolean added = false;
@@ -51,8 +44,6 @@ public class ItemPriceInformation {
for(int lineId : lines) {
switch (lineId) {
case 0:
- continue;
- case 1:
if(bazaarInfo.has("avg_buy")) {
if(!added) {
tooltip.add("");
@@ -64,7 +55,7 @@ public class ItemPriceInformation {
EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(bazaarBuyPrice)+" coins");
}
break;
- case 2:
+ case 1:
if(bazaarInfo.has("avg_sell")) {
if(!added) {
tooltip.add("");
@@ -76,7 +67,7 @@ public class ItemPriceInformation {
EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(bazaarSellPrice)+" coins");
}
break;
- case 3:
+ case 2:
if(bazaarInfo.has("curr_buy")) {
if(!added) {
tooltip.add("");
@@ -88,7 +79,7 @@ public class ItemPriceInformation {
EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(bazaarInstantBuyPrice)+" coins");
}
break;
- case 4:
+ case 3:
if(bazaarInfo.has("curr_sell")) {
if(!added) {
tooltip.add("");
@@ -100,7 +91,7 @@ public class ItemPriceInformation {
EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(bazaarInstantSellPrice)+" coins");
}
break;
- case 5:
+ case 4:
if(craftCost.fromRecipe) {
if(!added) {
tooltip.add("");
@@ -115,22 +106,13 @@ public class ItemPriceInformation {
return added;
} else if(auctionItem) {
- int[] lines = {
- NotEnoughUpdates.INSTANCE.config.priceInfoAuc.line1,
- NotEnoughUpdates.INSTANCE.config.priceInfoAuc.line2,
- NotEnoughUpdates.INSTANCE.config.priceInfoAuc.line3,
- NotEnoughUpdates.INSTANCE.config.priceInfoAuc.line4,
- NotEnoughUpdates.INSTANCE.config.priceInfoAuc.line5,
- NotEnoughUpdates.INSTANCE.config.priceInfoAuc.line6
- };
+ List<Integer> lines = NotEnoughUpdates.INSTANCE.config.tooltipTweaks.priceInfoAuc;
boolean added = false;
for(int lineId : lines) {
switch (lineId) {
case 0:
- continue;
- case 1:
if(lowestBin > 0) {
if(!added) {
tooltip.add("");
@@ -140,7 +122,7 @@ public class ItemPriceInformation {
EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(lowestBin)+" coins");
}
break;
- case 2:
+ case 1:
if(auctionInfo != null) {
if(!added) {
tooltip.add("");
@@ -159,7 +141,7 @@ public class ItemPriceInformation {
}
break;
- case 3:
+ case 2:
if(auctionInfo != null) {
if(!added) {
tooltip.add("");
@@ -176,7 +158,7 @@ public class ItemPriceInformation {
}
}
break;
- case 4:
+ case 3:
if(craftCost.fromRecipe) {
if(!added) {
tooltip.add("");
@@ -186,7 +168,7 @@ public class ItemPriceInformation {
EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format((int)craftCost.craftCost)+" coins");
}
break;
- case 5:
+ case 4:
if(lowestBinAvg > 0) {
if(!added) {
tooltip.add("");
@@ -196,7 +178,7 @@ public class ItemPriceInformation {
EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(lowestBinAvg)+" coins");
}
break;
- case 6:
+ case 5:
if(Constants.ESSENCECOSTS == null) break;
JsonObject essenceCosts = Constants.ESSENCECOSTS;
if(!essenceCosts.has(internalname)) {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
index 4ba2cba9..838f0b0a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
@@ -185,7 +185,7 @@ public class NEUEventListener {
longUpdate = true;
lastLongUpdate = currentTime;
}
- if(!neu.config.dungeonBlock.slowDungeonBlocks) {
+ if(!neu.config.dungeons.slowDungeonBlocks) {
DungeonBlocks.tick();
}
DungeonWin.tick();
@@ -254,7 +254,7 @@ public class NEUEventListener {
NotEnoughUpdates.profileViewer.putNameUuid(Minecraft.getMinecraft().thePlayer.getName(),
Minecraft.getMinecraft().thePlayer.getUniqueID().toString().replace("-", ""));
- if(neu.config.dungeonBlock.slowDungeonBlocks) {
+ if(neu.config.dungeons.slowDungeonBlocks) {
DungeonBlocks.tick();
}
@@ -287,7 +287,7 @@ public class NEUEventListener {
displayUpdateMessageIfOutOfDate();
}
- if(neu.config.hidden.doRamNotif) {
+ if(neu.config.notifications.doRamNotif) {
long maxMemoryMB = Runtime.getRuntime().maxMemory()/1024L/1024L;
if(maxMemoryMB > 4100) {
notificationDisplayMillis = System.currentTimeMillis();
@@ -295,9 +295,9 @@ public class NEUEventListener {
notificationLines.add(EnumChatFormatting.DARK_RED+"Too much memory allocated!");
notificationLines.add(String.format(EnumChatFormatting.DARK_GRAY+"NEU has detected %03dMB of memory allocated to Minecraft!", maxMemoryMB));
notificationLines.add(EnumChatFormatting.DARK_GRAY+"It is recommended to allocated between 2-4GB of memory");
- notificationLines.add(EnumChatFormatting.DARK_GRAY+"More than 4GB WILL cause FPS issues, EVEN if you have 16GB+ available");
+ notificationLines.add(EnumChatFormatting.DARK_GRAY+"More than 4GB MAY cause FPS issues, EVEN if you have 16GB+ available");
notificationLines.add("");
- notificationLines.add(EnumChatFormatting.DARK_GRAY+"For more information, visit #ram-info in discord.gg/spr6ESn");
+ notificationLines.add(EnumChatFormatting.DARK_GRAY+"For more information, visit #ram-info in discord.gg/moulberry");
}
}
@@ -884,9 +884,9 @@ public class NEUEventListener {
}
private void renderDungeonChestOverlay(GuiScreen gui) {
- if(neu.config.dungeonProfit.profitDisplayLoc == 3) return;
+ if(neu.config.dungeons.profitDisplayLoc == 3) return;
- if(gui instanceof GuiChest && neu.config.dungeonProfit.profitDisplayLoc != 2) {
+ if(gui instanceof GuiChest && neu.config.dungeons.profitDisplayLoc != 2) {
try {
int xSize = (int) Utils.getField(GuiContainer.class, gui, "xSize", "field_146999_f");
int ySize = (int) Utils.getField(GuiContainer.class, gui, "ySize", "field_147000_g");
@@ -933,7 +933,7 @@ public class NEUEventListener {
if(bazaarPrice > 0) {
worth = bazaarPrice;
} else {
- switch(neu.config.dungeonProfit.profitType) {
+ switch(neu.config.dungeons.profitType) {
case 1:
worth = neu.manager.auctionManager.getItemAvgBin(internal);
break;
@@ -1025,7 +1025,7 @@ public class NEUEventListener {
plStringBIN = prefix + "-" + format.format(-profitLossBIN) + " coins";
}
- if(neu.config.dungeonProfit.profitDisplayLoc == 1 && !valueStringBIN2.equals(missingItem)) {
+ if(neu.config.dungeons.profitDisplayLoc == 1 && !valueStringBIN2.equals(missingItem)) {
int w = Minecraft.getMinecraft().fontRendererObj.getStringWidth(plStringBIN);
GlStateManager.disableLighting();
GlStateManager.translate(0, 0, 200);
@@ -1729,7 +1729,7 @@ public class NEUEventListener {
}
}
- if(neu.config.dungeonProfit.profitDisplayLoc == 2 && Minecraft.getMinecraft().currentScreen instanceof GuiChest) {
+ if(neu.config.dungeons.profitDisplayLoc == 2 && Minecraft.getMinecraft().currentScreen instanceof GuiChest) {
if(line.contains(EnumChatFormatting.GREEN+"Open Reward Chest")) {
dungeonProfit = true;
} else if(index == 7 && dungeonProfit) {
@@ -1771,7 +1771,7 @@ public class NEUEventListener {
if(bazaarPrice > 0) {
worth = bazaarPrice;
} else {
- switch(neu.config.dungeonProfit.profitType) {
+ switch(neu.config.dungeons.profitType) {
case 1:
worth = neu.manager.auctionManager.getItemAvgBin(internal);
break;
@@ -1886,6 +1886,16 @@ public class NEUEventListener {
event.toolTip.clear();
event.toolTip.addAll(newTooltip);
+ HashMap<String, List<String>> loreBuckets = new HashMap<>();
+
+ List<String> hypixelOrder = new ArrayList<>();
+
+ hypixelOrder.add("attributes");
+ hypixelOrder.add("enchants");
+ hypixelOrder.add("ability");
+ hypixelOrder.add("reforge_bonus");
+ hypixelOrder.add("rarity");
+
if(neu.config.tooltipTweaks.showPriceInfoInvItem) {
ItemPriceInformation.addToTooltip(event.toolTip, internalname, event.itemStack);
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
index bbaa08db..061d6774 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
@@ -6,6 +6,7 @@ import io.github.moulberry.notenoughupdates.auction.APIManager;
import io.github.moulberry.notenoughupdates.miscgui.GuiItemRecipe;
import io.github.moulberry.notenoughupdates.util.Constants;
import io.github.moulberry.notenoughupdates.util.HypixelApi;
+import io.github.moulberry.notenoughupdates.util.SBInfo;
import io.github.moulberry.notenoughupdates.util.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.KeyBinding;
@@ -25,9 +26,6 @@ import java.net.URL;
import java.net.URLConnection;
import java.nio.charset.StandardCharsets;
import java.util.*;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ThreadPoolExecutor;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
@@ -105,16 +103,8 @@ public class NEUManager {
this.currentProfile = currentProfile;
}
- public void setCurrentProfileBackup(String currentProfile) {
- this.currentProfileBackup = currentProfile;
- }
-
public String getCurrentProfile() {
- if(currentProfile == null || currentProfile.length() == 0) {
- return currentProfileBackup;
- } else {
- return currentProfile;
- }
+ return SBInfo.getInstance().currentProfile;
}
public void saveItemRenameConfig() {
@@ -606,11 +596,11 @@ public class NEUManager {
*/
public <T> Map<String, T> subMapWithKeysThatAreSuffixes(String prefix, NavigableMap<String, T> map) {
if ("".equals(prefix)) return map;
- String lastKey = createLexicographicallyNextStringOfTheSameLenght(prefix);
+ String lastKey = createLexicographicallyNextStringOfTheSameLength(prefix);
return map.subMap(prefix, true, lastKey, false);
}
- String createLexicographicallyNextStringOfTheSameLenght(String input) {
+ public String createLexicographicallyNextStringOfTheSameLength(String input) {
final int lastCharPosition = input.length()-1;
String inputWithoutLastChar = input.substring(0, lastCharPosition);
char lastChar = input.charAt(lastCharPosition) ;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index a87d266a..689a98f1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -1732,7 +1732,7 @@ public class NEUOverlay extends Gui {
BackgroundBlur.renderBlurredBackground(NotEnoughUpdates.INSTANCE.config.itemlist.bgBlurFactor,
width, height,
leftSide+getBoxPadding()-5, getBoxPadding()-5,
- paneWidth-getBoxPadding()*2+10, height-getBoxPadding()*2+10);
+ paneWidth-getBoxPadding()*2+10, height-getBoxPadding()*2+10, true);
Gui.drawRect(leftSide+getBoxPadding()-5, getBoxPadding()-5,
leftSide+getBoxPadding()-5+paneWidth-getBoxPadding()*2+10,
getBoxPadding()-5+height-getBoxPadding()*2+10, 0xc8101010);
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
index 447dc8d1..59c821b0 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
@@ -690,6 +690,7 @@ public class NotEnoughUpdates {
Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED+devFailStrings[devFailIndex++]));
return;
}
+ if(args.length == 1 && args[0].equalsIgnoreCase("dev")) NotEnoughUpdates.INSTANCE.config.hidden.dev = true;
Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN+"Executing dubious code"));
/*Minecraft.getMinecraft().thePlayer.rotationYaw = 0;
Minecraft.getMinecraft().thePlayer.rotationPitch = 0;
@@ -876,6 +877,23 @@ public class NotEnoughUpdates {
SimpleCommand cosmeticsCommand = new SimpleCommand("neucosmetics", new SimpleCommand.ProcessCommandRunnable() {
public void processCommand(ICommandSender sender, String[] args) {
+ if(Loader.isModLoaded("optifine") &&
+ new File(Minecraft.getMinecraft().mcDataDir, "optionsof.txt").exists()) {
+ try(InputStream in = new FileInputStream(new File(Minecraft.getMinecraft().mcDataDir, "optionsof.txt"))) {
+ BufferedReader reader = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8));
+
+ String line;