diff options
author | syeyoung <cyougn06@naver.com> | 2022-01-31 23:39:50 +0900 |
---|---|---|
committer | syeyoung <cyougn06@naver.com> | 2022-01-31 23:39:50 +0900 |
commit | 2ed2473865ced32b3810de6fdd433fb017d247af (patch) | |
tree | 647af320d258a4a925ce80142795256bdbc24e69 /src/main/java/kr/syeyoung/dungeonsguide/features | |
parent | 8ef1a2bc1d3fc32882bc4739ef6876ac2c879ccd (diff) | |
download | Skyblock-Dungeons-Guide-2ed2473865ced32b3810de6fdd433fb017d247af.tar.gz Skyblock-Dungeons-Guide-2ed2473865ced32b3810de6fdd433fb017d247af.tar.bz2 Skyblock-Dungeons-Guide-2ed2473865ced32b3810de6fdd433fb017d247af.zip |
- Fix Custom Party List flickering and sometimes not displaying elements
- Fix Custom Party List displaying player count on "None" bedrock
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java index 1def0528..7ccbdcf9 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java @@ -63,20 +63,27 @@ public class PanelPartyListElement extends MPanel { private MTooltip mTooltip; + private ItemStack lastStack; @Override public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) { GuiCustomPartyFinder guiCustomPartyFinder = panelPartyFinder.getGuiCustomPartyFinder(); if (guiCustomPartyFinder.getGuiChest() == null) return; Slot s = guiCustomPartyFinder.getGuiChest().inventorySlots.getSlot(slot); ItemStack itemStack = s.getStack(); - if (itemStack == null) return; - - + if (itemStack == null && lastStack == null) return; + if (itemStack != null) + lastStack = itemStack; + else + itemStack = lastStack; int color = RenderUtils.blendAlpha(0x141414, 0.0f); String note = ""; + boolean notfound = false; boolean cantjoin = false; - if (itemStack.getItem() == Item.getItemFromBlock(Blocks.bedrock)) cantjoin = true; + if (itemStack.getItem() == Item.getItemFromBlock(Blocks.bedrock)) { + cantjoin = true; + notfound = true; + } int minClass = -1, minDungeon = -1; int pplIn = 0; Set<String> dungeonClasses = new HashSet<>(); @@ -159,14 +166,15 @@ public class PanelPartyListElement extends MPanel { name = name.substring(0, name.indexOf("'")); fr.drawString(name, 0,0,-1); - note = "§7("+pplIn+") §f"+note; + if (!notfound) + note = "§7("+pplIn+") §f"+note; fr.drawString(note, fr.getStringWidth("AAAAAAAAAAAAAAAA")+5, 0,-1); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); String sideNote = ""; if (minClass != -1) sideNote += "§7CLv ≥§b"+minClass+" "; if (minDungeon != -1) sideNote += "§7DLv ≥§b"+minDungeon+" "; - if (cantjoin) sideNote = "§cCan't join"; + if (cantjoin && !notfound) sideNote = "§cCan't join"; sideNote = sideNote.trim(); GlStateManager.translate(getBounds().width,(32 - 2*fr.FONT_HEIGHT)/2,0); |