Inventory System

This commit is contained in:
Kam committed 2024-04-16 03:12:53 -04:00
1 parent 655fe13839
commit 1bb9ce2bb4
3 files changed
+9 -4

No files matched your search

@@ -5,6 +5,8 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.InputEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import kamkeel.addon.DBCAddon;
import kamkeel.addon.client.DBCClient;
import net.minecraft.client.Minecraft;
import net.minecraft.inventory.ContainerPlayer;
import net.minecraft.world.World;
@@ -105,6 +107,9 @@ public class ClientTickHandler{
case 3:
NoppesUtil.openGUI(mc.thePlayer, new GuiSettings());
break;
case 4:
NoppesUtil.openGUI(mc.thePlayer, DBCClient.Instance.inventoryGUI());
break;
}
}
else if(mc.currentScreen instanceof GuiQuestLog)
@@ -59,7 +59,7 @@ public class GuiCNPCInventory extends GuiNPCInterface {
if(Loader.isModLoaded("npcdbc")){
y += 21;
GuiMenuSideButton dbcButton = new GuiMenuSideButton(200, guiLeft + xSize + 37, this.guiTop + y, 22, 22, "");
GuiMenuSideButton dbcButton = new GuiMenuSideButton(104, guiLeft + xSize + 37, this.guiTop + y, 22, 22, "");
dbcButton.rightSided = true;
dbcButton.active = activeTab == 200;
dbcButton.renderIconPosX = 64;
@@ -95,8 +95,8 @@ public class GuiCNPCInventory extends GuiNPCInterface {
activeTab = 3;
mc.displayGuiScreen(new GuiSettings());
}
if (guibutton.id == 200 && activeTab != 200) {
activeTab = 200;
if (guibutton.id == 104 && activeTab != 4) {
activeTab = 4;
mc.displayGuiScreen(DBCClient.Instance.inventoryGUI());
}
}
@@ -42,7 +42,7 @@ public class InventoryTabCustomNpc extends AbstractTab {
case 3:
mc.displayGuiScreen(new GuiSettings());
break;
case 200:
case 4:
mc.displayGuiScreen(DBCClient.Instance.inventoryGUI());
break;
}