Inventory GUI Button DBC

This commit is contained in:
Kam committed 2024-04-16 03:04:03 -04:00
1 parent ddd0a948a0
commit 655fe13839
3 files changed
+26 -1

No files matched your search

@@ -6,6 +6,7 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import noppes.npcs.client.gui.mainmenu.GuiNpcStats;
import noppes.npcs.client.gui.model.GuiCreationScreen;
import noppes.npcs.client.gui.player.inventory.GuiCNPCInventory;
import noppes.npcs.client.gui.util.GuiNPCInterface2;
import noppes.npcs.client.gui.util.GuiNpcButton;
import noppes.npcs.client.model.ModelMPM;
@@ -29,11 +30,14 @@ public class DBCClient {
// Stat Buttons
public void showDBCStatButtons(GuiNpcStats stats, EntityLivingBase entity){}
public void showDBCStatActionPerformed(GuiNpcStats stats, GuiNpcButton btn){}
// Render Auras
public void renderDBCAuras(EntityNPCInterface npcInterface){}
// Manage Custom Forms
public GuiNPCInterface2 manageCustomForms(EntityNPCInterface npcInterface){ return null; }
// Inventory GUI
public GuiCNPCInventory inventoryGUI(){ return null; }
}
@@ -1,5 +1,7 @@
package noppes.npcs.client.gui.player.inventory;
import cpw.mods.fml.common.Loader;
import kamkeel.addon.client.DBCClient;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.util.ResourceLocation;
@@ -55,6 +57,16 @@ public class GuiCNPCInventory extends GuiNPCInterface {
addButton(factionButton);
}
if(Loader.isModLoaded("npcdbc")){
y += 21;
GuiMenuSideButton dbcButton = new GuiMenuSideButton(200, guiLeft + xSize + 37, this.guiTop + y, 22, 22, "");
dbcButton.rightSided = true;
dbcButton.active = activeTab == 200;
dbcButton.renderIconPosX = 64;
dbcButton.renderResource = specialIcons;
addButton(dbcButton);
}
y += 21;
GuiMenuSideButton clientButton = new GuiMenuSideButton(103, guiLeft + xSize + 37, this.guiTop + y, 22, 22, "");
clientButton.rightSided = true;
@@ -83,6 +95,10 @@ public class GuiCNPCInventory extends GuiNPCInterface {
activeTab = 3;
mc.displayGuiScreen(new GuiSettings());
}
if (guibutton.id == 200 && activeTab != 200) {
activeTab = 200;
mc.displayGuiScreen(DBCClient.Instance.inventoryGUI());
}
}
}
@@ -1,5 +1,7 @@
package tconstruct.client.tabs;
import kamkeel.addon.DBCAddon;
import kamkeel.addon.client.DBCClient;
import net.minecraft.client.Minecraft;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@@ -40,6 +42,9 @@ public class InventoryTabCustomNpc extends AbstractTab {
case 3:
mc.displayGuiScreen(new GuiSettings());
break;
case 200:
mc.displayGuiScreen(DBCClient.Instance.inventoryGUI());
break;
}
}
};