aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/gui/GT_Slot_Render.java
diff options
context:
space:
mode:
authorShawn Buckley <shawntbuckley@gmail.com>2015-10-18 23:04:39 -0400
committerShawn Buckley <shawntbuckley@gmail.com>2015-10-18 23:04:39 -0400
commit85c804fa112fd1f19c91e45d150a787cfbf0f7a8 (patch)
treecb302d8e0f46e06be0b1d391317578b165aec245 /src/main/java/gregtech/api/gui/GT_Slot_Render.java
parentce25063b910bb3bdd2b0c234b185fc4077caebdb (diff)
downloadGT5-Unofficial-85c804fa112fd1f19c91e45d150a787cfbf0f7a8.tar.gz
GT5-Unofficial-85c804fa112fd1f19c91e45d150a787cfbf0f7a8.tar.bz2
GT5-Unofficial-85c804fa112fd1f19c91e45d150a787cfbf0f7a8.zip
Move source directory
Diffstat (limited to 'src/main/java/gregtech/api/gui/GT_Slot_Render.java')
-rw-r--r--src/main/java/gregtech/api/gui/GT_Slot_Render.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/gui/GT_Slot_Render.java b/src/main/java/gregtech/api/gui/GT_Slot_Render.java
new file mode 100644
index 0000000000..15f4c339ae
--- /dev/null
+++ b/src/main/java/gregtech/api/gui/GT_Slot_Render.java
@@ -0,0 +1,22 @@
+package gregtech.api.gui;
+
+import net.minecraft.inventory.IInventory;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+
+public class GT_Slot_Render extends GT_Slot_Holo {
+ public GT_Slot_Render(IInventory par1iInventory, int par2, int par3, int par4) {
+ super(par1iInventory, par2, par3, par4, false, false, 0);
+ }
+
+ /**
+ * NEI has a nice and "useful" Delete-All Function, which would delete the Content of this Slot. This is here to prevent that.
+ */
+ @Override
+ public void putStack(ItemStack aStack) {
+ if (inventory instanceof TileEntity && ((TileEntity)inventory).getWorldObj().isRemote) {
+ inventory.setInventorySlotContents(getSlotIndex(), aStack);
+ }
+ onSlotChanged();
+ }
+} \ No newline at end of file