From 52bcb2a77430e4e2750800debbfbb45ce2d7686c Mon Sep 17 00:00:00 2001 From: minecraft7771 Date: Sat, 22 Oct 2022 12:48:20 +0200 Subject: Use new API call instead of hack to prevent dropping of data sticks --- dependencies.gradle | 2 +- .../hatch/GT_MetaTileEntity_Hatch_InputDataItems.java | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index 0b780e1e71..5aa0a4bbd4 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -2,7 +2,7 @@ dependencies { shadowImplementation('com.github.GTNewHorizons:AVRcore:master-SNAPSHOT') - compile('com.github.GTNewHorizons:GT5-Unofficial:5.09.41.66:dev') + compile('com.github.GTNewHorizons:GT5-Unofficial:5.09.41.91-pre:dev') compile('com.github.GTNewHorizons:Yamcl:0.5.84:dev') compile('com.github.GTNewHorizons:NotEnoughItems:2.3.7-GTNH:dev') compile('com.github.GTNewHorizons:CodeChickenLib:1.1.5.5:dev') 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 -- cgit