diff options
Diffstat (limited to 'src')
4 files changed, 13 insertions, 78 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index 6d2904be..65e121eb 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -799,7 +799,7 @@ public class NEUEventListener { private IChatComponent replaceSocialControlsWithPV(IChatComponent chatComponent) { - if (NotEnoughUpdates.INSTANCE.config.misc.replaceSocialOptions1 > 0 && chatComponent.getChatStyle() != null && chatComponent.getChatStyle().getChatClickEvent() != null && chatComponent.getChatStyle().getChatClickEvent().getAction() == ClickEvent.Action.RUN_COMMAND) { + if (NotEnoughUpdates.INSTANCE.config.misc.replaceSocialOptions1 > 0 && chatComponent.getChatStyle() != null && chatComponent.getChatStyle().getChatClickEvent() != null && chatComponent.getChatStyle().getChatClickEvent().getAction() == ClickEvent.Action.RUN_COMMAND && NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) { if (chatComponent.getChatStyle().getChatClickEvent().getValue().startsWith("/socialoptions")) { String username = chatComponent.getChatStyle().getChatClickEvent().getValue().substring(15); if (NotEnoughUpdates.INSTANCE.config.misc.replaceSocialOptions1 == 1) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index ca8a48d8..5487a96c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -1726,24 +1726,6 @@ public class NEUOverlay extends Gui { } return wardrobePage; } - private int petPage = -1; - private int getPetPage () { - GuiScreen guiScreen = Minecraft.getMinecraft().currentScreen; - if (guiScreen instanceof GuiChest) { - if (isInNamedGui("Pets")) { - GuiChest chest = (GuiChest) Minecraft.getMinecraft().currentScreen; - ContainerChest container = (ContainerChest) chest.inventorySlots; - IInventory lower = container.getLowerChestInventory(); - String containerName = lower.getDisplayName().getUnformattedText(); - try { - petPage = Integer.parseInt(containerName.substring(1, 2)); - } catch (NumberFormatException e) { - petPage = 1; - } - } else petPage = -1; - } - return petPage; - } private ItemStack getChestSlotsAsItemStack(int slot) { GuiScreen guiScreen = Minecraft.getMinecraft().currentScreen; if (guiScreen instanceof GuiChest) { @@ -1787,33 +1769,6 @@ public class NEUOverlay extends Gui { return selectedArmor; } - private int selectedPet = 0; - private int getEquippedPet() { - if (isInNamedGui("Pets")) { - for (int ii = 1; ii < 3; ii++) { - if (ii == 1 || selectedPet == 0) { - if (getPetPage() == ii) { - for (int i = 0; i < 54; i ++) { - ItemStack stack1 = getChestSlotsAsItemStack(i); - if (stack1 != null) { - String[] lore1 = NotEnoughUpdates.INSTANCE.manager.getLoreFromNBT(stack1.getTagCompound()); - for (String line : lore1) { - //System.out.println(line); - if (line.contains("\u00a77\u00a7cClick to despawn.")) { - selectedPet = i; - shouldUseCachedPet = true; - } - } - } else { - shouldUseCachedPet = false; - } - } - } - } - } - } - return selectedPet; - } private ItemStack getWardrobeSlot(int armourSlot) { if (isInNamedGui("Wardrobe")) { @@ -1841,7 +1796,6 @@ public class NEUOverlay extends Gui { public ItemStack slot3 = null; public ItemStack slot4 = null; public ItemStack petSlot = null; - public ItemStack petSlot2 = null; public static boolean isRenderingArmorHud() { return renderingArmorHud; } @@ -1905,7 +1859,7 @@ public class NEUOverlay extends Gui { 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) { + 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); @@ -1916,7 +1870,7 @@ public class NEUOverlay extends Gui { } GlStateManager.color(1, 1, 1, 1); - GL11.glTranslatef(0, 0, 80); + 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); @@ -1928,7 +1882,6 @@ public class NEUOverlay extends Gui { if (slot1 == null) { Minecraft.getMinecraft().getTextureManager().bindTexture(QUESTION_MARK); GlStateManager.color(1, 1, 1, 1); - GL11.glTranslatef(0, 0, 100); Utils.drawTexturedRect(((width - 208) / 2f), ((height + 60) / 2f - 105), 16, 16, GL11.GL_NEAREST); GlStateManager.bindTexture(0); @@ -1941,6 +1894,7 @@ public class NEUOverlay extends Gui { //top slot 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); } } @@ -1952,28 +1906,28 @@ public class NEUOverlay extends Gui { tooltipToDisplay = slot1.getTooltip(Minecraft.getMinecraft().thePlayer, false); Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, fr); tooltipToDisplay = null; - GL11.glTranslatef(0, 0, -80); + 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, -80); + 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, -80); + 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, -80); + GL11.glTranslatef(0, 0, -401); } } - GL11.glTranslatef(0, 0, -80); + GL11.glTranslatef(0, 0, -401); } } } @@ -1984,18 +1938,10 @@ public class NEUOverlay extends Gui { petSlot = NotEnoughUpdates.INSTANCE.manager.jsonToStack( NotEnoughUpdates.INSTANCE.manager.getItemInformation().get( PetInfoOverlay.getCurrentPet().petType + ";" + PetInfoOverlay.getCurrentPet().rarity.petId)); - if (isInNamedGui("Pets")) { - petSlot2 = getChestSlotsAsItemStack(getEquippedPet()); - } - ItemStack petInfo = null; + ItemStack petInfo = petSlot; - if (shouldUseCachedPet) { - petInfo = petSlot2; - } else { - petInfo = petSlot; - } if (guiScreen instanceof GuiInventory) { - GL11.glTranslatef(0, 0, 80); + GL11.glTranslatef(0, 0, 401); if (!NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud || !isWardrobeSystemOnMainServer()) { if (NotEnoughUpdates.INSTANCE.config.petOverlay.colourStyle == 0) { Minecraft.getMinecraft().getTextureManager().bindTexture(PET_DISPLAY); @@ -2037,20 +1983,9 @@ public class NEUOverlay extends Gui { 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) { - 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")); 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 8fe64b55..698cfad4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java @@ -1110,7 +1110,7 @@ public class PetInfoOverlay extends TextOverlay { @SubscribeEvent(priority = EventPriority.HIGHEST) public void onChatReceived(ClientChatReceivedEvent event) { NEUConfig config = NotEnoughUpdates.INSTANCE.config; - if (NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard() && (config.petOverlay.enablePetInfo || config.itemOverlays.enableMonkeyCheck)) { + if (NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard() && (config.petOverlay.enablePetInfo || config.itemOverlays.enableMonkeyCheck || config.petOverlay.petInvDisplay)) { if (event.type == 0) { String chatMessage = Utils.cleanColour(event.message.getUnformattedText()); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/PetOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/PetOverlay.java index 7e49222c..a9140fe3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/PetOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/PetOverlay.java @@ -88,5 +88,5 @@ public class PetOverlay { desc = "Shows an overlay in your inventory showing your current pet"
)
@ConfigEditorBoolean
- public boolean petInvDisplay = true;
+ public boolean petInvDisplay = false;
}
|