From 78380c3e09366f492793a5d67619e774d0d035dc Mon Sep 17 00:00:00 2001 From: Kam Date: Tue, 18 Feb 2025 04:34:53 -0500 Subject: [PATCH] Small Fix --- .../client/gui/global/GuiNPCManageLinked.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/java/noppes/npcs/client/gui/global/GuiNPCManageLinked.java b/src/main/java/noppes/npcs/client/gui/global/GuiNPCManageLinked.java index 88db298b0..4c37aa728 100644 --- a/src/main/java/noppes/npcs/client/gui/global/GuiNPCManageLinked.java +++ b/src/main/java/noppes/npcs/client/gui/global/GuiNPCManageLinked.java @@ -57,19 +57,20 @@ public class GuiNPCManageLinked extends GuiNPCInterface2 implements IScrollData, public GuiNPCManageLinked(EntityNPCInterface npc){ super(npc); - - // Spoof NPC - this.npc = new EntityCustomNpc(Minecraft.getMinecraft().theWorld); - this.npc.display.name = "Linked NPC"; - this.npc.height = 1.62f; - this.npc.width = 0.43f; - + resetNPC(); if(tab == 0) LinkedGetAllPacket.GetNPCs(); else if(tab == 1) LinkedGetAllPacket.GetItems(); } + public void resetNPC(){ + this.npc = new EntityCustomNpc(Minecraft.getMinecraft().theWorld); + this.npc.display.name = "Linked NPC"; + this.npc.height = 1.62f; + this.npc.width = 0.43f; + } + @Override public void initGui(){ super.initGui(); @@ -243,11 +244,14 @@ public class GuiNPCManageLinked extends GuiNPCInterface2 implements IScrollData, } if(button.id == 10){ tab = 0; + resetNPC(); LinkedGetAllPacket.GetNPCs(); + scroll.setSelected(""); } if(button.id == 11){ tab = 1; LinkedGetAllPacket.GetItems(); + scroll.setSelected(""); } if(linkedItem == null)