aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorGlease <4586901+Glease@users.noreply.github.com>2023-10-17 01:13:52 +0800
committerGitHub <noreply@github.com>2023-10-16 19:13:52 +0200
commit4dde7d67a5851c5e30933cf21fca7b4aaefb6d6c (patch)
tree8343de20ff355abbcfc2f67760d651b52ed2909f /src/main
parent2c390d95df07fada5782e9e8b9240f5160e115cb (diff)
downloadGT5-Unofficial-4dde7d67a5851c5e30933cf21fca7b4aaefb6d6c.tar.gz
GT5-Unofficial-4dde7d67a5851c5e30933cf21fca7b4aaefb6d6c.tar.bz2
GT5-Unofficial-4dde7d67a5851c5e30933cf21fca7b4aaefb6d6c.zip
fix linked input bus dropping item when there are still one bus on same freq (#20)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/net/glease/ggfab/mte/MTE_LinkedInputBus.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/net/glease/ggfab/mte/MTE_LinkedInputBus.java b/src/main/java/net/glease/ggfab/mte/MTE_LinkedInputBus.java
index c193842f1d..36bafdf8e6 100644
--- a/src/main/java/net/glease/ggfab/mte/MTE_LinkedInputBus.java
+++ b/src/main/java/net/glease/ggfab/mte/MTE_LinkedInputBus.java
@@ -271,7 +271,9 @@ public class MTE_LinkedInputBus extends GT_MetaTileEntity_Hatch_InputBus {
@Override
public boolean shouldDropItemAt(int index) {
- return mRealInventory != null && mRealInventory.ref <= 1;
+ // NOTE by this time onBlockDestroyed has already been called, i.e. so ref has already been decremented.
+ // so we really should check for ref <= 0 instead of ref <= 1
+ return mRealInventory != null && mRealInventory.ref <= 0;
}
@Override