Allow for Disabling of Faction Tab

This commit is contained in:
Kam committed 2024-02-10 18:29:12 -05:00
1 parent 68ac475bbe
commit 8ec9a3dab8
2 files changed
+15 -6

No files matched your search

@@ -6,6 +6,7 @@ import net.minecraft.util.ResourceLocation;
import noppes.npcs.CustomItems;
import noppes.npcs.client.gui.util.GuiMenuSideButton;
import noppes.npcs.client.gui.util.GuiNPCInterface;
import noppes.npcs.config.ConfigClient;
import tconstruct.client.tabs.InventoryTabCustomNpc;
import tconstruct.client.tabs.TabRegistry;
@@ -39,12 +40,14 @@ public class GuiCNPCInventory extends GuiNPCInterface {
partyButton.active = activeTab == 1;
partyButton.renderStack = new ItemStack(CustomItems.bag);
addButton(partyButton);
GuiMenuSideButton factionButton = new GuiMenuSideButton(102, guiLeft + xSize + 37, this.guiTop + 3 + 21*2, 22, 22, "");
factionButton.rightSided = true;
factionButton.active = activeTab == 2;
factionButton.renderStack = new ItemStack(CustomItems.wallBanner);
addButton(factionButton);
if(ConfigClient.enableFactionTab){
GuiMenuSideButton factionButton = new GuiMenuSideButton(102, guiLeft + xSize + 37, this.guiTop + 3 + 21*2, 22, 22, "");
factionButton.rightSided = true;
factionButton.active = activeTab == 2;
factionButton.renderStack = new ItemStack(CustomItems.wallBanner);
addButton(factionButton);
}
}
@Override
@@ -24,6 +24,9 @@ public class ConfigClient
public static Property CacheLifeProperty;
public static int CacheLife = 10;
public static Property enableFactionTabProperty;
public static boolean enableFactionTab = true;
/**
* Visual Properties
**/
@@ -63,6 +66,9 @@ public class ConfigClient
CacheLifeProperty = config.get(GENERAL, "Cache Life", 10, "How long should downloaded imagery data be saved client side? (In minutes)");
CacheLife = CacheLifeProperty.getInt(10);
enableFactionTabProperty = config.get(GENERAL, "Enable Faction Tab", true, "Enable the Faction Tab");
enableFactionTab = enableFactionTabProperty.getBoolean(true);
// Visual
EnableChatBubblesProperty = config.get(VISUAL, "Enable Chat Bubbles", true, "Enable/Disable Chat Bubbles");
EnableChatBubbles = EnableChatBubblesProperty.getBoolean(true);