Keep Recent Tab Open

This commit is contained in:
Kam committed 2024-03-03 05:49:06 -05:00
1 parent 6936e7d86e
commit 0983a8dba1
2 files changed
+14 -2

No files matched your search

@@ -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() {
@@ -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();