diff --git a/src/main/java/noppes/npcs/client/gui/player/inventory/GuiCNPCInventory.java b/src/main/java/noppes/npcs/client/gui/player/inventory/GuiCNPCInventory.java index d47d69780..9777cd999 100644 --- a/src/main/java/noppes/npcs/client/gui/player/inventory/GuiCNPCInventory.java +++ b/src/main/java/noppes/npcs/client/gui/player/inventory/GuiCNPCInventory.java @@ -12,7 +12,7 @@ import tconstruct.client.tabs.TabRegistry; public class GuiCNPCInventory extends GuiNPCInterface { private final ResourceLocation resource = new ResourceLocation("customnpcs","textures/gui/standardbg.png"); - protected static int activeTab = 0; + public static int activeTab = 0; private Minecraft mc = Minecraft.getMinecraft(); public GuiCNPCInventory() { diff --git a/src/main/java/tconstruct/client/tabs/InventoryTabCustomNpc.java b/src/main/java/tconstruct/client/tabs/InventoryTabCustomNpc.java index bdc1df795..d4ed35488 100644 --- a/src/main/java/tconstruct/client/tabs/InventoryTabCustomNpc.java +++ b/src/main/java/tconstruct/client/tabs/InventoryTabCustomNpc.java @@ -5,6 +5,8 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import noppes.npcs.CustomItems; import noppes.npcs.client.gui.player.inventory.GuiCNPCInventory; +import noppes.npcs.client.gui.player.inventory.GuiFaction; +import noppes.npcs.client.gui.player.inventory.GuiParty; import noppes.npcs.client.gui.player.inventory.GuiQuestLog; public class InventoryTabCustomNpc extends AbstractTab { @@ -31,7 +33,17 @@ public class InventoryTabCustomNpc extends AbstractTab { if(mc.currentScreen instanceof GuiCNPCInventory) return; - mc.displayGuiScreen(new GuiQuestLog(mc.thePlayer)); + switch (GuiCNPCInventory.activeTab){ + case 0: + mc.displayGuiScreen(new GuiQuestLog(mc.thePlayer)); + break; + case 1: + mc.displayGuiScreen(new GuiParty(mc.thePlayer)); + break; + case 2: + mc.displayGuiScreen(new GuiFaction()); + break; + } } }; t.start();