diff options
author | Raven Szewczyk <git@eigenraven.me> | 2024-05-30 18:26:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 19:26:10 +0200 |
commit | 337594e83a74c432c140b3df3287575b81bce467 (patch) | |
tree | abe57b3390d3dd037ea1442f83c4519ebcb9de07 /src/main/java/kubatech/api/implementations | |
parent | 752f262ccd545bdb785ef0e9ce922bf1117d23d6 (diff) | |
download | GT5-Unofficial-337594e83a74c432c140b3df3287575b81bce467.tar.gz GT5-Unofficial-337594e83a74c432c140b3df3287575b81bce467.tar.bz2 GT5-Unofficial-337594e83a74c432c140b3df3287575b81bce467.zip |
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 <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/kubatech/api/implementations')
-rw-r--r-- | src/main/java/kubatech/api/implementations/KubaTechGTMultiBlockBase.java | 6 |
1 files changed, 5 insertions, 1 deletions
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<T extends GT_MetaTileEntity_Exten return tryOutputAll(list, l -> Collections.singletonList((ItemStack) l)); } - protected boolean tryOutputAll(List<?> list, Function<Object, List<ItemStack>> mappingFunction) { + protected <Y> boolean tryOutputAll(List<Y> list, Function<Y, List<ItemStack>> mappingFunction) { if (list == null || list.isEmpty() || mappingFunction == null) return false; int emptySlots = 0; boolean ignoreEmptiness = false; @@ -224,6 +224,10 @@ public abstract class KubaTechGTMultiBlockBase<T extends GT_MetaTileEntity_Exten boolean wasSomethingRemoved = false; while (!list.isEmpty()) { List<ItemStack> 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); |