From c72e1724924dde34e1e4e6ca9323bacc1a465106 Mon Sep 17 00:00:00 2001 From: Ilya Yurchenko Date: Fri, 27 Dec 2024 21:18:01 +0300 Subject: [PATCH] fix crash in AlloyMix.java (#141) (cherry picked from commit 79228c1c7b1a9a84b72e8845301016912c56d46a) --- src/main/java/tconstruct/library/crafting/AlloyMix.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/tconstruct/library/crafting/AlloyMix.java b/src/main/java/tconstruct/library/crafting/AlloyMix.java index 2bcb2d5cf9..542ba0466c 100644 --- a/src/main/java/tconstruct/library/crafting/AlloyMix.java +++ b/src/main/java/tconstruct/library/crafting/AlloyMix.java @@ -24,7 +24,15 @@ public FluidStack mix(List liquids) { ArrayList 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;