diff options
| author | Lorenz <lo.scherf@gmail.com> | 2022-08-10 15:46:52 +0200 |
|---|---|---|
| committer | Lorenz <lo.scherf@gmail.com> | 2022-08-10 15:46:52 +0200 |
| commit | 4181ad5f29c0a0476c160c0605d7a1c58a106067 (patch) | |
| tree | fabdb7cc3223db1f4bd0c1dc1b1e76fed1f9b166 | |
| parent | 28975d2a1e9f2ca6cac1a012f3b9d3d7d45adaf2 (diff) | |
| parent | 4cf7ec9f8ee48b7ea22b2d514c3e7ff1be7daf0d (diff) | |
| download | NotEnoughUpdates-4181ad5f29c0a0476c160c0605d7a1c58a106067.tar.gz NotEnoughUpdates-4181ad5f29c0a0476c160c0605d7a1c58a106067.tar.bz2 NotEnoughUpdates-4181ad5f29c0a0476c160c0605d7a1c58a106067.zip | |
Merge branch 'master' into minion_helper_2
# Conflicts:
# src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
# src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java
# src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java
44 files changed, 1805 insertions, 289 deletions
@@ -26,3 +26,4 @@ run .vscode infer-out/ ciwork/ +.DS_STORE diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c1913734..a5fa2b6a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,6 +24,7 @@ - Run the `gen<IntelliJ/Eclipse>Runs` gradle task. In IntelliJ that can be done in the gradle tab on the right side of your IDE. - Optionally, run the `genSources` gradle task. - Run the `Minecraft Client` to make sure that everything works. + - Note: if you are using OSX, remove the `XstartOnFirstThread` JVM option ## Logging into Hypixel in a development environment @@ -54,6 +54,7 @@ NotEnoughUpdates (NEU) is a feature rich 1.8.9 Minecraft forge mod for Hypixel S ## Features - An [item list](https://github.com/NotEnoughUpdates/NotEnoughUpdates-REPO) containing information and recipes about every item in skyblock. +- A dungeons minimap. - Dungeon loot profit checker. - Item overlays for Treecapitator, Builder's Wand, Block Zapper, and Bonemerang. - An in-game skyblock profile viewer accessed with `/pv [player]`. diff --git a/Update Notes/2.1.md b/Update Notes/2.1.md index f9d4b6d7..6e4dd71f 100644 --- a/Update Notes/2.1.md +++ b/Update Notes/2.1.md @@ -35,6 +35,7 @@ - Added total xp to catacombs level - efefury - Fixed minion tiers crafted by coop members not showing up in /pv - Lulonaut - Fixed crash in /pv when the player had a pet that is not saved in the repo - Lulonaut + - Added senither and lily weight - CrypticPlasma ### **Minor Changes:** @@ -102,6 +103,8 @@ - Added [Auction Profit Viewer Overlay](https://cdn.discordapp.com/attachments/848901833119629332/993191851400101918/176946124-28ddf336-1ec7-460b-b22a-5fe2733b46a3.png) - efefury - Added Trophy Reward Overlay - hannibal2 - Added power stone feature - hannibal2 +- Added abiphone warning - hannibal2 +- Added blur limit at 100 - nopo ### **Bug Fixes:** diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index de050e5e..e51f118e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -36,9 +36,11 @@ import io.github.moulberry.notenoughupdates.mbgui.MBAnchorPoint; import io.github.moulberry.notenoughupdates.mbgui.MBGuiElement; import io.github.moulberry.notenoughupdates.mbgui.MBGuiGroupAligned; import io.github.moulberry.notenoughupdates.mbgui.MBGuiGroupFloating; +import io.github.moulberry.notenoughupdates.miscfeatures.EnchantingSolvers; import io.github.moulberry.notenoughupdates.miscfeatures.PetInfoOverlay; import io.github.moulberry.notenoughupdates.miscfeatures.SunTzu; import io.github.moulberry.notenoughupdates.miscgui.GuiPriceGraph; +import io.github.moulberry.notenoughupdates.miscgui.NeuSearchCalculator; import io.github.moulberry.notenoughupdates.options.NEUConfigEditor; import io.github.moulberry.notenoughupdates.util.Constants; import io.github.moulberry.notenoughupdates.util.GuiTextures; @@ -377,7 +379,7 @@ public class NEUOverlay extends Gui { } //Search bar text - fr.drawString(textField.getText(), (int) x + 5, + fr.drawString(NeuSearchCalculator.format(textField.getText()), (int) x + 5, (int) y - 4 + getHeight() / 2, Color.WHITE.getRGB() ); @@ -548,6 +550,7 @@ public class NEUOverlay extends Gui { @Override public void mouseClick(float x, float y, int mouseX, int mouseY) { if (!NotEnoughUpdates.INSTANCE.config.toolbar.quickCommands) return; + if (EnchantingSolvers.disableButtons()) return; if ((NotEnoughUpdates.INSTANCE.config.toolbar.quickCommandsClickType != 0 && Mouse.getEventButtonState()) || (NotEnoughUpdates.INSTANCE.config.toolbar.quickCommandsClickType == 0 && !Mouse.getEventButtonState() && @@ -570,6 +573,7 @@ public class NEUOverlay extends Gui { @Override public void render(float x, float y) { if (!NotEnoughUpdates.INSTANCE.config.toolbar.quickCommands) return; + if (EnchantingSolvers.disableButtons()) return; int paddingUnscaled = getPaddingUnscaled(); int bigItemSize = getSearchBarYSize(); @@ -1947,7 +1951,7 @@ public class NEUOverlay extends Gui { if (textField.getText().toLowerCase().contains("lunar")) { Minecraft.getMinecraft().getTextureManager().bindTexture(ATMOULBERRYWHYISMYLUNARCLIENTBUGGING); GlStateManager.color(1, 1, 1, 1); - GlStateManager.translate(0,0,100); + GlStateManager.translate(0, 0, 100); Utils.drawTexturedRect((width + 410) / 2f, (height + 450) / 2f - 114, 113, 64, GL11.GL_LINEAR); GlStateManager.bindTexture(0); } @@ -2379,10 +2383,10 @@ public class NEUOverlay extends Gui { Utils.drawTexturedRect((float) ((width - 224.1) / 2f), yNumber, 31, 86, GL11.GL_NEAREST); GlStateManager.bindTexture(0); - Utils.drawItemStack(slot1, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105)); - Utils.drawItemStack(slot2, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 18); - Utils.drawItemStack(slot3, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 36); - Utils.drawItemStack(slot4, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 54); + Utils.drawItemStack(slot1, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105), true); + Utils.drawItemStack(slot2, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 18, true); + Utils.drawItemStack(slot3, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 36, true); + Utils.drawItemStack(slot4, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 54, true); if (slot1 == null) { Minecraft.getMinecraft().getTextureManager().bindTexture(QUESTION_MARK); GlStateManager.color(1, 1, 1, 1); @@ -2565,7 +2569,7 @@ public class NEUOverlay extends Gui { Utils.drawTexturedRect((float) ((width - 224.1) / 2f), yNumber, 31, 32, GL11.GL_NEAREST); GlStateManager.bindTexture(0); - Utils.drawItemStack(petInfo, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 72); + Utils.drawItemStack(petInfo, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 72, true); renderingPetHud = true; List<String> tooltipToDisplay = null; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java index 37bf160f..c604fd86 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java @@ -34,6 +34,7 @@ import io.github.moulberry.notenoughupdates.listener.NEUEventListener; import io.github.moulberry.notenoughupdates.listener.OldAnimationChecker; import io.github.moulberry.notenoughupdates.listener.RenderListener; import io.github.moulberry.notenoughupdates.miscfeatures.AuctionProfit; +import io.github.moulberry.notenoughupdates.miscfeatures.BazaarSacksProfit; import io.github.moulberry.notenoughupdates.miscfeatures.CrystalOverlay; import io.github.moulberry.notenoughupdates.miscfeatures.CrystalWishingCompassSolver; import io.github.moulberry.notenoughupdates.miscfeatures.CustomItemEffects; @@ -111,9 +112,9 @@ import java.util.Set; public class NotEnoughUpdates { public static final String MODID = "notenoughupdates"; public static final String VERSION = "2.1.0-REL"; - public static final int VERSION_ID = 20200; - public static final int PRE_VERSION_ID = 0; - public static final int HOTFIX_VERSION_ID = 1; + public static final int VERSION_ID = 20000; + public static final int PRE_VERSION_ID = 1; + public static final int HOTFIX_VERSION_ID = 0; /** * Registers the biomes for the crystal hollows here so optifine knows they exists */ @@ -290,6 +291,7 @@ public class NotEnoughUpdates { MinecraftForge.EVENT_BUS.register(new SignCalculator()); MinecraftForge.EVENT_BUS.register(TrophyRewardOverlay.getInstance()); MinecraftForge.EVENT_BUS.register(PowerStoneStatsDisplay.getInstance()); + MinecraftForge.EVENT_BUS.register(BazaarSacksProfit.getInstance()); MinecraftForge.EVENT_BUS.register(MinionHelperManager.getInstance()); MinecraftForge.EVENT_BUS.register(navigation); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java b/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java index 7c58cb4d..29b5f4a5 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java @@ -123,7 +123,7 @@ public class APIManager { public class Auction { public String auctioneerUuid; public long end; - public int starting_bid; + public long starting_bid; public int highest_bid_amount; public int bid_count; public boolean bin; @@ -137,7 +137,7 @@ public class APIManager { public int enchLevel = 0; //0 = clean, 1 = ench, 2 = ench/hpb public Auction( - String auctioneerUuid, long end, int starting_bid, int highest_bid_amount, int bid_count, + String auctioneerUuid, long end, long starting_bid, int highest_bid_amount, int bid_count, boolean bin, String category, String rarity, int dungeonTier, String item_tag_str ) { this.auctioneerUuid = auctioneerUuid; @@ -540,7 +540,7 @@ public class APIManager { String auctionUuid = auction.get("uuid").getAsString(); String auctioneerUuid = auction.get("auctioneer").getAsString(); long end = auction.get("end").getAsLong(); - int starting_bid = auction.get("starting_bid").getAsInt(); + long starting_bid = auction.get("starting_bid").getAsLong(); int highest_bid_amount = auction.get("highest_bid_amount").getAsInt(); int bid_count = auction.get("bids").getAsJsonArray().size(); boolean bin = false; 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 d8fedecb..f0ef1ec6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java @@ -94,7 +94,7 @@ public class CustomAH extends Gui { private boolean shouldUpdateSearch = false; private boolean shouldSortItems = false; - private int startingBid = 0; + private long startingBid = 0; private String currentAucId = null; private int clickedMainCategory = -1; @@ -640,7 +640,7 @@ public class CustomAH extends Gui { } } if (priceNumbers.length() > 0) { - startingBid = Integer.parseInt(priceNumbers.toString()); + startingBid = Long.parseLong(priceNumbers.toString()); } } } @@ -1578,18 +1578,18 @@ public class CustomAH extends Gui { if (auc2 == null) return -1; if (sortMode == SORT_MODE_HIGH) { - int price1 = Math.max(auc1.highest_bid_amount, auc1.starting_bid); - int price2 = Math.max(auc2.highest_bid_amount, auc2.starting_bid); - int diff = price2 - price1; + long price1 = Math.max(auc1.highest_bid_amount, auc1.starting_bid); + long price2 = Math.max(auc2.highest_bid_amount, auc2.starting_bid); + long diff = price2 - price1; if (diff != 0) { - return diff; + return Long.compare(price2, price1); } } else if (sortMode == SORT_MODE_LOW) { - int price1 = Math.max(auc1.highest_bid_amount, auc1.starting_bid); - int price2 = Math.max(auc2.highest_bid_amount, auc2.starting_bid); - int diff = price1 - price2; + long price1 = Math.max(auc1.highest_bid_amount, auc1.starting_bid); + long price2 = Math.max(auc2.highest_bid_amount, auc2.starting_bid); + long diff = price1 - price2; if (diff != 0) { - return diff; + return Long.compare(price1, price2); } } else { long end1 = auc1.end; @@ -1679,16 +1679,16 @@ public class CustomAH extends Gui { priceField.setText((int) (priceI * factor) + end); } - private int getPriceFilterAmount() { + private long getPriceFilterAmount() { return getNumberFromTextBox(priceFilterField); } - private int getNumberFromTextBox(GuiTextField textField) { + private long getNumberFromTextBox(GuiTextField textField) { if (textField.getText().equals("")) { return -2; } try { - int parsed = Integer.parseInt(textField.getText()); + long parsed = Long.parseLong(textField.getText()); if (parsed < 0) { return -1; } @@ -1698,7 +1698,7 @@ public class CustomAH extends Gui { } } - private int getBinPriceFilterAmount() { + private long getBinPriceFilterAmount() { return getNumberFromTextBox(binPriceFilterField); } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java index 807fcc27..3967edb4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java @@ -51,12 +51,6 @@ public class MapCommand extends ClientCommandBase { @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { - if (!NotEnoughUpdates.INSTANCE.config.hidden.dev) { - Utils.addChatMessage( - EnumChatFormatting.RED + - "[NEU] The map does not work right now. You can use the map from other mods, for example: SkyblockAddons, DungeonsGuide or Skytils."); - return; - } if (NotEnoughUpdates.INSTANCE.colourMap == null) { try ( diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java index e6472d04..916ce072 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java @@ -47,20 +47,20 @@ public class CalculatorCommand extends ClientCommandBase { if ((args.length == 1 && Objects.equals(args[0], "help")) || args.length == 0) { sender.addChatMessage(new ChatComponentText( "\n§e[NEU] §5It's a calculator.\n" + - "§eFor Example §b/neucalc 3m*7k§e.\n" + - "§eYou can also use suffixes (k, m, b, t, s)§e.\n" + - "§eThe \"s\" suffix acts as 64.\n" + - "§eTurn on Sign Calculator in /neu misc to also support this in sign popups.\n")); + "§eFor Example §b/neucalc 3m*7k§e.\n" + + "§eYou can also use suffixes (k, m, b, t, s)§e.\n" + + "§eThe \"s\" suffix acts as 64.\n" + + "§eTurn on Sign Calculator in /neu misc to also support this in sign popups.\n")); return; } String source = String.join(" ", args); try { BigDecimal calculate = Calculator.calculate(source); - DecimalFormat formatter = new DecimalFormat("#,###.00"); - String lr = formatter.format(calculate); + DecimalFormat formatter = new DecimalFormat("#,##0.##"); + String format = formatter.format(calculate); sender.addChatMessage(new ChatComponentText( - EnumChatFormatting.YELLOW + "[NEU] " + EnumChatFormatting.WHITE + source + " = " + EnumChatFormatting.GREEN + - lr + EnumChatFormatting.YELLOW + "[NEU] " + EnumChatFormatting.WHITE + source + " " + EnumChatFormatting.YELLOW + + "= " + EnumChatFormatting.GREEN + format )); } catch (Calculator.CalculatorException e) { sender.addChatMessage(new ChatComponentText( 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 2693341a..d4a728be 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java @@ -65,13 +65,8 @@ import java.awt.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; +import java.util.*; public class DungeonMap { private static final ResourceLocation GREEN_CHECK = new ResourceLocation( @@ -602,8 +597,8 @@ public class DungeonMap { GlStateManager.rotate(-rotation + 180, 0, 0, 1); if (NotEnoughUpdates.INSTANCE.config.dungeonMap.dmCenterPlayer && playerPos != null) { - float x = playerPos.getRenderX(0); - float y = playerPos.getRenderY(0); + float x = playerPos.getRenderX(); + float y = playerPos.getRenderY(); x -= minRoomX * (renderRoomSize + renderConnSize); y -= minRoomY * (renderRoomSize + renderConnSize); @@ -672,8 +667,8 @@ public class DungeonMap { for (Map.Entry<String, MapPosition> entry : playerMarkerMapPositions.entrySet()) { String name = entry.getKey(); MapPosition pos = entry.getValue(); - float x = pos.getRenderX(0); - float y = pos.getRenderY(0); + float x = pos.getRenderX(); + float y = pos.getRenderY(); float angle = pos.rotation; boolean doInterp = NotEnoughUpdates.INSTANCE.config.dungeonMap.dmPlayerInterp; @@ -681,8 +676,8 @@ public class DungeonMap { MapPosition entityPos = playerEntityMapPositions.get(name); angle = entityPos.rotation; - float deltaX = entityPos.getRenderX(9) - pos.getRenderX(0); - float deltaY = entityPos.getRenderY(9) - pos.getRenderY(0); + float deltaX = entityPos.getRenderX() - pos.getRenderX(); + float deltaY = entityPos.getRenderY() - pos.getRenderY(); x += deltaX; y += deltaY; @@ -702,8 +697,8 @@ public class DungeonMap { if (doInterp && playerMarkerMapPositionsLast.containsKey(name)) { MapPosition last = playerMarkerMapPositionsLast.get(name); - float xLast = last.getRenderX(0); - float yLast = last.getRenderY(0); + float xLast = last.getRenderX(); + float yLast = last.getRenderY(); float distSq = (x - xLast) * (x - xLast) + (y - yLast) * (y - yLast); if (distSq < renderRoomSize * renderRoomSize / 4f) { @@ -1100,12 +1095,12 @@ public class DungeonMap { this.connOffsetY = connOffsetY; } - public float getRenderX(int blockOffset) { - return (roomOffsetX + blockOffset) * getRenderRoomSize() + connOffsetX * getRenderConnSize(); + public float getRenderX() { + return roomOffsetX * getRenderRoomSize() + connOffsetX * getRenderConnSize(); } - public float getRenderY(int blockOffset) { - return (roomOffsetY + blockOffset) * getRenderRoomSize() + connOffsetY * getRenderConnSize(); + public float getRenderY() { + return roomOffsetY * getRenderRoomSize() + connOffsetY * getRenderConnSize(); } @Override @@ -1291,15 +1286,15 @@ public class DungeonMap { |
