aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api/gui
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/gui
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/gui')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java13
1 files changed, 12 insertions, 1 deletions
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;
}