diff options
author | minecraft7771 <maxim235@gmx.de> | 2022-10-22 12:48:20 +0200 |
---|---|---|
committer | minecraft7771 <maxim235@gmx.de> | 2022-10-22 12:48:20 +0200 |
commit | 52bcb2a77430e4e2750800debbfbb45ce2d7686c (patch) | |
tree | 4c4c4846406058cc9b8a39d9238180acc62637c0 /src | |
parent | b5711d85aae1b89e9979de5625a0a73a499b0920 (diff) | |
download | GT5-Unofficial-52bcb2a77430e4e2750800debbfbb45ce2d7686c.tar.gz GT5-Unofficial-52bcb2a77430e4e2750800debbfbb45ce2d7686c.tar.bz2 GT5-Unofficial-52bcb2a77430e4e2750800debbfbb45ce2d7686c.zip |
Use new API call instead of hack to prevent dropping of data sticks
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputDataItems.java | 13 |
1 files changed, 6 insertions, 7 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 6aae229159..c61d9d157e 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,13 +201,12 @@ public class GT_MetaTileEntity_Hatch_InputDataItems extends GT_MetaTileEntity_Ha @Override public ItemStack getStackInSlot(int aIndex) { - 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; + return stacks != null && aIndex < stacks.length ? stacks[aIndex] : null; + } + + @Override + public boolean shouldDropItemAt(int index) { + return false; } @Override |