diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-08-16 21:06:43 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-08-16 21:06:43 +0200 |
commit | 2056ee7e6c92c4aff32b55501bc72f4ee9b63861 (patch) | |
tree | 0daf6408ca5902952d4df0ab77b98d2f7e4e7adf | |
parent | dbe107baafdaab9f7c79fcadfc2c30949aded24e (diff) | |
download | NotEnoughUpdates-2056ee7e6c92c4aff32b55501bc72f4ee9b63861.tar.gz NotEnoughUpdates-2056ee7e6c92c4aff32b55501bc72f4ee9b63861.tar.bz2 NotEnoughUpdates-2056ee7e6c92c4aff32b55501bc72f4ee9b63861.zip |
code cleanup
2 files changed, 10 insertions, 12 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java index c2fe0503..c362fd15 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java @@ -90,7 +90,7 @@ public class MinionHelperOverlay { if (!manager.isReadyToUse()) { LinkedHashMap<String, OverviewLine> map = new LinkedHashMap<>(); map.put("§cLoading...", new OverviewText(Collections.emptyList(), () -> {})); - render(event, map); + render(map); return; } @@ -107,13 +107,13 @@ public class MinionHelperOverlay { LinkedHashMap<String, OverviewLine> renderMap = getRenderMap(); hover.renderHover(renderMap); - render(event, renderMap); + render(renderMap); - renderArrows(event); + renderArrows(); } - private void renderArrows(GuiScreenEvent.BackgroundDrawnEvent event) { - GuiScreen gui = event.gui; + private void renderArrows() { + GuiScreen gui = Minecraft.getMinecraft().currentScreen; if (gui instanceof AccessorGuiContainer) { AccessorGuiContainer container = (AccessorGuiContainer) gui; int guiLeft = container.getGuiLeft(); @@ -201,10 +201,10 @@ public class MinionHelperOverlay { return prices; } - private void render(GuiScreenEvent.BackgroundDrawnEvent event, Map<String, OverviewLine> renderMap) { + private void render(Map<String, OverviewLine> renderMap) { Minecraft minecraft = Minecraft.getMinecraft(); - if (!(Minecraft.getMinecraft().currentScreen instanceof GuiChest)) return; - Gui gui = event.gui; + Gui gui = Minecraft.getMinecraft().currentScreen; + if (!(gui instanceof GuiChest)) return; int xSize = ((AccessorGuiContainer) gui).getXSize(); int guiLeft = ((AccessorGuiContainer) gui).getGuiLeft(); int guiTop = ((AccessorGuiContainer) gui).getGuiTop(); @@ -266,7 +266,6 @@ public class MinionHelperOverlay { LinkedHashMap<String, OverviewLine> renderMap ) { int neededForNextSlot = manager.getNeedForNextSlot(); - //TODO jani String color = "§8"; if (neededForNextSlot == -1) { renderMap.put(color + "Next slot: ?", new OverviewText(Collections.emptyList(), () -> {})); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java index e3603618..b17ae368 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java @@ -103,15 +103,14 @@ public class MinionHelperOverlayHover { List<String> list = new ArrayList<>(); - //TODO jani if (showOnlyAvailable) { list.add("§aFilter enabled!"); list.add("§7Only show minions that can be"); - list.add("§7crafted and meet requirements"); + list.add("§7crafted and meet requirements."); } else { list.add("§cFilter disabled!"); list.add("§7Show all minions. §cRed ones §7have"); - list.add("§7missing requirements "); + list.add("§7missing requirements."); } list.add(""); |