diff options
author | nopothegamer <40329022+nopothegamer@users.noreply.github.com> | 2021-11-18 09:58:28 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-17 17:58:28 -0500 |
commit | f7e8edf3357db624212af5f24b74e7763c678fba (patch) | |
tree | 1cb9e22b478d2be2bb2efd460a5ef78164c2890f /src/main | |
parent | 0d74e49d429badd03f5f881715c637a1f06b0d88 (diff) | |
download | NotEnoughUpdates-f7e8edf3357db624212af5f24b74e7763c678fba.tar.gz NotEnoughUpdates-f7e8edf3357db624212af5f24b74e7763c678fba.tar.bz2 NotEnoughUpdates-f7e8edf3357db624212af5f24b74e7763c678fba.zip |
Added blocking clicks back to the enchanting minigames (#19)
* idk where im commiting to
* idk where im commiting to
* made tita overlay and waypoints work with dwarven overlay off
"fixed" divan rarity in neuah
made eitherwarp block overlay turn off able
* Added change notes
* i stopped being pepega and worked out how neu config works
* Added mining skill overlay
* fixed mining overlay
* add option to hide Mining waypoints in Dwarven mines when at location
* better check location
* Make cata xp in /pv be calculated on how many runs you have
* Added master cata xp rates
* Make gitignore not show as changed
* Added warnings to some things in /neu
* maybe fix hiding waypoints
* Added a fishing skill overlay
its kinda scuffed because of the interp stuff
* Hopefully fix Rampart's quarry (for real now)
* Moul said i could
no one leak in general or smth
* Cache itemstacks in miningoverlay and crystalhollows overlay (untested)
* Fix preinit crash due to manager not existing yet
* Make tab do the same as down button while in tab completion mode
* remove debug print
* Added pitch to farming overlay
* Changed the panoramas back to the old one because ery is scuffed
* isnt finished but should work for ery
* Made it so if ur mining 60 it just says maxed level instead of b u g
* Made skills not show int limit when at max level in skill overlays
* wh :omegalul: made neu
* sad you cant type that long in search bar
* Hello don't mind me just improving your workflow
* æ
* Oh also this
* Added the cata xp scaling(idk if m3 and 4 values are right)
* Added Expertise Progress
* Fix farming overlay
* Added cult/crops to next cult level
* Go to the other end of the tab-completion List when hitting the end
* remove debug prints
* added combat skill overlay and some changes to the others (combat doesnt work rn could someone look into it :prayge:)
* Added cooldown to god pot showing in todo overlay
* comment
* Added option to remove enchant glint in storage gui
* Added option to remove enchant glint in storage gui
* please fix
* please fix
* Fixed the placement of help.png
* Added fairy soul waypoints to misc
* unclear not clear
* Added dg partner cape
* fix space cape
* Fix space cape
* Make it so you can hold down keys in sign GUIs
* Added a button in storage menu to open the settings
Added an option to change the click names for /pv to /ah
* Made it so ur config doesnt reset
* Added bhop (shhh dont tell anyone)
* Added a help menu to /neuec
* changed fisgifis overlay button no work
* make working fishing tiemr
* jani can you test this out for us
* Added a gui locations tab
* very important feature
* Fixed wart hoe overlay if not alch 50
* Make it so the ding time is customizable
* Added coins/m to farming overlay
* Basic mining tab in pv
* Just for jani
* Just for jani v2
* works ig
* my balls
* hotm pv is mostly done missing some perks
* hotm pv done
* message goes here
* push so i can pr jani
* Final hotm pv texture + fix m3 and m4 cata xp
* edit: didnt work
* fixed up stuff dokm said
* added image for hotm pv
* Fixed previews for furf and dg capes
* removed combat overlay from location gui menu in /neu
* Start of a custom pv page
* Removed custom pv because -2 people would use it
Removed neubhop (found out bhop is bannable)
* update build gradle
* - Made it so treecap shows foraging xp instead of farming xp on the farming overlay
- Made it so a jungle axe with cult will show the "farming" overlay
* Added entrance + made blur limit at 100
* Added blocking clicks back to the enchanting minigames
* update patch notes
* Fixed rounding issue
* let you use screenshot in et overlay
* Added /neurepomode to toggle item editing and dev mode
* Changed "NEUAH is DISABLED! Enable in /neusettings." to /neu
* Changed misc overlays tab to todo overlays
* Added config option for npc retexture (idk if it works i dont have a pack to test it with)
* update patch note
* Fixed api key autofill with dg copy chat feature
* Fixed api key autofill with dg copy chat feature v2
* Made missing enchants not show on an item if its not missing any enchants
* remove todo because pepega
* Added a config option for dirt wand overlay
Added a config option for hoe of tilling
* patch notes
* Fix pet getlorereplacements crash (im guessing) (#21)
* Added an option to use short numbers (1.5mil) for price tooltips
* Added warning to slotlocking + short prices default to off
* make it not dungeon map
* Fixed pet overlay not updating when going into /pets
* Dokm after not making his own patch notes
* Fixed capital letter
* Refactor miscoverlays to todooverlays
* idk man make the short number prices use like 5 less lines
* Added an option to show next click in chronomatron
* added bz price to farming overlay coins/m (only wart rn)
* added bz price to farming overlay coins/m
* me when cactus price was divided by 1296 :pepela:
* unrefactor todo overlay because it resets the config
* Fixed fetchur for the 765754465th time
* Fixed time that experiment table resets + Made prevent missclicks off by default
Co-authored-by: Lulonaut <lulonaut@tutanota.de>
Co-authored-by: Lulonaut <67191924+Lulonaut@users.noreply.github.com>
Co-authored-by: DoKM <mcazzyman@gmail.com>
Co-authored-by: TymanWasTaken <tyman@tyman.tech>
Co-authored-by: MicrocontrollersDev <microcontrollersyt@gmail.com>
Co-authored-by: jani270 <jani270@gmx.de>
Co-authored-by: DoKM <54663875+DoKM@users.noreply.github.com>
Co-authored-by: IRONM00N <64110067+IRONM00N@users.noreply.github.com>
Diffstat (limited to 'src/main')
24 files changed, 512 insertions, 346 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java index 0aa80126..8fbb7c40 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java @@ -4,6 +4,7 @@ import com.google.gson.JsonObject; import io.github.moulberry.notenoughupdates.auction.APIManager; import io.github.moulberry.notenoughupdates.core.config.KeybindHelper; import io.github.moulberry.notenoughupdates.util.Constants; +import io.github.moulberry.notenoughupdates.util.Utils; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; @@ -37,6 +38,7 @@ public class ItemPriceInformation { boolean bazaarItem = bazaarInfo != null; NumberFormat format = NumberFormat.getInstance(Locale.US); + boolean shortNumber = NotEnoughUpdates.INSTANCE.config.tooltipTweaks.shortNumberFormatPrices; if (bazaarItem) { List<Integer> lines = NotEnoughUpdates.INSTANCE.config.tooltipTweaks.priceInfoBaz; @@ -64,7 +66,7 @@ public class ItemPriceInformation { } int bazaarBuyPrice = (int) bazaarInfo.get("avg_buy").getAsFloat() * stackMultiplier; tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "Bazaar Buy: " + - EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + format.format(bazaarBuyPrice) + " coins"); + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + (shortNumber && bazaarBuyPrice > 1000 ? Utils.shortNumberFormat(bazaarBuyPrice, 0) : format.format(bazaarBuyPrice)) + " coins"); } break; case 1: @@ -77,7 +79,7 @@ public class ItemPriceInformation { } int bazaarSellPrice = (int) bazaarInfo.get("avg_sell").getAsFloat() * stackMultiplier; tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "Bazaar Sell: " + - EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + format.format(bazaarSellPrice) + " coins"); + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + (shortNumber && bazaarSellPrice > 1000 ? Utils.shortNumberFormat(bazaarSellPrice, 0) : format.format(bazaarSellPrice)) + " coins"); } break; case 2: @@ -90,7 +92,7 @@ public class ItemPriceInformation { } int bazaarInstantBuyPrice = (int) bazaarInfo.get("curr_buy").getAsFloat() * stackMultiplier; tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "Bazaar Insta-Buy: " + - EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + format.format(bazaarInstantBuyPrice) + " coins"); + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + (shortNumber && bazaarInstantBuyPrice > 1000 ? Utils.shortNumberFormat(bazaarInstantBuyPrice, 0) : format.format(bazaarInstantBuyPrice)) + " coins"); } break; case 3: @@ -103,7 +105,7 @@ public class ItemPriceInformation { } int bazaarInstantSellPrice = (int) bazaarInfo.get("curr_sell").getAsFloat() * stackMultiplier; tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "Bazaar Insta-Sell: " + - EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + format.format(bazaarInstantSellPrice) + " coins"); + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + (shortNumber && bazaarInstantSellPrice > 1000 ? Utils.shortNumberFormat(bazaarInstantSellPrice, 0) : format.format(bazaarInstantSellPrice)) + " coins"); } break; case 4: @@ -115,8 +117,8 @@ public class ItemPriceInformation { tooltip.add(""); added = true; } - tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "Raw Craft Cost: " + - EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + format.format((int) craftCost.craftCost) + " coins"); + tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "Raw Craft Cost: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + + (shortNumber && craftCost.craftCost > 1000 ? Utils.shortNumberFormat(craftCost.craftCost, 0) : format.format((int) craftCost.craftCost)) + " coins"); } break; } @@ -137,7 +139,7 @@ public class ItemPriceInformation { added = true; } tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "Lowest BIN: " + - EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + format.format(lowestBin) + " coins"); + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + (shortNumber && lowestBin > 1000 ? Utils.shortNumberFormat(lowestBin, 0) : format.format(lowestBin)) + " coins"); } break; case 1: @@ -148,13 +150,13 @@ public class ItemPriceInformation { } if (auctionInfo.has("clean_price")) { - tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "AH Price (Clean): " + EnumChatFormatting.GOLD + - EnumChatFormatting.BOLD + - format.format((int) auctionInfo.get("clean_price").getAsFloat()) + " coins"); + tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "AH Price (Clean): " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + + (shortNumber && auctionInfo.get("clean_price").getAsFloat() > 1000 ? Utils.shortNumberFormat(auctionInfo.get("clean_price").getAsFloat(), 0) : format.format((int) auctionInfo.get("clean_price").getAsFloat()) + + " coins")); } else { int auctionPrice = (int) (auctionInfo.get("price").getAsFloat() / auctionInfo.get("count").getAsFloat()); - tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "AH Price: " + EnumChatFormatting.GOLD + - EnumChatFormatting.BOLD + format.format(auctionPrice) + " coins"); + tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "AH Price: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + + (shortNumber && auctionPrice > 1000 ? Utils.shortNumberFormat(auctionPrice, 0) : format.format(auctionPrice)) + " coins"); } } @@ -168,11 +170,13 @@ public class ItemPriceInformation { if (auctionInfo.has("clean_price")) { tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "AH Sales (Clean): " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + - format.format(auctionInfo.get("clean_sales").getAsFloat()) + " sales/day"); + (auctionInfo.get("clean_sales").getAsFloat() < 2 ? format.format(auctionInfo.get("clean_sales").getAsFloat()) + " sale/day" + : format.format(auctionInfo.get("clean_sales").getAsFloat()) + " sales/day")); } else { tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "AH Sales: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + - format.format(auctionInfo.get("sales").getAsFloat()) + " sales/day"); + (auctionInfo.get("sales").getAsFloat() < 2 ? format.format(auctionInfo.get("sales").getAsFloat()) + " sale/day" + : format.format(auctionInfo.get("sales").getAsFloat()) + " sales/day")); } } break; @@ -185,8 +189,8 @@ public class ItemPriceInformation { tooltip.add(""); added = true; } - tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "Raw Craft Cost: " + - EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + format.format((int) craftCost.craftCost) + " coins"); + tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "Raw Craft Cost: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + + (shortNumber && craftCost.craftCost > 1000 ? Utils.shortNumberFormat(craftCost.craftCost, 0) : format.format((int) craftCost.craftCost)) + " coins"); } break; case 4: @@ -196,7 +200,8 @@ public class ItemPriceInformation { added = true; } tooltip.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "AVG Lowest BIN: " + - EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + format.format(lowestBinAvg) + " coins"); + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + + (shortNumber && lowestBinAvg > 1000 ? Utils.shortNumberFormat(lowestBinAvg, 0) : format.format(lowestBinAvg)) + " coins"); } break; case 5: diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index aca9a8c5..6ba3c244 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -838,6 +838,7 @@ public class NEUEventListener { NotEnoughUpdates.INSTANCE.config.apiKey.apiKey = unformatted.substring("Your new API key is ".length()); Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "[NEU] API Key automatically configured")); + NotEnoughUpdates.INSTANCE.config.apiKey.apiKey = NotEnoughUpdates.INSTANCE.config.apiKey.apiKey.substring(0, 36); } if (e.message.getFormattedText().equals(EnumChatFormatting.RESET.toString() + EnumChatFormatting.RED + "You haven't unlocked this recipe!" + EnumChatFormatting.RESET)) { @@ -2005,23 +2006,25 @@ public class NEUEventListener { missing.add(enchId); } } - newTooltip.add(""); - StringBuilder currentLine = new StringBuilder(EnumChatFormatting.RED + "Missing: " + EnumChatFormatting.GRAY); - for (int i = 0; i < missing.size(); i++) { - String enchName = WordUtils.capitalizeFully(missing.get(i).replace("_", " ")); - if (currentLine.length() != 0 && (Utils.cleanColour(currentLine.toString()).length() + enchName.length()) > 40) { - newTooltip.add(currentLine.toString()); - currentLine = new StringBuilder(); + if (!missing.isEmpty()) { + newTooltip.add(""); + StringBuilder currentLine = new StringBuilder(EnumChatFormatting.RED + "Missing: " + EnumChatFormatting.GRAY); + for (int i = 0; i < missing.size(); i++) { + String enchName = WordUtils.capitalizeFully(missing.get(i).replace("_", " ")); + if (currentLine.length() != 0 && (Utils.cleanColour(currentLine.toString()).length() + enchName.length()) > 40) { + newTooltip.add(currentLine.toString()); + currentLine = new StringBuilder(); + } + if (currentLine.length() != 0 && i != 0) { + currentLine.append(", ").append(enchName); + } else { + currentLine.append(EnumChatFormatting.GRAY).append(enchName); + } } - if (currentLine.length() != 0 && i != 0) { - currentLine.append(", ").append(enchName); - } else { - currentLine.append(EnumChatFormatting.GRAY).append(enchName); + if (currentLine.length() != 0) { + newTooltip.add(currentLine.toString()); } } - if (currentLine.length() != 0) { - newTooltip.add(currentLine.toString()); - } } passedEnchants = true; } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index 59332f23..f9c5b01b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -1219,7 +1219,7 @@ public class NEUManager { HashMap<String, String> replacements = new HashMap<>(); if (level < 1) { - if (Constants.PETS.has("custom_pet_leveling") && Constants.PETS.getAsJsonObject("custom_pet_leveling").has(petname) && Constants.PETS.getAsJsonObject("custom_pet_leveling").getAsJsonObject(petname).has("max_level")) { + if (Constants.PETS != null && Constants.PETS.has("custom_pet_leveling") && Constants.PETS.getAsJsonObject("custom_pet_leveling").has(petname) && Constants.PETS.getAsJsonObject("custom_pet_leveling").getAsJsonObject(petname).has("max_level")) { int maxLvl = Constants.PETS.getAsJsonObject("custom_pet_leveling").getAsJsonObject(petname).get("max_level").getAsInt(); replacements.put("LVL", "1\u27A1" + maxLvl); } else { 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 75af7de1..a408100d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java @@ -915,7 +915,7 @@ public class CustomAH extends Gui { 256 - (scrollClicked ? 12 : 24), 0, 12, 15); if (!NotEnoughUpdates.INSTANCE.config.neuAuctionHouse.enableNeuAuctionHouse) { - Utils.drawStringCentered(EnumChatFormatting.RED + "NEUAH is DISABLED! Enable in /neusettings.", + Utils.drawStringCentered(EnumChatFormatting.RED + "NEUAH is DISABLED! Enable in /neu.", Minecraft.getMinecraft().fontRendererObj, guiLeft + getXSize() / 2, guiTop + getYSize() / 2 - 5, true, 0); } 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 591d7053..7d1ef905 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java @@ -95,6 +95,7 @@ public class Commands { ClientCommandHandler.instance.registerCommand(new FairySouls.FairySoulsCommandAlt()); ClientCommandHandler.instance.registerCommand(neuHelp); ClientCommandHandler.instance.registerCommand(neuFeatures); + ClientCommandHandler.instance.registerCommand(neuRepoMode); } SimpleCommand.ProcessCommandRunnable collectionLogRun = new SimpleCommand.ProcessCommandRunnable() { @@ -336,6 +337,14 @@ public class Commands { } }); + SimpleCommand neuRepoMode = new SimpleCommand("neurepomode", new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + NotEnoughUpdates.INSTANCE.config.hidden.dev = !NotEnoughUpdates.INSTANCE.config.hidden.dev; + NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing = !NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing; + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("\u00a75Toggled NEU repo dev mode.")); + } + }); + SimpleCommand dungeonWinTest = new SimpleCommand("neudungeonwintest", new SimpleCommand.ProcessCommandRunnable() { public void processCommand(ICommandSender sender, String[] args) { if (args.length > 0) { 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 6f42ab10..c3dc3244 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java @@ -507,7 +507,7 @@ public class DungeonMap { GlStateManager.translate(centerX - mapSizeX / 2, centerY - mapSizeY / 2, 100); } - if (NotEnoughUpdates.INSTANCE.config.dungeonMap.dmBackgroundBlur > 0.1) { + if (NotEnoughUpdates.INSTANCE.config.dungeonMap.dmBackgroundBlur > 0.1 && NotEnoughUpdates.INSTANCE.config.dungeonMap.dmBackgroundBlur < 100 && NotEnoughUpdates.INSTANCE.config.dungeonMap.dmEnable) { GlStateManager.translate(-centerX + mapSizeX / 2, -centerY + mapSizeY / 2, 0); BackgroundBlur.renderBlurredBackground(NotEnoughUpdates.INSTANCE.config.dungeonMap.dmBackgroundBlur, scaledResolution.getScaledWidth(), scaledResolution.getScaledHeight(), @@ -518,7 +518,7 @@ public class DungeonMap { GlStateManager.translate(mapCenterX, mapCenterY, 10); - if (!useFb || NotEnoughUpdates.INSTANCE.config.dungeonMap.dmBackgroundBlur > 0.1) { + if (!useFb || NotEnoughUpdates.INSTANCE.config.dungeonMap.dmBackgroundBlur > 0.1 && NotEnoughUpdates.INSTANCE.config.dungeonMap.dmBackgroundBlur < 100) { GlStateManager.enableBlend(); GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA); } @@ -1050,7 +1050,7 @@ public class DungeonMap { String line = ScorePlayerTeam.formatPlayerName(scoreplayerteam1, score.getPlayerName()); line = Utils.cleanColour(line); - if (line.contains("(F1)") || line.contains("(E)") || line.contains("(M1)")) { + if (line.contains("(F1)") || line.contains("(E0)") || line.contains("(M1)")) { isFloorOne = true; break; } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java index 34b444c6..78777538 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java @@ -784,7 +784,7 @@ public class CustomItemEffects { } } } - } else if (heldInternal.equals("INFINIDIRT_WAND") && event.target.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { + } else if (heldInternal.equals("INFINIDIRT_WAND") && event.target.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && NotEnoughUpdates.INSTANCE.config.itemOverlays.enableDirtWandOverlay) { BlockPos hover = event.target.getBlockPos().offset(event.target.sideHit, 1); IBlockState hoverState = Minecraft.getMinecraft().theWorld.getBlockState(event.target.getBlockPos().offset(event.target.sideHit, 1)); if (hoverState.getBlock() == Blocks.air) { @@ -889,7 +889,7 @@ public class CustomItemEffects { GlStateManager.depthMask(true); GlStateManager.enableTexture2D(); GlStateManager.disableBlend(); - } else if ((heldInternal.equals("HOE_OF_GREAT_TILLING") || heldInternal.equals("HOE_OF_GREATER_TILLING") && onPrivateIsland) && + } else if ((heldInternal.equals("HOE_OF_GREAT_TILLING") || heldInternal.equals("HOE_OF_GREATER_TILLING") && NotEnoughUpdates.INSTANCE.config.itemOverlays.enableHoeOverlay && onPrivateIsland) && event.target.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { BlockPos target = event.target.getBlockPos(); IBlockState targetState = Minecraft.getMinecraft().theWorld.getBlockState(target); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java index 6e7dfc20..15eb7102 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java @@ -32,7 +32,6 @@ public class EnchantingSolvers { } private static final NBTTagCompound enchTag = new NBTTagCompound(); - static { enchTag.setTag("ench", new NBTTagList()); } @@ -143,7 +142,7 @@ public class EnchantingSolvers { return retStack; } } else { - if (chronomatronReplayIndex + 1 < chronomatronOrder.size()) { + if (chronomatronReplayIndex + 1 < chronomatronOrder.size() && NotEnoughUpdates.INSTANCE.config.enchantingSolvers.showNextClick) { String chronomatronNext = chronomatronOrder.get(chronomatronReplayIndex + 1); if (chronomatronNext.equals(displayName)) { ItemStack retStack = new ItemStack(Item.getItemFromBlock(Blocks.stained_glass), 1, stack.getItemDamage()); @@ -309,19 +308,19 @@ public class EnchantingSolvers { if (chronomatronReplayIndex < chronomatronOrder.size()) { String chronomatronCurrent = chronomatronOrder.get(chronomatronReplayIndex); - /*if(!NotEnoughUpdates.INSTANCE.config.enchantingSolvers.preventMisclicks || + if(!NotEnoughUpdates.INSTANCE.config.enchantingSolvers.preventMisclicks1 || chronomatronCurrent.equals(displayName)) { chronomatronReplayIndex++; Minecraft.getMinecraft().playerController.windowClick(windowId, slotId, 2, mode, Minecraft.getMinecraft().thePlayer); millisLastClick = currentTime; - }*/ - if (chronomatronCurrent.equals(displayName)) { + } + /*if (chronomatronCurrent.equals(displayName)) { chronomatronReplayIndex++; } Minecraft.getMinecraft().playerController.windowClick(windowId, slotId, 2, mode, Minecraft.getMinecraft().thePlayer); - millisLastClick = currentTime; + millisLastClick = currentTime;*/ } return true; } @@ -338,22 +337,22 @@ public class EnchantingSolvers { return true; } long currentTime = System.currentTimeMillis(); - /*if(currentTime - millisLastClick > 150 && - (!NotEnoughUpdates.INSTANCE.config.enchantingSolvers.preventMisclicks || + if(currentTime - millisLastClick > 150 && + (!NotEnoughUpdates.INSTANCE.config.enchantingSolvers.preventMisclicks1 || current.containerIndex == slotId)) { ultrasequencerReplayIndex++; Minecraft.getMinecraft().playerController.windowClick(windowId, slotId, 2, mode, Minecraft.getMinecraft().thePlayer); millisLastClick = currentTime; - }*/ - if (currentTime - millisLastClick > 150) { + } + /*if (currentTime - millisLastClick > 150) { if (current.containerIndex == slotId) { ultrasequencerReplayIndex++; } Minecraft.getMinecraft().playerController.windowClick(windowId, slotId, 2, mode, Minecraft.getMinecraft().thePlayer); millisLastClick = currentTime; - } + }*/ return true; } else { return true; @@ -528,6 +527,7 @@ public class EnchantingSolvers { } } + @SubscribeEvent public void onItemTooltip(ItemTooltipEvent event) { if (NotEnoughUpdates.INSTANCE.config.enchantingSolvers.hideTooltips && diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/NPCRetexturing.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/NPCRetexturing.java index e234c458..9180cca6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/NPCRetexturing.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/NPCRetexturing.java @@ -4,6 +4,7 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; import com.google.gson.JsonObject; +import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.resources.IResourceManager; @@ -52,7 +53,7 @@ public class NPCRetexturing implements IResourceManagerReloadListener { ResourceLocation loc = player.getLocationSkin(); gettingSkin = false; - if (skinMap.containsKey(loc.getResourcePath())) { + if (skinMap.containsKey(loc.getResourcePath()) && !NotEnoughUpdates.INSTANCE.config.misc.disableNPCRetexturing) { Skin skin = skinMap.get(loc.getResourcePath()); skinOverrideCache.put(player, skin); return skin; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java index fc5fdef8..0415c629 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java @@ -759,13 +759,13 @@ public class PetInfoOverlay extends TextOverlay { if (currentTime - lastPetSelect > 500) { boolean foundDespawn = false; for (String line : lore) { - if (line.equals("\u00a77\u00a7cClick to despawn ")) { + if (line.equals("\u00a77\u00a7cClick to despawn.")) { config.selectedPet = petIndex; foundDespawn = true; break; } } - if (foundDespawn && config.selectedPet == petIndex) { + if (!foundDespawn && config.selectedPet == petIndex && currentTime - lastPetSelect > 500) { clearPet(); } } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java index 2b92a86c..218076a5 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java @@ -1645,6 +1645,9 @@ public class GuiCustomEnchant extends Gui { } return true; } + if (Keyboard.getEventKey() == Minecraft.getMinecraft().gameSettings.keyBindScreenshot.getKeyCode()) { + return false; + } return Keyboard.getEventKey() != Keyboard.KEY_ESCAPE && (!NotEnoughUpdates.INSTANCE.config.slotLocking.enableSlotLocking || diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java index 1a420218..7087961c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java @@ -176,8 +176,8 @@ public class NEUConfig extends Config { @Expose @Category( - name = "Misc Overlays", - desc = "Misc Overlays" + name = "Todo Overlay", + desc = "Todo Overlay" ) public MiscOverlays miscOverlays = new MiscOverlays(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java index f13ab162..6666302e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java @@ -69,14 +69,14 @@ public class Enchanting { @ConfigAccordionId(id = 0) public boolean enableEnchantingSolvers = true; - /*@Expose + @Expose @ConfigOption( name = "Prevent Misclicks", desc = "Prevent accidentally failing the Chronomatron and Ultrasequencer experiments" ) @ConfigEditorBoolean @ConfigAccordionId(id = 0) - public boolean preventMisclicks = true;*/ + public boolean preventMisclicks1 = false; @Expose @ConfigOption( @@ -98,6 +98,15 @@ public class Enchanting { @Expose @ConfigOption( + name = "Show Next Click In Chronomatron", + desc = "Shows what block you need to click next in Chronomatron" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 0) + public boolean showNextClick = true; + + @Expose + @ConfigOption( name = "Ultrasequencer Next", desc = "Set the colour of the glass pane shown behind the element in the ultrasequencer which is next" ) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java index 1a663467..fc3ae033 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java @@ -310,16 +310,42 @@ public class ItemOverlays { @ConfigAccordionId(id = 5)
public boolean alwaysShowCrystal = false;
+ @ConfigOption(
+ name = "Farming Overlays",
+ desc = ""
+ )
+ @ConfigEditorAccordion(id = 6)
+ public boolean farmingAccordion = false;
+
@Expose
@ConfigOption(
name = "Enable Prismapump Overlay",
desc = "Show a block overlay for the effected blocks of prismapump's ability."
)
@ConfigEditorBoolean
+ @ConfigAccordionId(id = 6)
public boolean enablePrismapumpOverlay = true;
@Expose
@ConfigOption(
+ name = "Enable Hoe Of Tilling Overlay",
+ desc = "Show a block overlay for the effected blocks of the hoe of tilling's ability."
+ )
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 6)
+ public boolean enableHoeOverlay = true;
+
+ @Expose
+ @ConfigOption(
+ name = "Enable Dirt Wand Overlay",
+ desc = "Show a block overlay for the effected blocks of dirt wand's ability."
+ )
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 6)
+ public boolean enableDirtWandOverlay = true;
+
+ @Expose
+ @ConfigOption(
name = "Pickaxe Ability Cooldown",
desc = "Show the cooldown duration off the pickaxe ability as the durability."
)
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java index 295ec5d8..a5113eeb 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java @@ -133,4 +133,12 @@ public class Misc { @ConfigEditorBoolean
public boolean disableSkullRetexturing = false;
+ @Expose
+ @ConfigOption(
+ name = "Disable NPC retexturing",
+ desc = "Disables the NPC retexturing."
+ )
+ @ConfigEditorBoolean
+ public boolean disableNPCRetexturing = false;
+
}
\ No newline at end of file diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java index 0035581c..2eca5b8e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java @@ -1,252 +1,252 @@ -package io.github.moulberry.notenoughupdates.options.seperateSections;
-
-import com.google.gson.annotations.Expose;
-import io.github.moulberry.notenoughupdates.core.config.Position;
-import io.github.moulberry.notenoughupdates.core.config.annotations.*;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-public class MiscOverlays {
- @ConfigOption(
- name = "Todo Overlay",
- desc = ""
- )
- @ConfigEditorAccordion(id = 0)
- public boolean todoAccordion = true;
-
- @Expose
- @ConfigOption(
- name = "Enable Todo Overlay",
- desc = "Show an overlay that reminds you to do important tasks"
- )
- @ConfigEditorBoolean
- @ConfigAccordionId(id = 0)
- public boolean todoOverlay2 = false;
-
- @Expose
- @ConfigOption(
- name = "Todo Text",
- desc = "\u00a7eDrag text to change the appearance of the overlay\n" +
- "\u00a7rIf you want to see the time until something is available, click \"Add\" and then the respective timer"
- )
- @ConfigEditorDraggableList(
- exampleText = {
- "\u00a73Cakes: \u00a7e1d21h",
- "\u00a73Cookie Buff: \u00a7e2d23h",
- "\u00a73Godpot: \u00a7e19h",
- "\u00a73Puzzler: \u00a7e13h",
- "\u00a73Fetchur: \u00a7e3h38m",
- "\u00a73Commissions: \u00a7e3h38m",
- "\u00a73Experiments: \u00a7e3h38m"}
- )
- @ConfigAccordionId(id = 0)
- public List<Integer> todoText2 = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6));
-
- @ConfigOption(
- name = "Show Only If Soon",
- desc = ""
- )
- @ConfigAccordionId(id = 0)
- @ConfigEditorAccordion(id = 1)
- public boolean TodoAccordion = false;
-
- @Expose
- @ConfigOption(
- name = "Experimentation Display",
- desc = "Change the way the experimentation timer displays\n" +
- "Only when ready, When very Soon, When soon, When kinda soon or always."
- )
- @ConfigAccordionId(id = 1)
- @ConfigEditorDropdown(
- values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"}
- )
- public int experimentationDisplay = 0;
-
- @Expose
- @ConfigOption(
- name = "Puzzler Reset Display",
- desc = "Change the way the puzzler reset timer displays\n" +
- "Only when ready, When very Soon, When soon, When kinda soon or always."
- )
- @ConfigAccordionId(id = 1)
- @ConfigEditorDropdown(
- values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"}
- )
- public int puzzlerDisplay = 0;
-
- @Expose
- @ConfigOption(
- name = "Fetchur Reset Display",
- desc = "Change the way the fetchur reset timer displays\n" +
- "Only when ready, When very Soon, When soon, When kinda soon or always."
- )
- @ConfigAccordionId(id = 1)
- @ConfigEditorDropdown(
- values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"}
- )
- public int fetchurDisplay = 0;
-
- @Expose
- @ConfigOption(
- name = "Commission timer Display",
- desc = "Change the way the Commission timer displays\n" +
- "Only when ready, When very Soon, When soon, When kinda soon or always."
- )
- @ConfigAccordionId(id = 1)
- @ConfigEditorDropdown(
- values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"}
- )
- public int commissionDisplay = 0;
-
- @Expose
- @ConfigOption(
- name = "Cake Buff Display",
- desc = "Change the way the cake buff timer displays\n" +
- "Only when ready, When very Soon, When soon, When kinda soon or always."
- )
- @ConfigAccordionId(id = 1)
- @ConfigEditorDropdown(
- values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"}
- )
- public int cakesDisplay = 0;
-
- @Expose
- @ConfigOption(
- name = "Cookie Buff Display",
- desc = "Change the way the cookie buff displays\n" +
- "Only when ready, When very Soon, When soon, When kinda soon or always."
- )
- @ConfigAccordionId(id = 1)
- @ConfigEditorDropdown(
- values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"}
- )
- public int cookieBuffDisplay = 0;
-
- @Expose
- @ConfigOption(
- name = "God Pot Display",
- desc = "Change the way the god pot displays\n" +
- "Only when ready, When very Soon, When soon, When kinda soon or always."
- )
- @ConfigAccordionId(id = 1)
- @ConfigEditorDropdown(
- values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"}
- )
- public int godpotDisplay = 0;
-
- @ConfigOption(
- name = "Colours",
- desc = ""
- )
-
- @ConfigEditorAccordion(id = 2)
- @ConfigAccordionId(id = 0)
- public boolean TodoColourAccordion = false;
-
- @Expose
- @ConfigOption(
- name = "Ready colour",
- desc = "Change the colour of when the timer is ready"
-
- )
- @ConfigEditorDropdown(
- values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
- )
- @ConfigAccordionId(id = 2)
- public int readyColour = 10;
-
- @Expose
- @ConfigOption(
- name = "Gone colour",
- desc = "Change the colour of when the timer is gone"
-
- )
- @ConfigEditorDropdown(
- values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
- )
- @ConfigAccordionId(id = 2)
- public int goneColour = 12;
-
- @Expose
- @ConfigOption(
- name = "Very soon colour",
- desc = "Change the colour of when the timer is almost ready/gone"
-
- )
- @ConfigEditorDropdown(
- values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
- )
- @ConfigAccordionId(id = 2)
- public int verySoonColour = 11;
-
- @Expose
- @ConfigOption(
- name = "Soon Colour",
- desc = "Change the colour of when the timer is soon ready/gone"
-
- )
- @ConfigEditorDropdown(
- values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
- )
- @ConfigAccordionId(id = 2)
- public int soonColour = 9;
-
- @Expose
- @ConfigOption(
- name = "Kinda Soon Colour",
- desc = "Change the colour of when the timer is kinda soon ready/gone"
-
- )
- @ConfigEditorDropdown(
- values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
- )
- @ConfigAccordionId(id = 2)
- public int kindaSoonColour = 1;
-
- @Expose
- @ConfigOption(
- name = "Default Colour",
- desc = "Change the default colour of the timers"
-
- )
-
- @ConfigEditorDropdown(
- values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
- )
- @ConfigAccordionId(id = 2)
- public int defaultColour = 15;
-
- @Expose
- @ConfigOption(
- name = "Todo Position",
- desc = "Change the position of the Todo overlay"
- )
- @ConfigEditorButton(
- runnableId = 5,
- buttonText = "Edit"
- )
- @ConfigAccordionId(id = 0)
- public Position todoPosition = new Position(100, 0);
-
- @Expose
- @ConfigOption(
- name = "Todo Style",
- desc = "Change the style of the todo overlay"
- )
- @ConfigEditorDropdown(
- values = {"Background", "No Shadow", "Shadow", "Full Shadow"}
- )
- @ConfigAccordionId(id = 0)
- public int todoStyle = 0;
-
- @Expose
- @ConfigOption(
- name = "Todo Icons",
- desc = "Add little item icons next to the lines in the todo overlay"
- )
- @ConfigEditorBoolean
- @ConfigAccordionId(id = 0)
- public boolean todoIcons = true;
-}
+package io.github.moulberry.notenoughupdates.options.seperateSections; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.notenoughupdates.core.config.Position; +import io.github.moulberry.notenoughupdates.core.config.annotations.*; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class MiscOverlays { + @ConfigOption( + name = "Todo Overlay", + desc = "" + ) + @ConfigEditorAccordion(id = 0) + public boolean todoAccordion = true; + + @Expose + @ConfigOption( + name = "Enable Todo Overlay", + desc = "Show an overlay that reminds you to do important tasks" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 0) + public boolean todoOverlay2 = false; + + @Expose + @ConfigOption( + name = "Todo Text", + desc = "\u00a7eDrag text to change the appearance of the overlay\n" + + "\u00a7rIf you want to see the time until something is available, click \"Add\" and then the respective timer" + ) + @ConfigEditorDraggableList( + exampleText = { + "\u00a73Cakes: \u00a7e1d21h", + "\u00a73Cookie Buff: \u00a7e2d23h", + "\u00a73Godpot: \u00a7e19h", + "\u00a73Puzzler: \u00a7e13h", + "\u00a73Fetchur: \u00a7e3h38m", + "\u00a73Commissions: \u00a7e3h38m", + "\u00a73Experiments: \u00a7e3h38m"} + ) + @ConfigAccordionId(id = 0) + public List<Integer> todoText2 = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6)); + + @ConfigOption( + name = "Show Only If Soon", + desc = "" + ) + @ConfigAccordionId(id = 0) + @ConfigEditorAccordion(id = 1) + public boolean TodoAccordion = false; + + @Expose + @ConfigOption( + name = "Experimentation Display", + desc = "Change the way the experimentation timer displays\n" + + "Only when ready, When very Soon, When soon, When kinda soon or always." + ) + @ConfigAccordionId(id = 1) + @ConfigEditorDropdown( + values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"} + ) + public int experimentationDisplay = 0; + + @Expose + @ConfigOption( + name = "Puzzler Reset Display", + desc = "Change the way the puzzler reset timer displays\n" + + "Only when ready, When very Soon, When soon, When kinda soon or always." + ) + @ConfigAccordionId(id = 1) + @ConfigEditorDropdown( + values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"} + ) + public int puzzlerDisplay = 0; + + @Expose + @ConfigOption( + name = "Fetchur Reset Display", + desc = "Change the way the fetchur reset timer displays\n" + + "Only when ready, When very Soon, When soon, When kinda soon or always." + ) + @ConfigAccordionId(id = 1) + @ConfigEditorDropdown( + values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"} + ) + public int fetchurDisplay = 0; + + @Expose + @ConfigOption( + name = "Commission timer Display", + desc = "Change the way the Commission timer displays\n" + + "Only when ready, When very Soon, When soon, When kinda soon or always." + ) + @ConfigAccordionId(id = 1) + @ConfigEditorDropdown( + values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"} + ) + public int commissionDisplay = 0; + + @Expose + @ConfigOption( + name = "Cake Buff Display", + desc = "Change the way the cake buff timer displays\n" + + "Only when ready, When very Soon, When soon, When kinda soon or always." + ) + @ConfigAccordionId(id = 1) + @ConfigEditorDropdown( + values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"} + ) + public int cakesDisplay = 0; + + @Expose + @ConfigOption( + name = "Cookie Buff Display", + desc = "Change the way the cookie buff displays\n" + + "Only when ready, When very Soon, When soon, When kinda soon or always." + ) + @ConfigAccordionId(id = 1) + @ConfigEditorDropdown( + values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"} + ) + public int cookieBuffDisplay = 0; + + @Expose + @ConfigOption( + name = "God Pot Display", + desc = "Change the way the god pot displays\n" + + "Only when ready, When very Soon, When soon, When kinda soon or always." + ) + @ConfigAccordionId(id = 1) + @ConfigEditorDropdown( + values = {"Only when ready", "When very Soon", "When soon", "When Kinda Soon", "Always"} + ) + public int godpotDisplay = 0; + + @ConfigOption( + name = "Colours", + desc = "" + ) + + @ConfigEditorAccordion(id = 2) + @ConfigAccordionId(id = 0) + public boolean TodoColourAccordion = false; + + @Expose + @ConfigOption( + name = "Ready colour", + desc = "Change the colour of when the timer is ready" + + ) + @ConfigEditorDropdown( + values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"} + ) + @ConfigAccordionId(id = 2) + public int readyColour = 10; + + @Expose + @ConfigOption( + name = "Gone colour", + desc = "Change the colour of when the timer is gone" + + ) + @ConfigEditorDropdown( + values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"} + ) + @ConfigAccordionId(id = 2) + public int goneColour = 12; + + @Expose + @ConfigOption( + name = "Very soon colour", + desc = "Change the colour of when the timer is almost ready/gone" + + ) + @ConfigEditorDropdown( + values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"} + ) + @ConfigAccordionId(id = 2) + public int verySoonColour = 11; + + @Expose + @ConfigOption( + name = "Soon Colour", + desc = "Change the colour of when the timer is soon ready/gone" + + ) + @ConfigEditorDropdown( + values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"} + ) + @ConfigAccordionId(id = 2) + public int soonColour = 9; + + @Expose + @ConfigOption( + name = "Kinda Soon Colour", + desc = "Change the colour of when the timer is kinda soon ready/gone" + + ) + @ConfigEditorDropdown( + values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"} + ) + @ConfigAccordionId(id = 2) + public int kindaSoonColour = 1; + + @Expose + @ConfigOption( + name = "Default Colour", + desc = "Change the default colour of the timers" + + ) + + @ConfigEditorDropdown( + values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"} + ) + @ConfigAccordionId(id = 2) + public int defaultColour = 15; + + @Expose + @ConfigOption( + name = "Todo Position", + desc = "Change the position of the Todo overlay" + ) + @ConfigEditorButton( + runnableId = 5, + buttonText = "Edit" + ) + @ConfigAccordionId(id = 0) + public Position todoPosition = new Position(100, 0); + + @Expose + @ConfigOption( + name = "Todo Style", + desc = "Change the style of the todo overlay" + ) + @ConfigEditorDropdown( + values = {"Background", "No Shadow", "Shadow", "Full Shadow"} + ) + @ConfigAccordionId(id = 0) + public int todoStyle = 0; + + @Expose + @ConfigOption( + name = "Todo Icons", + desc = "Add little item icons next to the lines in the todo overlay" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 0) + public boolean todoIcons = true; +} diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SkillOverlays.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SkillOverlays.java index 0ba273ef..d9278280 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SkillOverlays.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SkillOverlays.java @@ -68,6 +68,15 @@ public class SkillOverlays { @Expose
@ConfigOption(
+ name = "Use BZ Price For Coins/m",
+ desc = "Uses the bazzar price instead of NPC price for coins/m"
+ )
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 0)
+ public boolean useBZPrice = true;
+
+ @Expose
+ @ConfigOption(
name = "Farming Position",
desc = "Change the position of the Farming overlay"
)
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SlotLocking.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SlotLocking.java index df8df020..3c3fa7d1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SlotLocking.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SlotLocking.java @@ -1,15 +1,22 @@ package io.github.moulberry.notenoughupdates.options.seperateSections;
import com.google.gson.annotations.Expose;
-import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorBoolean;
-import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorKeybind;
-import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorSlider;
-import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigOption;
+import io.github.moulberry.notenoughupdates.core.config.annotations.*;
import org.lwjgl.input.Keyboard;
public class SlotLocking {
@Expose
@ConfigOption(
+ name = "\u00A7cWarning",
+ desc = "Make sure you have SBA's locked slots off before you turn NEU's on"
+ )
+ @ConfigEditorFSR(
+ runnableId = 12
+ )
+ public boolean slotLockWarning = false;
+
+ @Expose
+ @ConfigOption(
name = "Enable Slot Locking",
desc = "Allows you to lock slots and create slot bindings"
)
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java index e88f694b..78dc1995 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java @@ -47,6 +47,15 @@ public class TooltipTweaks { @Expose
@ConfigOption(
+ name = "Use Short Number Format",
+ desc = "Use Short Numbers (5.1m) instead of 5,130,302"
+ )
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 0)
+ public boolean shortNumberFormatPrices = false;
+
+ @Expose
+ @ConfigOption(
name = "Price Info (Inv)",
desc = "Show price information for items in your inventory"
)
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java index a65279e6..a163b000 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java @@ -1,5 +1,6 @@ package io.github.moulberry.notenoughupdates.overlays; +import com.google.gson.JsonObject; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.core.config.Position; import io.github.moulberry.notenoughupdates.core.util.lerp.LerpUtils; @@ -169,21 +170,91 @@ public class FarmingOverlay extends TextOverlay { Foraging = 0; } - if (internalname != null && internalname.startsWith("THEORETICAL_HOE_WARTS") || (internalname != null && internalname.equals("COCO_CHOPPER"))) { - Coins = 3; - } else if (internalname != null && internalname.startsWith("THEORETICAL_HOE_POTATO") || (internalname != null && internalname.startsWith("THEORETICAL_HOE_CARROT")) - || (internalname != null && internalname.equals("CACTUS_KNIFE")) || (internalname != null && internalname.startsWith("THEORETICAL_HOE_WHEAT"))) { - Coins = 1; - } else if (internalname != null && internalname.startsWith("THEORETICAL_HOE_CANE") || (internalname != null && internalname.equals("TREECAPITATOR_AXE")) - || (internalname != null && internalname.equals("JUNGLE_AXE")) ) { - Coins = 2; - } else if ((internalname != null && internalname.equals("PUMPKIN_DICER")) || (internalname != null && internalname.equals("FUNGI_CUTTER"))) { - Coins = 4; - } else if ((internalname != null && internalname.equals("MELON_DICER"))) { - Coins = 0.5; + if (!NotEnoughUpdates.INSTANCE.config.skillOverlays.useBZPrice || internalname != null && (internalname.equals("TREECAPITATOR_AXE")) + || internalname != null && (internalname.equals("JUNGLE_AXE"))) { + if (internalname != null && internalname.startsWith("THEORETICAL_HOE_WARTS") || (internalname != null && internalname.equals("COCO_CHOPPER"))) { + Coins = 3; + } else if (internalname != null && internalname.startsWith("THEORETICAL_HOE_POTATO") || (internalname != null && internalname.startsWith("THEORETICAL_HOE_CARROT")) + || (internalname != null && internalname.equals("CACTUS_KNIFE")) || (internalname != null && internalname.startsWith("THEORETICAL_HOE_WHEAT"))) { + Coins = 1; + } else if (internalname != null && internalname.startsWith("THEORETICAL_HOE_CANE") || (internalname != null && internalname.equals("TREECAPITATOR_AXE")) + || (internalname != null && internalname.equals("JUNGLE_AXE"))) { + Coins = 2; + } else if ((internalname != null && internalname.equals("PUMPKIN_DICER")) || (internalname != null && internalname.equals("FUNGI_CUTTER"))) { + Coins = 4; + } else if ((internalname != null && internalname.equals("MELON_DICER"))) { + Coins = 0.5; + } else { + Coins = 0; + } } - else { - Coins = 0; + if (NotEnoughUpdates.INSTANCE.config.skillOverlays.useBZPrice) { + if (internalname != null && internalname.startsWith("THEORETICAL_HOE_WARTS")) { + JsonObject crop = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo("ENCHANTED_NETHER_STALK"); + if (crop != null) { + if (crop.has("curr_sell")) { + Coins = crop.get("curr_sell").getAsFloat() / 160; + } + } + } else if (internalname != null && internalname.startsWith("THEORETICAL_HOE_POTATO")) { + JsonObject crop = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo("ENCHANTED_POTATO"); + if (crop != null) { + if (crop.has("curr_sell")) { + Coins = crop.get("curr_sell").getAsFloat() / 160; + } + } + } else if (internalname != null && internalname.startsWith("THEORETICAL_HOE_CARROT")) { + JsonObject crop = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo("ENCHANTED_CARROT"); + if (crop != null) { + if (crop.has("curr_sell")) { + Coins = crop.get("curr_sell").getAsFloat() / 160; + } + } + } else if (internalname != null && internalname.startsWith("THEORETICAL_HOE_CANE")) { + JsonObject crop = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo("ENCHANTED_SUGAR"); + if (crop != null) { + if (crop.has("curr_sell")) { + Coins = crop.get("curr_sell").getAsFloat() / 160; + } + } + } else if (internalname != null && internalname.startsWith("PUMPKIN_DICER")) { + JsonObject crop = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo("ENCHANTED_PUMPKIN"); + if (crop != null) { + if (crop.has("curr_sell")) { + Coins = crop.get("curr_sell").getAsFloat() / 160; + } + } + } else if (internalname != null && internalname.startsWith("FUNGI_CUTTER")) { + JsonObject red = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo("ENCHANTED_RED_MUSHROOM"); + JsonObject brown = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo("ENCHANTED_BROWN_MUSHROOM"); + if (red != null && brown != null) { + if (red.has("curr_sell") && (brown.has("curr_sell"))) { + double crop = (red.get("curr_sell").getAsFloat() + red.get("curr_sell").getAsFloat()) / 2; + Coins = crop / 160; + } + } + } else if (internalname != null && internalname.startsWith("MELON_DICER")) { + JsonObject crop = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo("ENCHANTED_MELON"); + if (crop != null) { + if (crop.has("curr_sell")) { + Coins = crop.get("curr_sell").getAsFloat() / 160; + } + } + } else if (internalname != null && internalname.startsWith("THEORETICAL_HOE_WHEAT")) { + JsonObject crop = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo("ENCHANTED_HAY_BLOCK"); + if (crop != null) { + if (crop.has("curr_sell")) { + Coins = crop.get("curr_sell").getAsFloat() / 1296; + } + } + } else if (internalname != null && internalname.startsWith("CACTUS_KNIFE")) { + JsonObject crop = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo("ENCHANTED_CACTUS_GREEN"); + if (crop != null) { + if (crop.has("curr_sell")) { + Coins = crop.get("curr_sell").getAsFloat() / 160; + } + } + } } skillInfoLast = skillInfo; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FishingSkillOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FishingSkillOverlay.java index 0438dd1a..b7643417 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FishingSkillOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FishingSkillOverlay.java @@ -233,7 +233,7 @@ public class FishingSkillOverlay extends TextOverlay { //Im sure there is a much lineMap.put(0, EnumChatFormatting.AQUA+"Expertise Kills: "+EnumChatFormatting.YELLOW+format.format(counterInterp)); }*/ - //TODO make this not be interp + /*if(expertise >= 0) { if(fishedPerSecondLast == fishedPerSecond && fishedPerSecond <= 0) { lineMap.put(7, EnumChatFormatting.AQUA+"Catches/m: "+EnumChatFormatting.YELLOW + "N/A"); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java index a077f6d2..84b5f716 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java @@ -195,6 +195,7 @@ public class MiningOverlay extends TextOverlay { overlayStrings = null; NEUConfig.HiddenProfileSpecific hidden = NotEnoughUpdates.INSTANCE.config.getProfileSpecific(); + /*if(Minecraft.getMinecraft().currentScreen instanceof GuiChest) { GuiChest chest = (GuiChest) Minecraft.getMinecraft().currentScreen; ContainerChest container = (ContainerChest) chest.inventorySlots; @@ -287,17 +288,17 @@ public class MiningOverlay extends TextOverlay { continue; } - if (name.matches("\\xa7r\\xa79\\xa7lForges \\xa7r(?:\\xa7f\\(\\+1 more\\)\\xa7r)?")) { + if (name.matches("\\xa7r\\xa79\\xa7lForges \\xa7r(?:\\xa7f\\(\\+1 more\\)\\xa7r)?") && hidden != null) { commissions = false; forges = true; continue; - } else if (name.equals(RESET.toString() + BLUE + BOLD + "Commissions" + RESET)) { + } else if (name.equals(RESET.toString() + BLUE + BOLD + "Commissions" + RESET)&& hidden != null) { commissions = true; forges = false; continue; } String clean = StringUtils.cleanColour(name); - if (forges && clean.startsWith(" ")) { + if (forges && clean.startsWith(" ")&& hidden != null) { char firstChar = clean.trim().charAt(0); if (firstChar < '0' || firstChar > '9') { @@ -349,7 +350,7 @@ public class MiningOverlay extends TextOverlay { } forgeInt++; } - } else if (commissions && clean.startsWith(" ")) { + } else if (commissions && clean.startsWith(" ") && hidden != null) { String[] split = clean.trim().split(": "); if (split.length == 2) { if (split[1].endsWith("%")) { @@ -419,7 +420,7 @@ public class MiningOverlay extends TextOverlay { } else { pickaxeCooldown = DARK_AQUA + "Pickaxe CD: \u00a7a" + (ItemCooldowns.pickaxeUseCooldownMillisRemaining / 1000) + "s"; } - + for (int index : NotEnoughUpdates.INSTANCE.config.mining.dwarvenText2) { switch (index) { case 0: @@ -432,7 +433,9 @@ public class MiningOverlay extends TextOverlay { overlayStrings.add(gemstonePowder); break; case 3: - overlayStrings.addAll(getForgeStrings(hidden.forgeItems)); + if(hidden != null) { + overlayStrings.addAll(getForgeStrings(hidden.forgeItems)); + } break; case 4: //overlayStrings.addAll(forgeStringsEmpty); break; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java index ee29fb83..d5bc5d56 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java @@ -130,18 +130,18 @@ public class TimersOverlay extends TextOverlay { new ItemStack(Blocks.pumpkin, 1, 0), new ItemStack(Items.flint_and_steel, 1, 0), new ItemStack(Blocks.quartz_ore, 50, 0), - new ItemStack(Items.ender_pearl, 16, 0) + //new ItemStack(Items.ender_pearl, 16, 0) }; } long currentTime = System.currentTimeMillis(); ZonedDateTime currentTimeEST = ZonedDateTime.now(ZoneId.of("America/Atikokan")); - long fetchurIndex = ((currentTimeEST.getDayOfMonth() + 1) % 13) - 1; + long fetchurIndex = ((currentTimeEST.getDayOfMonth() + 1) % 12) - 1; //Added because disabled fetchur and enabled it again but it was showing the wrong item //Lets see if this stays correct - if (fetchurIndex < 0) fetchurIndex += 13; + if (fetchurIndex < 0) fetchurIndex += 12; icon = FETCHUR_ICONS[(int) fetchurIndex]; break; @@ -361,7 +361,6 @@ public class TimersOverlay extends TextOverlay { map.put(1, DARK_AQUA + "Cookie Buff: " + EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.miscOverlays.defaultColour] + Utils.prettyTime(hidden.cookieBuffRemaining)); } - long godpotEnd = hidden.godPotionDuration; //Godpot Display //do not display in dungeons due to dungeons not having if (!(SBInfo.getInstance().getLocation() != null && SBInfo.getInstance().getLocation().equals("dungeon"))) { @@ -399,9 +398,12 @@ public class TimersOverlay extends TextOverlay { } long midnightReset = (currentTime - 18000000) / 86400000 * 86400000 + 18000000; + long experimentReset = (currentTime - 18000000) / 86400000 * 86400000 + 86400000; + long fetchurComplete = hidden.fetchurCompleted; long timeDiffMidnightNow = midnightReset + 86400000 - currentTime; + long timeDiffMidnightNowExp = experimentReset + 86400000 - currentTime; //Fetchur Display if (fetchurComplete < midnightReset) { @@ -436,19 +438,19 @@ public class TimersOverlay extends TextOverlay { } //Experiment Display - if (hidden.experimentsCompleted < midnightReset) { + if (hidden.experimentsCompleted < experimentReset) { map.put(6, DARK_AQUA + "Experiments: " + EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.miscOverlays.readyColour] + "Ready!"); } else if (NotEnoughUpdates.INSTANCE.config.miscOverlays.experimentationDisplay >= DISPLAYTYPE.VERYSOON.ordinal() && - (hidden.experimentsCompleted < (midnightReset - TimeEnums.HALFANHOUR.time))) { - map.put(6, DARK_AQUA + "Experiments: " + EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.miscOverlays.verySoonColour] + Utils.prettyTime(timeDiffMidnightNow)); + (hidden.experimentsCompleted < (experimentReset - TimeEnums.HALFANHOUR.time))) { + map.put(6, DARK_AQUA + "Experiments: " + EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.miscOverlays.verySoonColour] + Utils.prettyTime(timeDiffMidnightNowExp)); } else if (NotEnoughUpdates.INSTANCE.config.miscOverlays.experimentationDisplay >= DISPLAYTYPE.SOON.ordinal() && - (hidden.experimentsCompleted < (midnightReset - TimeEnums.HOUR.time))) { - map.put(6, DARK_AQUA + "Experiments: " + EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.miscOverlays.soonColour] + Utils.prettyTime(timeDiffMidnightNow)); + (hidden.experimentsCompleted < (experimentReset - TimeEnums.HOUR.time))) { + map.put(6, DARK_AQUA + "Experiments: " + EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.miscOverlays.soonColour] + Utils.prettyTime(timeDiffMidnightNowExp)); } else if (NotEnoughUpdates.INSTANCE.config.miscOverlays.experimentationDisplay >= DISPLAYTYPE.KINDASOON.ordinal() && - (hidden.experimentsCompleted < (midnightReset - (TimeEnums.HOUR.time * 3)))) { - map.put(6, DARK_AQUA + "Experiments: " + EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.miscOverlays.kindaSoonColour] + Utils.prettyTime(timeDiffMidnightNow)); + (hidden.experimentsCompleted < (experimentReset - (TimeEnums.HOUR.time * 3)))) { + map.put(6, DARK_AQUA + "Experiments: " + EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.miscOverlays.kindaSoonColour] + Utils.prettyTime(timeDiffMidnightNowExp)); } else if (NotEnoughUpdates.INSTANCE.config.miscOverlays.experimentationDisplay >= DISPLAYTYPE.ALWAYS.ordinal()) { - map.put(6, DARK_AQUA + "Experiments: " + EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.miscOverlays.defaultColour] + Utils.prettyTime(timeDiffMidnightNow)); + map.put(6, DARK_AQUA + "Experiments: " + EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.miscOverlays.defaultColour] + Utils.prettyTime(timeDiffMidnightNowExp)); } overlayStrings = new ArrayList<>(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java index 9dcac181..8295fcbc 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -2881,7 +2881,8 @@ public class GuiProfileViewer extends GuiScreen { float moulStat = (float) ((Utils.getElementAsFloat(Utils.getElement(profileInfo, "mining_core.nodes.mole"), 0)) * 0.051); double moleperkstat = (double) moul / 20 - 0.55 + 50; double moleperkstat2 = (double) Math.round(moleperkstat * 100) / 100; - float output = (float) (moleperkstat2 % 1) * 100; + + float output = Math.round((float) (moleperkstat2 % 1) * 100); if (output == 0) { output = 100; } |