From 47af0b3eee70a5c8d7c86fff19155a97a9204708 Mon Sep 17 00:00:00 2001 From: efefury <69400149+efefury@users.noreply.github.com> Date: Sun, 11 Sep 2022 09:31:27 +0000 Subject: cleaned up neu overlay (#241) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * made equipment overlay own class lmk if there's any bugs * fix infer (i think) * fuck infer * First refactoringering * Fix more stuff * itemlisting * NEU 3.0 release notes * fixed nea bug https://imgur.com/a/Sg3iw74 * whitespace * fixed equipment overlay not working ? and caching * nopoing idk what im doing * FHJNX GHD trwsmokürtsew tze jiozterdgjjiüzetr jipztr * Revert "FHJNX GHD" This reverts commit 24eceba3db5e500be296f5a96412bd8b95647a22. * Revert "nopoing" This reverts commit bee07cb98f8b9672c2e1bc192c6c3e5ae8b02b95. * Revert "fixed equipment overlay" This reverts commit b15376f934a738900e2dd98efdb0d4a7ec131dfa. * idk i think this works maybe * ??? ????????? * no more black lines * equipment cache * Fix lag with optifine and removal of unused field. Removed onMouseClick as it was triggered more than once per tick when optifine is installed. Removed tooltipsToDisplay field (as it was replaced by a local variable). * this should be true by default to keep old behaviour * itemList now doesn't close when clicking the searchbar itemList will now only close when searchMode is triggered. * Infer moment hoping this doesn't trigger it. Co-authored-by: nea Co-authored-by: Lulonaut Co-authored-by: Ascynx <78341107+Ascynx@users.noreply.github.com> Co-authored-by: nopo Co-authored-by: Ascynx Co-authored-by: Roman / Linnea Gräf Co-authored-by: Lorenz --- Update Notes/2.1.md | 1 + 1 file changed, 1 insertion(+) (limited to 'Update Notes/2.1.md') diff --git a/Update Notes/2.1.md b/Update Notes/2.1.md index 050eaa93..b820ee79 100644 --- a/Update Notes/2.1.md +++ b/Update Notes/2.1.md @@ -117,6 +117,7 @@ - Added profit per score/XP to RNG meter - hannibal2 - Added showing the amount of dungeon runs or slayer bosses needed for the rng meter to fill up - hannibal2 - Added bazaar prices to enchants in the enchantment table - hannibal2 / nea89 +- Added an option to not open the item list when searching containers - Lulonaut ### **Bug Fixes:** -- cgit From ef557a6f4dff5ed9ce13f26f41b55c60008e8eae Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Sun, 11 Sep 2022 22:11:26 +1000 Subject: fixed backpacks when dont have fairy soul req (#264) --- Update Notes/2.1.md | 1 + .../miscfeatures/StorageManager.java | 8 ++-- .../notenoughupdates/miscgui/StorageOverlay.java | 2 +- .../notenoughupdates/overlays/MiningOverlay.java | 1 + .../profileviewer/GuiProfileViewer.java | 45 +++++++++++++++++----- .../profileviewer/bestiary/BestiaryPage.java | 17 +++++--- 6 files changed, 54 insertions(+), 20 deletions(-) (limited to 'Update Notes/2.1.md') diff --git a/Update Notes/2.1.md b/Update Notes/2.1.md index b820ee79..9c73e649 100644 --- a/Update Notes/2.1.md +++ b/Update Notes/2.1.md @@ -148,6 +148,7 @@ - Fixed shortened damage - nopo - Fixed bazaar prices sorting order in neu item list - hannibal2 - Fixed priceless items showing first in the missing tab of the accessory bag overlay - nopo +- Fixed storage gui when having locked backpack slots - nopo ### **Other:** diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java index 680637f2..cc463308 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java @@ -38,6 +38,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.inventory.GuiChest; import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.inventory.ContainerChest; import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; @@ -555,8 +556,8 @@ public class StorageManager { int index = slot - 9; boolean changed = false; - if (stack.getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) && - stack.getMetadata() == 14) { + if ((stack.getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) && + stack.getMetadata() == 14) || (stack.getItem() == Items.dye && stack.getMetadata() == 8)) { if (storagePresent[index]) changed = true; storagePresent[index] = false; removePage(index); @@ -596,7 +597,8 @@ public class StorageManager { boolean changed = false; - if (stack.getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane)) { + if (stack.getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) + || (stack.getItem() == Items.dye && stack.getMetadata() == 8)) { if (storagePresent[index]) changed = true; storagePresent[index] = false; removePage(index); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java index 7e6b991c..27fea377 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java @@ -414,7 +414,7 @@ public class StorageOverlay extends GuiElement { if (stackOnMouse != null) { String stackDisplay = Utils.cleanColour(stackOnMouse.getDisplayName()); if (stackDisplay.startsWith("Backpack Slot ") || stackDisplay.startsWith("Empty Backpack Slot ") || - stackDisplay.startsWith("Ender Chest Page ")) { + stackDisplay.startsWith("Ender Chest Page ") || stackDisplay.startsWith("Locked Backpack Slot ")) { stackOnMouse = null; } } 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 d24f005d..03fe9eff 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java @@ -806,6 +806,7 @@ public class MiningOverlay extends TextTabOverlay { .getItemInformation() .get("ANVIL")) ); + put("First Event", new ItemStack(Items.fireworks, 1, 0)); }}; } } 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 0f9d1b4a..8576f141 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -61,6 +61,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.text.NumberFormat; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Locale; @@ -749,6 +750,30 @@ public class GuiProfileViewer extends GuiScreen { lastTime = currentTime; + if (currentPage != ProfileViewerPage.LOADING && currentPage != ProfileViewerPage.INVALID_NAME) { + int ignoredTabs = 0; + List configList = NotEnoughUpdates.INSTANCE.config.profileViewer.pageLayout; + for (int i = 0; i < configList.size(); i++) { + ProfileViewerPage iPage = ProfileViewerPage.getById(configList.get(i)); + if (iPage == null) continue; + if (iPage.stack == null || (iPage == ProfileViewerPage.BINGO && !showBingoPage)) { + ignoredTabs++; + continue; + } + int i2 = i - ignoredTabs; + int x = guiLeft + i2 * 28; + int y = guiTop - 28; + + if (mouseX > x && mouseX < x + 28) { + if (mouseY > y && mouseY < y + 32) { + tooltipToDisplay = Collections.singletonList(iPage.stack + .getTooltip(Minecraft.getMinecraft().thePlayer, false) + .get(0)); + } + } + } + } + if (tooltipToDisplay != null) { List grayTooltip = new ArrayList<>(tooltipToDisplay.size()); for (String line : tooltipToDisplay) { @@ -1232,16 +1257,16 @@ public class GuiProfileViewer extends GuiScreen { LOADING(), INVALID_NAME(), NO_SKYBLOCK(), - BASIC(0, Items.paper, "Your Skills"), - DUNGEON(1, Item.getItemFromBlock(Blocks.deadbush), "Dungeoneering"), - EXTRA(2, Items.book, "Profile Stats"), - INVENTORIES(3, Item.getItemFromBlock(Blocks.ender_chest), "Storage"), - COLLECTIONS(4, Items.painting, "Collections"), - PETS(5, Items.bone, "Pets"), - MINING(6, Items.iron_pickaxe, "Heart of the Mountain"), - BINGO(7, Items.filled_map, "Bingo"), - TROPHY_FISH(8, Items.fishing_rod, "Trophy Fish"), - BESTIARY(9, Items.iron_sword, "Bestiary"); + BASIC(0, Items.paper, "§9Your Skills"), + DUNGEON(1, Item.getItemFromBlock(Blocks.deadbush), "§eDungeoneering"), + EXTRA(2, Items.book, "§7Profile Stats"), + INVENTORIES(3, Item.getItemFromBlock(Blocks.ender_chest), "§bStorage"), + COLLECTIONS(4, Items.painting, "§6Collections"), + PETS(5, Items.bone, "§aPets"), + MINING(6, Items.iron_pickaxe, "§5Heart of the Mountain"), + BINGO(7, Items.filled_map, "§zBingo"), + TROPHY_FISH(8, Items.fishing_rod, "§3Trophy Fish"), + BESTIARY(9, Items.iron_sword, "§cBestiary"); public final ItemStack stack; public final int id; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryPage.java index efa94ee5..70ea051a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryPage.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryPage.java @@ -71,6 +71,11 @@ public class BestiaryPage extends GuiProfileViewerPage { int yIndex = 0; for (ItemStack stack : BestiaryData.getBestiaryLocations().keySet()) { Minecraft.getMinecraft().getTextureManager().bindTexture(pv_elements); + if (mouseX > guiLeft + 30 + bestiaryXSize * yIndex && mouseX < guiLeft + 30 + bestiaryXSize * yIndex + 20) { + if (mouseY > guiTop + 10 && mouseY < guiTop + 10 + 20) { + tooltipToDisplay = stack.getTooltip(Minecraft.getMinecraft().thePlayer, false); + } + } if (stack == selectedBestiaryLocation) { Utils.drawTexturedRect( guiLeft + 30 + bestiaryXSize * yIndex, @@ -109,10 +114,6 @@ public class BestiaryPage extends GuiProfileViewerPage { Utils.drawTexturedRect(guiLeft, guiTop, 431, 202, GL11.GL_NEAREST); GlStateManager.color(1, 1, 1, 1); - GlStateManager.disableLighting(); - RenderHelper.enableGUIStandardItemLighting(); - - List mobs = BestiaryData.getBestiaryLocations().get(selectedBestiaryLocation); Color color = new Color(128, 128, 128, 255); Utils.renderAlignedString( EnumChatFormatting.RED + "Bestiary Level: ", @@ -121,6 +122,10 @@ public class BestiaryPage extends GuiProfileViewerPage { guiTop + 50, 110 ); + + GlStateManager.disableLighting(); + RenderHelper.enableGUIStandardItemLighting(); + List mobs = BestiaryData.getBestiaryLocations().get(selectedBestiaryLocation); if (mobs != null) { for (int i = 0; i < mobs.size(); i++) { String mob = mobs.get(i); @@ -148,7 +153,7 @@ public class BestiaryPage extends GuiProfileViewerPage { 20 * (1 - completedness) / 256f, GL11.GL_NEAREST ); - GlStateManager.color(1, 185 / 255f, 0, 1); + //GlStateManager.color(1, 185 / 255f, 0, 1); Minecraft.getMinecraft().getTextureManager().bindTexture(pv_elements); Utils.drawTexturedRect( guiLeft + x, @@ -202,7 +207,7 @@ public class BestiaryPage extends GuiProfileViewerPage { if (level.maxed) { progressStr = EnumChatFormatting.GOLD + "MAXED!"; } else { - progressStr =EnumChatFormatting.AQUA + + progressStr = EnumChatFormatting.AQUA + StringUtils.shortNumberFormat(Math.round((levelNum % 1) * level.maxXpForLevel)) + "/" + StringUtils.shortNumberFormat(level.maxXpForLevel); -- cgit