fix crash in AlloyMix.java (#141)

(cherry picked from commit 79228c1c7b)
This commit is contained in:
Ilya Yurchenko authored and Martin Robertz committed 2024-12-28 23:27:32 +01:00
1 parent a3dae07fb5
commit c72e172492
1 file changed
+8
@@ -24,7 +24,15 @@ public class AlloyMix {
ArrayList<Integer> effectiveAmount = new ArrayList<>();
for (FluidStack liquid : liquids) {
if (liquid == null) {
continue; // Skip this iteration if liquid is null
}
for (FluidStack mixer : copyMix) {
// Check if the mixer is null
if (mixer == null) {
continue; // Skip this iteration if mixer is null
}
if (mixer.isFluidEqual(liquid)) {
// do we actually have enough of that liquid?
if (liquid.amount < mixer.amount) break;