From 337594e83a74c432c140b3df3287575b81bce467 Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Thu, 30 May 2024 18:26:10 +0100 Subject: Complete backend rework of the EIG (#2616) * Complete backend rework of the EIG * Mergening Related Updates Also some loader references refactoring * fix (cherry picked from commit 7fd5d7417bddfb6e49ede3986d9a547f15b21289) * More Mergening fixes Updates the declaration of the stem mixin to match the new format. * Inline EIG IC2 bucket constants addresses: https://github.com/GTNewHorizons/GT5-Unofficial/pull/2616#discussion_r1620596497 * Fix Seed Removal in regular seed simulations Should address https://github.com/GTNewHorizons/GT5-Unofficial/pull/2616#discussion_r1620583338 --------- Co-authored-by: Guillaume Mercier <10gui-gui10@live.ca> Co-authored-by: Martin Robertz --- .../java/kubatech/api/implementations/KubaTechGTMultiBlockBase.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/kubatech/api/implementations') diff --git a/src/main/java/kubatech/api/implementations/KubaTechGTMultiBlockBase.java b/src/main/java/kubatech/api/implementations/KubaTechGTMultiBlockBase.java index bf74df9154..4451e3f401 100644 --- a/src/main/java/kubatech/api/implementations/KubaTechGTMultiBlockBase.java +++ b/src/main/java/kubatech/api/implementations/KubaTechGTMultiBlockBase.java @@ -208,7 +208,7 @@ public abstract class KubaTechGTMultiBlockBase Collections.singletonList((ItemStack) l)); } - protected boolean tryOutputAll(List list, Function> mappingFunction) { + protected boolean tryOutputAll(List list, Function> mappingFunction) { if (list == null || list.isEmpty() || mappingFunction == null) return false; int emptySlots = 0; boolean ignoreEmptiness = false; @@ -224,6 +224,10 @@ public abstract class KubaTechGTMultiBlockBase toOutputNow = mappingFunction.apply(list.get(0)); + if (toOutputNow == null) { + list.remove(0); + continue; + } if (!ignoreEmptiness && emptySlots < toOutputNow.size()) break; emptySlots -= toOutputNow.size(); list.remove(0); -- cgit