diff options
author | Blood-Asp <bloodasphendrik@gmail.com> | 2016-10-30 22:39:40 +0100 |
---|---|---|
committer | Blood-Asp <bloodasphendrik@gmail.com> | 2016-10-30 22:39:40 +0100 |
commit | 814dc25690a60faaaeab710d0dad40fb4386b849 (patch) | |
tree | dc16a1911f585900367c35a623f9ad02e7e072fa /src/main/java/gregtech/common/GT_Proxy.java | |
parent | ed724da44d7783705cb8fd503b3f4623b1cf1b86 (diff) | |
download | GT5-Unofficial-814dc25690a60faaaeab710d0dad40fb4386b849.tar.gz GT5-Unofficial-814dc25690a60faaaeab710d0dad40fb4386b849.tar.bz2 GT5-Unofficial-814dc25690a60faaaeab710d0dad40fb4386b849.zip |
Modular Armor changes 1
Diffstat (limited to 'src/main/java/gregtech/common/GT_Proxy.java')
-rw-r--r-- | src/main/java/gregtech/common/GT_Proxy.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 00ee739ef1..01b8b3c3b2 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -29,6 +29,11 @@ import gregtech.api.util.*; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.items.GT_MetaGenerated_Tool_01; import gregtech.common.items.armor.*; +import gregtech.common.items.armor.gui.ContainerBasicArmor; +import gregtech.common.items.armor.gui.ContainerElectricArmor1; +import gregtech.common.items.armor.gui.GuiElectricArmor1; +import gregtech.common.items.armor.gui.GuiModularArmor; +import gregtech.common.items.armor.gui.InventoryArmor; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; @@ -1315,6 +1320,20 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { return getRightItem(aPlayer, ID); } } + if(aID>=100){ + int tSlot = aID / 100; + int ID = aID%100; + switch(ID){ + case 0: + return new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))); + case 1: + return new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))); + case 2: + return new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))); + default: + return getRightItem(aPlayer, ID); + } + } TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof IGregTechTileEntity)) { IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); @@ -1355,6 +1374,20 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { return getRightItemGui(aPlayer, ID); } } + if(aID>=100){ + int tSlot = aID / 100; + int ID = aID%100; + switch(ID){ + case 0: + return new GuiModularArmor(new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))), aPlayer); + case 1: + return new GuiElectricArmor1(new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))), aPlayer); + case 2: + return new GuiElectricArmor1(new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))), aPlayer); + default: + return getRightItem(aPlayer, ID); + } + } TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof IGregTechTileEntity)) { IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); |