diff options
| author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2022-04-30 14:24:52 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-30 16:24:52 +0200 |
| commit | 7243827ec602efa0d2386ab53a61472465e8555a (patch) | |
| tree | f854d9ecddd27a200f3a91193448cfbf85303780 /src/main/java | |
| parent | e6d58c7281375e8ca67b0e217e9c0eea2626ee19 (diff) | |
| download | NotEnoughUpdates-7243827ec602efa0d2386ab53a61472465e8555a.tar.gz NotEnoughUpdates-7243827ec602efa0d2386ab53a61472465e8555a.tar.bz2 NotEnoughUpdates-7243827ec602efa0d2386ab53a61472465e8555a.zip | |
made it so "pane gui scale" doesnt effect armour/pet huds (#117)
* made it so "pane gui scale" doesnt effect armour/pet huds ( i did not know that was a feature)
this did NOT take me 20 minutes to make this commit on the right branch
* = Updated the syntax for the /sthw command, putting name after the coordinates (@My-Name-Is-Jeff)
* deez nuts
* move equipment tooltips to the left
* move tooltip when rendering
fixes some opengl shenanigans when using GlTranslate
* import static
* i think the number 27 is cooler than 21 but its needed here
* fix pet tooltip when equipment is not cached
* added master star support to the search overlay (no texture rn cos lazy)
* Added 6-10 stars to the auction search overlay
i am not using the web editor
* texture - jani
* ➓/➓ pr adding numbers to /neurename
* ➓/➓ pr adding numbers 2.1.md
* neuec support to attributes (THIS DID NOT TAKE OVER AN HOUR)
* 2.1.md 🙂
* Added flares to tools itemtab / fixed todo move option not showing / some fixes for my heart
* fix normal keybinds not working in CalendarOverlay
* 2.1.md 🙂
* cobble pro time keeper
* added MAXED_ATTRIBUTE_SHARD
* Update 2.1.md
Co-authored-by: Lulonaut <lulonaut@tutanota.de>
Co-authored-by: jani270 <jani270@gmx.de>
Diffstat (limited to 'src/main/java')
15 files changed, 447 insertions, 338 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index f473a56f..d3efc06a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -1,63 +1,9 @@ package io.github.moulberry.notenoughupdates; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.ascending_overlay; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.close; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.descending_overlay; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.help; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.itemPaneTabArrow; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.item_haschild; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.item_mask; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.order_alphabetical; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.order_alphabetical_active; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.order_rarity; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.order_rarity_active; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.order_value; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.order_value_active; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.quickcommand_background; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.rightarrow; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.rightarrow_overlay; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.settings; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.sort_accessory; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.sort_accessory_active; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.sort_all; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.sort_all_active; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.sort_armor; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.sort_armor_active; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.sort_mob; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.sort_mob_active; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.sort_pet; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.sort_pet_active; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.sort_tool; -import static io.github.moulberry.notenoughupdates.util.GuiTextures.sort_tool_active; - -import java.awt.Color; -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; -import java.util.UUID; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicReference; - import com.google.common.collect.Lists; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import org.lwjgl.input.Keyboard; -import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL14; -import org.lwjgl.util.vector.Vector2f; import io.github.moulberry.notenoughupdates.auction.CustomAHGui; import io.github.moulberry.notenoughupdates.core.BackgroundBlur; import io.github.moulberry.notenoughupdates.core.GuiScreenElementWrapper; @@ -75,6 +21,7 @@ import io.github.moulberry.notenoughupdates.miscfeatures.SunTzu; import io.github.moulberry.notenoughupdates.miscgui.GuiPriceGraph; import io.github.moulberry.notenoughupdates.options.NEUConfigEditor; import io.github.moulberry.notenoughupdates.util.Constants; +import io.github.moulberry.notenoughupdates.util.GuiTextures; import io.github.moulberry.notenoughupdates.util.LerpingFloat; import io.github.moulberry.notenoughupdates.util.NotificationHandler; import io.github.moulberry.notenoughupdates.util.SpecialColour; @@ -115,6 +62,30 @@ import net.minecraft.util.Matrix4f; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.client.ClientCommandHandler; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL14; +import org.lwjgl.util.vector.Vector2f; + +import java.awt.*; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeSet; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; public class NEUOverlay extends Gui { private static final ResourceLocation SUPERGEHEIMNISVERMOGEN = new ResourceLocation( @@ -170,17 +141,27 @@ public class NEUOverlay extends Gui { private final String petRegex = ".*?;[0-5]$"; private final ResourceLocation[] sortIcons = new ResourceLocation[]{ - sort_all, sort_mob, sort_pet, sort_tool, sort_armor, sort_accessory + GuiTextures.sort_all, + GuiTextures.sort_mob, + GuiTextures.sort_pet, + GuiTextures.sort_tool, + GuiTextures.sort_armor, + GuiTextures.sort_accessory }; private final ResourceLocation[] sortIconsActive = new ResourceLocation[]{ - sort_all_active, sort_mob_active, sort_pet_active, sort_tool_active, sort_armor_active, sort_accessory_active + GuiTextures.sort_all_active, + GuiTextures.sort_mob_active, + GuiTextures.sort_pet_active, + GuiTextures.sort_tool_active, + GuiTextures.sort_armor_active, + GuiTextures.sort_accessory_active }; private final ResourceLocation[] orderIcons = new ResourceLocation[]{ - order_alphabetical, order_rarity, order_value + GuiTextures.order_alphabetical, GuiTextures.order_rarity, GuiTextures.order_value }; private final ResourceLocation[] orderIconsActive = new ResourceLocation[]{ - order_alphabetical_active, order_rarity_active, order_value_active + GuiTextures.order_alphabetical_active, GuiTextures.order_rarity_active, GuiTextures.order_value_active }; //Various constants used for GUI structure @@ -449,13 +430,13 @@ public class NEUOverlay extends Gui { if (!NotEnoughUpdates.INSTANCE.config.toolbar.enableSettingsButton) { return; } - Minecraft.getMinecraft().getTextureManager().bindTexture(quickcommand_background); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.quickcommand_background); GlStateManager.color(1, 1, 1, 1); Utils.drawTexturedRect(x, y, searchYSize + paddingUnscaled * 2, searchYSize + paddingUnscaled * 2, GL11.GL_NEAREST ); - Minecraft.getMinecraft().getTextureManager().bindTexture(settings); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.settings); GlStateManager.color(1f, 1f, 1f, 1f); Utils.drawTexturedRect((int) x + paddingUnscaled, (int) y + paddingUnscaled, searchYSize, searchYSize @@ -507,13 +488,13 @@ public class NEUOverlay extends Gui { return; } - Minecraft.getMinecraft().getTextureManager().bindTexture(quickcommand_background); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.quickcommand_background); GlStateManager.color(1, 1, 1, 1); Utils.drawTexturedRect(x, y, searchYSize + paddingUnscaled * 2, searchYSize + paddingUnscaled * 2, GL11.GL_NEAREST ); - Minecraft.getMinecraft().getTextureManager().bindTexture(help); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.help); GlStateManager.color(1f, 1f, 1f, 1f); Utils.drawTexturedRect((int) x + paddingUnscaled, (int) y + paddingUnscaled, getSearchBarYSize(), getSearchBarYSize() @@ -609,7 +590,7 @@ public class NEUOverlay extends Gui { tag.setString("qc_id", quickCommandStrSplit[0].toLowerCase().trim()); render.setTagCompound(tag); - Minecraft.getMinecraft().getTextureManager().bindTexture(quickcommand_background); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.quickcommand_background); GlStateManager.color(1, 1, 1, 1); Utils.drawTexturedRect(x, y, bigItemSize + paddingUnscaled * 2, bigItemSize + paddingUnscaled * 2, GL11.GL_NEAREST @@ -1378,7 +1359,8 @@ public class NEUOverlay extends Gui { "DUNGEON BOW", "DRILL", "GAUNTLET", - "LONGSWORD" + "LONGSWORD", + "DEPLOYABLE" ) >= 0; } else if (getSortMode() == SORT_MODE_ARMOR) { return checkItemType( @@ -1679,12 +1661,12 @@ public class NEUOverlay extends Gui { drawRect(leftSide - 1, top, leftSide - 1 + buttonXSize, top + ySize, fg.getRGB()); GlStateManager.color(1f, 1f, 1f, 1f); - Minecraft.getMinecraft().getTextureManager().bindTexture(rightarrow); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.rightarrow); Utils.drawTexturedRect(leftSide - 1 + leftPressed, top + leftPressed, buttonXSize, ySize, 1, 0, 0, 1 ); - Minecraft.getMinecraft().getTextureManager().bindTexture(rightarrow_overlay); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.rightarrow_overlay); Utils.drawTexturedRect(leftSide - 1, top, buttonXSize, ySize, 1 - leftPressed, leftPressed, 1 - leftPressed, leftPressed @@ -1698,12 +1680,12 @@ public class NEUOverlay extends Gui { drawRect(rightSide + 1 - buttonXSize, top, rightSide + 1, top + ySize, fg.getRGB()); GlStateManager.color(1f, 1f, 1f, 1f); - Minecraft.getMinecraft().getTextureManager().bindTexture(rightarrow); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.rightarrow); Utils.drawTexturedRect(rightSide + 1 - buttonXSize + rightPressed, top + rightPressed, buttonXSize, ySize ); - Minecraft.getMinecraft().getTextureManager().bindTexture(rightarrow_overlay); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.rightarrow_overlay); Utils.drawTexturedRect(rightSide + 1 - buttonXSize, top, buttonXSize, ySize, 1 - rightPressed, rightPressed, 1 - rightPressed, rightPressed @@ -1879,7 +1861,6 @@ public class NEUOverlay extends Gui { return wardrobeOpen; } - private ItemStack getChestSlotsAsItemStack(int slot) { GuiScreen guiScreen = Minecraft.getMinecraft().currentScreen; if (guiScreen instanceof GuiChest) { @@ -1890,14 +1871,12 @@ public class NEUOverlay extends Gui { } } - private ItemStack getWardrobeSlot(int armourSlot) { if (isInNamedGui("Your Equipment")) { - return getChestSlotsAsItemStack(armourSlot); + return getChestSlotsAsItemStack(armourSlot); } else return null; } - public ItemStack slot1 = null; public ItemStack slot2 = null; public ItemStack slot3 = null; @@ -1944,228 +1923,6 @@ public class NEUOverlay extends Gui { Utils.drawTexturedRect((width - 64) / 2f, (height - 64) / 2f - 114, 64, 64, GL11.GL_LINEAR); GlStateManager.bindTexture(0); } - GuiScreen guiScreen = Minecraft.getMinecraft().currentScreen; - - if (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud && - NotEnoughUpdates.INSTANCE.config.misc.hidePotionEffect - && NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) { - if (getWardrobeSlot(10) != null) { - slot1 = getWardrobeSlot(10); - slot2 = getWardrobeSlot(19); - slot3 = getWardrobeSlot(28); - slot4 = getWardrobeSlot(37); - } - if (guiScreen instanceof GuiInventory) { - renderingArmorHud = true; - - List<String> tooltipToDisplay = null; - if (NotEnoughUpdates.INSTANCE.config.customArmour.colourStyle == 0) { - Minecraft.getMinecraft().getTextureManager().bindTexture(ARMOR_DISPLAY); - } - if (NotEnoughUpdates.INSTANCE.config.customArmour.colourStyle == 1) { - Minecraft.getMinecraft().getTextureManager().bindTexture(ARMOR_DISPLAY_GREY); - } - if (NotEnoughUpdates.INSTANCE.config.customArmour.colourStyle == 2) { - Minecraft.getMinecraft().getTextureManager().bindTexture(ARMOR_DISPLAY_DARK); - } - if (NotEnoughUpdates.INSTANCE.config.customArmour.colourStyle == 3) { - if (NotEnoughUpdates.INSTANCE.config.petOverlay.colourStyle == 3 && - NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay && petSlot != null) { - Minecraft.getMinecraft().getTextureManager().bindTexture(ARMOR_DISPLAY_TRANSPARENT_PET); - } else { - Minecraft.getMinecraft().getTextureManager().bindTexture(ARMOR_DISPLAY_TRANSPARENT); - } - } - if (NotEnoughUpdates.INSTANCE.config.customArmour.colourStyle == 4) { - Minecraft.getMinecraft().getTextureManager().bindTexture(ARMOR_DISPLAY_FSR); - } - - GlStateManager.color(1, 1, 1, 1); - GL11.glTranslatef(0, 0, 401); - float yNumber = (float) (height - 167) / 2f; - 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); - if (slot1 == null) { - Minecraft.getMinecraft().getTextureManager().bindTexture(QUESTION_MARK); - GlStateManager.color(1, 1, 1, 1); - Utils.drawTexturedRect(((width - 208) / 2f), ((height + 60) / 2f - 105), 16, 16, GL11.GL_NEAREST); - GlStateManager.bindTexture(0); - - tooltipToDisplay = Lists.newArrayList( - EnumChatFormatting.RED + "Warning", - EnumChatFormatting.GREEN + "You need to open /equipment", - EnumChatFormatting.GREEN + "To cache your armour" - ); - if (mouseX >= ((width - 208) / 2f) && mouseX < ((width - 208) / 2f) + 16) { - if (mouseY >= ((height + 60) / 2f - 105) && mouseY <= ((height + 60) / 2f - 105) + 70 && - NotEnoughUpdates.INSTANCE.config.customArmour.sendWardrobeCommand) { - if (Minecraft.getMinecraft().thePlayer.inventory.getItemStack() == null) { - if (Mouse.getEventButtonState()) { - if (ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/equipment") == - 0) { - NotEnoughUpdates.INSTANCE.sendChatMessage("/equipment"); - } - } - } - } - if (mouseY >= ((height + 60) / 2f - 105) && mouseY <= ((height + 60) / 2f - 105) + 16) { - Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, fr); - GL11.glTranslatef(0, 0, -401); - } - } - - } - if (slot1 != null && slot2 != null && slot3 != null && slot4 != null) { - if (mouseX >= ((width - 208) / 2f) && mouseX < ((width - 208) / 2f) + 16) { - if (mouseY >= ((height + 60) / 2f - 105) && mouseY <= ((height + 60) / 2f - 105) + 70 && - NotEnoughUpdates.INSTANCE.config.customArmour.sendWardrobeCommand) { - if (Minecraft.getMinecraft().thePlayer.inventory.getItemStack() == null) { - if (Mouse.getEventButtonState()) { - if (ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/equipment") == - 0) { - NotEnoughUpdates.INSTANCE.sendChatMessage("/equipment"); - } - } - } - } - //top slot - if (mouseY >= ((height + 60) / 2f - 105) && mouseY <= ((height + 60) / 2f - 105) + 16) { - tooltipToDisplay = slot1.getTooltip(Minecraft.getMinecraft().thePlayer, false); - Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, fr); - tooltipToDisplay = null; - GL11.glTranslatef(0, 0, -401); - } - if (mouseY >= ((height + 60) / 2f - 105) + 18 && mouseY <= ((height + 60) / 2f - 105) + 34) { - tooltipToDisplay = slot2.getTooltip(Minecraft.getMinecraft().thePlayer, false); - Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, fr); - tooltipToDisplay = null; - GL11.glTranslatef(0, 0, -401); - } - if (mouseY >= ((height + 60) / 2f - 105) + 36 && mouseY <= ((height + 60) / 2f - 105) + 52) { - tooltipToDisplay = slot3.getTooltip(Minecraft.getMinecraft().thePlayer, false); - Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, fr); - tooltipToDisplay = null; - GL11.glTranslatef(0, 0, -401); - } - if (mouseY >= ((height + 60) / 2f - 105) + 54 && mouseY <= ((height + 60) / 2f - 105) + 70) { - tooltipToDisplay = slot4.getTooltip(Minecraft.getMinecraft().thePlayer, false); - Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, fr); - tooltipToDisplay = null; - GL11.glTranslatef(0, 0, -401); - } - } - GL11.glTranslatef(0, 0, -401); - } - } - } - if (PetInfoOverlay.getCurrentPet() != null) { - if (NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay - && (NotEnoughUpdates.INSTANCE.manager - .jsonToStack(NotEnoughUpdates.INSTANCE.manager - .getItemInformation() - .get(PetInfoOverlay.getCurrentPet().petType + ";" + PetInfoOverlay.getCurrentPet().rarity.petId)) - .hasDisplayName() - || NotEnoughUpdates.INSTANCE.manager - .jsonToStack(NotEnoughUpdates.INSTANCE.manager - .getItemInformation() - .get(PetInfoOverlay.getCurrentPet().petType + ";" + (PetInfoOverlay.getCurrentPet().rarity.petId - 1))) - .hasDisplayName()) - && NotEnoughUpdates.INSTANCE.config.misc.hidePotionEffect && - NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) { - if (!NotEnoughUpdates.INSTANCE.manager - .jsonToStack( - NotEnoughUpdates.INSTANCE.manager - .getItemInformation() - .get(PetInfoOverlay.getCurrentPet().petType + ";" + PetInfoOverlay.getCurrentPet().rarity.petId)) - .hasDisplayName()) { - petSlot = NotEnoughUpdates.INSTANCE.manager.jsonToStack( - NotEnoughUpdates.INSTANCE.manager.getItemInformation().get( - PetInfoOverlay.getCurrentPet().petType + ";" + (PetInfoOverlay.getCurrentPet().rarity.petId - 1))); - } else { - petSlot = NotEnoughUpdates.INSTANCE.manager.jsonToStack( - NotEnoughUpdates.INSTANCE.manager.getItemInformation().get( - PetInfoOverlay.getCurrentPet().petType + ";" + PetInfoOverlay.getCurrentPet().rarity.petId)); - } - petSlot.getTagCompound().setBoolean("NEUPETINVDISPLAY", true); - petSlot.getTagCompound().setBoolean( - "NEUHIDEPETTOOLTIP", - NotEnoughUpdates.INSTANCE.config.petOverlay.hidePetTooltip - ); - ItemStack petInfo = petSlot; - - if (guiScreen instanceof GuiInventory) { - GL11.glTranslatef(0, 0, 401); - if (!NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud) { - if (NotEnoughUpdates.INSTANCE.config.petOverlay.colourStyle == 0) { - Minecraft.getMinecraft().getTextureManager().bindTexture(PET_DISPLAY); - } - if (NotEnoughUpdates.INSTANCE.config.petOverlay.colourStyle == 1) { - Minecraft.getMinecraft().getTextureManager().bindTexture(PET_DISPLAY_GREY); - } - if (NotEnoughUpdates.INSTANCE.config.petOverlay.colourStyle == 2) { - Minecraft.getMinecraft().getTextureManager().bindTexture(PET_DISPLAY_DARK); - } - if (NotEnoughUpdates.INSTANCE.config.petOverlay.colourStyle == 3) { - Minecraft.getMinecraft().getTextureManager().bindTexture(PET_DISPLAY_TRANSPARENT); - } - if (NotEnoughUpdates.INSTANCE.config.petOverlay.colourStyle == 4) { - Minecraft.getMinecraft().getTextureManager().bindTexture(PET_DISPLAY_FSR); - } - } else { - if (NotEnoughUpdates.INSTANCE.config.petOverlay.colourStyle == 0) { - Minecraft.getMinecraft().getTextureManager().bindTexture(PET_ARMOR_DISPLAY); - } - if (NotEnoughUpdates.INSTANCE.config.petOverlay.colourStyle == 1) { - Minecraft.getMinecraft().getTextureManager().bindTexture(PET_ARMOR_DISPLAY_GREY); - } - if (NotEnoughUpdates.INSTANCE.config.petOverlay.colourStyle == 2) { - Minecraft.getMinecraft().getTextureManager().bindTexture(PET_ARMOR_DISPLAY_DARK); - } - if (NotEnoughUpdates.INSTANCE.config.petOverlay.colourStyle == 3) { - Minecraft.getMinecraft().getTextureManager().bindTexture(PET_ARMOR_DISPLAY_TRANSPARENT); - } - if (NotEnoughUpdates.INSTANCE.config.petOverlay.colourStyle == 4) { - Minecraft.getMinecraft().getTextureManager().bindTexture(PET_ARMOR_DISPLAY_FSR); - } - } - - GlStateManager.color(1, 1, 1, 1); - float yNumber = (float) (height - 23) / 2f; - 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); - renderingPetHud = true; - - List<String> tooltipToDisplay = null; - if (petInfo != null) { - if (mouseX >= ((width - 208) / 2f) && mouseX < ((width - 208) / 2f) + 16) { - if (mouseY >= ((height + 60) / 2f - 105) + 72 && mouseY <= ((height + 60) / 2f - 105) + 88 && - NotEnoughUpdates.INSTANCE.config.petOverlay.sendPetsCommand) { - if (Minecraft.getMinecraft().thePlayer.inventory.getItemStack() == null) { - if (Mouse.getEventButtonState()) { - if (ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/pets") == - 0) { - NotEnoughUpdates.INSTANCE.sendChatMessage("/pets"); - } - } - } - tooltipToDisplay = petInfo.getTooltip(Minecraft.getMinecraft().thePlayer, false); - Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, fr); - tooltipToDisplay = null; - GL11.glTranslatef(0, 0, -80); - } - } - - } - } - } - } SunTzu.setEnabled(textField.getText().toLowerCase().startsWith("potato")); @@ -2239,7 +1996,7 @@ public class NEUOverlay extends Gui { //Tab if (NotEnoughUpdates.INSTANCE.config.itemlist.tabOpen) { - Minecraft.getMinecraft().getTextureManager().bindTexture(itemPaneTabArrow); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.itemPaneTabArrow); GlStateManager.color(1f, 1f, 1f, 0.3f); Utils.drawTexturedRect(width - itemPaneTabOffset.getValue() * 64 / 20f, height / 2f - 32, 64, 64); GlStateManager.bindTexture(0); @@ -2301,8 +2058,8 @@ public class NEUOverlay extends Gui { Utils.drawTexturedRect(orderIconX, iconTop, scaledITEM_SIZE, scaledITEM_SIZE, 0, 1, 0, 1, GL11.GL_NEAREST); Minecraft.getMinecraft().getTextureManager().bindTexture(getCompareAscending().get(i) - ? ascending_overlay - : descending_overlay); + ? GuiTextures.ascending_overlay + : GuiTextures.descending_overlay); GlStateManager.color(1f, 1f, 1f, 1f); Utils.drawTexturedRect(orderIconX, iconTop, scaledITEM_SIZE, scaledITEM_SIZE, 0, 1, 0, 1, GL11.GL_NEAREST); GlStateManager.bindTexture(0); @@ -2486,7 +2243,7 @@ public class NEUOverlay extends Gui { activeInfoPane.render(width, height, bg, fg, Utils.peekGuiScale(), mouseX, mouseY); GlStateManager.color(1f, 1f, 1f, 1f); - Minecraft.getMinecraft().getTextureManager().bindTexture(close); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.close); Utils.drawTexturedRect(rightSide - getBoxPadding() - 8, getBoxPadding() - 8, 16, 16); GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0); } @@ -2532,7 +2289,7 @@ public class NEUOverlay extends Gui { GlStateManager.enableAlpha(); GlStateManager.alphaFunc(516, 0.1F); GlStateManager.disableLighting(); - + renderInfoHuds(); Utils.pushGuiScale(-1); if (System.currentTimeMillis() - lastSearchMode > 120000 && @@ -2542,6 +2299,245 @@ public class NEUOverlay extends Gui { } } + void renderInfoHuds() { + FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; + + Utils.resetGuiScale(); + Utils.pushGuiScale(Minecraft.getMinecraft().gameSettings.guiScale); + + int width = Utils.peekGuiScale().getScaledWidth(); + int height = Utils.peekGuiScale().getScaledHeight(); + int mouseX = Mouse.getX() * width / Minecraft.getMinecraft().displayWidth; + int mouseY = height - Mouse.getY() * height / Minecraft.getMinecraft().displayHeight - 1; + GuiScreen guiScreen = Minecraft.getMinecraft().currentScreen; + + if (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud && + NotEnoughUpdates.INSTANCE.config.misc.hidePotionEffect + && NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) { + if (getWardrobeSlot(10) != null) { + slot1 = getWardrobeSlot(10); + slot2 = getWardrobeSlot(19); + slot3 = getWardrobeSlot(28); + slot4 = getWardrobeSlot(37); + } + if (guiScreen instanceof GuiInventory) { + renderingArmorHud = true; + + List<String> tooltipToDisplay = null; + if (NotEnoughUpdates.INSTANCE.config.customArmour.colourStyle == 0) { + Minecraft.getMinecraft().getTextureManager().bindTexture(ARMOR_DISPLAY); + } + if (NotEnoughUpdates.INSTANCE.config.customArmour.colourStyle == 1) { + Minecraft.getMinecraft().getTextureManager().bindTexture(ARMOR_DISPLAY_GREY); + } + if (NotEnoughUpdates.INSTANCE.config.customArmour.colourStyle == 2) { + Minecraft.getMinecraft().getTextureManager().bindTexture(ARMOR_DISPLAY_DARK); + } + if (NotEnoughUpdates.INSTANCE.config.customArmour.colourStyle == 3) { + if (NotEnoughUpdates.INSTANCE.config.petOverlay.colourStyle == 3 && + NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay && petSlot != null) { + Minecraft.getMinecraft().getTextureManager().bindTexture(ARMOR_DISPLAY_TRANSPARENT_PET); + } else { + Minecraft.getMinecraft().getTextureManager().bindTexture(ARMOR_DISPLAY_TRANSPARENT); + } + } + if (NotEnoughUpdates.INSTANCE.config.customArmour.colourStyle == 4) { + Minecraft.getMinecraft().getTextureManager().bindTexture(ARMOR_DISPLAY_FSR); + } + + GlStateManager.color(1, 1, 1, 1); + GL11.glTranslatef(0, 0, 401); + float yNumber = (float) (height - 167) / 2f; + 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); + if (slot1 == null) { + Minecraft.getMinecraft().getTextureManager().bindTexture(QUESTION_MARK); + GlStateManager.color(1, 1, 1, 1); + Utils.drawTexturedRect(((width - 208) / 2f), ((height + 60) / 2f - 105), 16, 16, GL11.GL_NEAREST); + GlStateManager.bindTexture(0); + + tooltipToDisplay = Lists.newArrayList( + EnumChatFormatting.RED + "Warning", + EnumChatFormatting.GREEN + "You need to open /equipment", + EnumChatFormatting.GREEN + "To cache your armour" + ); + if (mouseX >= ((width - 208) / 2f) && mouseX < ((width - 208) / 2f) + 16) { + if (mouseY >= ((height + 60) / 2f - 105) && mouseY <= ((height + 60) / 2f - 105) + 70 && + NotEnoughUpdates.INSTANCE.config.customArmour.sendWardrobeCommand) { + if (Minecraft.getMinecraft().thePlayer.inventory.getItemStack() == null) { + if (Mouse.getEventButtonState()) { + if (ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/equipment") == + 0) { + NotEnoughUpdates.INSTANCE.sendChatMessage("/equipment"); + } + } + } + } + if (mouseY >= ((height + 60) / 2f - 105) && mouseY <= ((height + 60) / 2f - 105) + 16) { + Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, fr); + } + } + GL11.glTranslatef(0, 0, -401); + } + if (slot1 != null && slot2 != null && slot3 != null && slot4 != null) { + if (mouseX >= ((width - 208) / 2f) && mouseX < ((width - 208) / 2f) + 16) { + if (mouseY >= ((height + 60) / 2f - 105) && mouseY <= ((height + 60) / 2f - 105) + 70 && + NotEnoughUpdates.INSTANCE.config.customArmour.sendWardrobeCommand) { + if (Minecraft.getMinecraft().thePlayer.inventory.getItemStack() == null) { + if (Mouse.getEventButtonState()) { + if (ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/equipment") == + 0) { + NotEnoughUpdates.INSTANCE.sendChatMessage("/equipment"); + } + } + } + } + //top slot + int tooltipXModifier = -175; + if (mouseY >= ((height + 60) / 2f - 105) && mouseY <= ((height + 60) / 2f - 105) + 16) { + tooltipToDisplay = slot1.getTooltip(Minecraft.getMinecraft().thePlayer, false); + if (shouldShowEquipmentTooltip(tooltipToDisplay)) { |
