aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2022-09-04 13:41:33 +0200
committerGitHub <noreply@github.com>2022-09-04 13:41:33 +0200
commit335b5b72801872f660cba04121065e1f49b5f18c (patch)
treef25f7b74e67c88011bdf3eda9d1cdb9e99802b2a /src/main/java/com
parent0a5b94f10f951b642eddeda661bbb3b9f3d56020 (diff)
parent9eb28fde4cd5b7863c6c6970bccf5f3be3ee0cc7 (diff)
downloadGT5-Unofficial-335b5b72801872f660cba04121065e1f49b5f18c.tar.gz
GT5-Unofficial-335b5b72801872f660cba04121065e1f49b5f18c.tar.bz2
GT5-Unofficial-335b5b72801872f660cba04121065e1f49b5f18c.zip
Merge pull request #94 from minecraft7771/AssemblyLineDataConnectorFix
Fix Assembly Line Slave Connector dropping all Data Sticks
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputDataItems.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputDataItems.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputDataItems.java
index fd6a72088f..6aae229159 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputDataItems.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputDataItems.java
@@ -201,7 +201,13 @@ public class GT_MetaTileEntity_Hatch_InputDataItems extends GT_MetaTileEntity_Ha
@Override
public ItemStack getStackInSlot(int aIndex) {
- return stacks != null && aIndex < stacks.length ? stacks[aIndex] : null;
+ if (stacks == null || aIndex >= stacks.length) {
+ return null;
+ }
+ // We return a stack with size 0 to prevent dropping when the hatch is broken
+ ItemStack stackCopy = stacks[aIndex].copy();
+ stackCopy.stackSize = 0;
+ return stackCopy;
}
@Override