aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2018-05-17 03:22:34 +1000
committerJordan Byrne <draknyte1@hotmail.com>2018-05-17 03:22:34 +1000
commit92494e56c33fc029f6b06be1c76e50bb5be56cbe (patch)
treeb7b9aa2213c4f4dca149289efe71ad018e9b4b11 /src/Java/gtPlusPlus/xmod/gregtech/api
parent6a807650f8b57b4f94502d736249bda47e1117e3 (diff)
downloadGT5-Unofficial-92494e56c33fc029f6b06be1c76e50bb5be56cbe.tar.gz
GT5-Unofficial-92494e56c33fc029f6b06be1c76e50bb5be56cbe.tar.bz2
GT5-Unofficial-92494e56c33fc029f6b06be1c76e50bb5be56cbe.zip
+ Added a Large Storage Shelf.
$ Fixed shelves using wrong overlay.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java13
2 files changed, 14 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index b137e93454..b402f19ced 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -243,6 +243,7 @@ public enum GregtechItemList implements GregtechItemContainer {
//GT4 Shelves
GT4_Shelf, GT4_Shelf_Iron, GT4_Shelf_FileCabinet, GT4_Shelf_Desk, GT4_Shelf_Compartment,
+ GT4_Shelf_Large,
//Hi Amp Transformers
@@ -332,7 +333,7 @@ public enum GregtechItemList implements GregtechItemContainer {
Machine_Adv_ImplosionCompressor,
//Advanced Vacuum Freezer
Industrial_Cryogenic_Freezer, Casing_AdvancedVacuum,
- FusionComputer_UV2
+ FusionComputer_UV2,
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java
index 3d63f43b5c..52c21dc4b0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java
@@ -14,7 +14,9 @@ import gregtech.api.gui.GT_Slot_Output;
import gregtech.api.gui.GT_Slot_Render;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest;
+import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Large;
public class CONTAINER_SuperChest extends GT_ContainerMetaTile_Machine {
public int mContent = 0;
@@ -32,9 +34,18 @@ public class CONTAINER_SuperChest extends GT_ContainerMetaTile_Machine {
public void detectAndSendChanges() {
super.detectAndSendChanges();
if (!this.mTileEntity.isClientSide() && this.mTileEntity.getMetaTileEntity() != null) {
+
if (this.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_TieredChest) {
this.mContent = ((GT_MetaTileEntity_TieredChest) this.mTileEntity.getMetaTileEntity()).mItemCount;
- } else {
+ }
+
+ else if (ReflectionUtils.getField(this.mTileEntity, "mItemCount") != null) {
+ this.mContent = ReflectionUtils.getField(this.mTileEntity, "mItemCount");
+ }
+ else if (this.mTileEntity.getMetaTileEntity() instanceof GT4Entity_Shelf_Large) {
+ this.mContent = ((GT4Entity_Shelf_Large) this.mTileEntity.getMetaTileEntity()).mItemCount;
+ }
+ else {
this.mContent = 0;
}