From c707fbd44889d02629b377667588959402bc6547 Mon Sep 17 00:00:00 2001 From: VoidLeech Date: Tue, 12 Dec 2023 19:53:57 +0100 Subject: [PATCH 1/2] Fix modded potion recipes using uncraftable potion in automated brewing --- .../create/content/fluids/potion/PotionMixingRecipes.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java b/src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java index 4d3230eba0..c33d8dc2ef 100644 --- a/src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java +++ b/src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java @@ -97,7 +97,11 @@ private static List createRecipes() { FluidStack outputFluid = null; for (ItemStack stack : supportedContainerStacks) { if (input.test(stack)) { - FluidStack inputFluid = PotionFluidHandler.getFluidFromPotionItem(stack); + ItemStack[] stacks = input.getItems(); + if (stacks.length == 0){ + continue; + } + FluidStack inputFluid = PotionFluidHandler.getFluidFromPotionItem(stacks[0]); if (outputFluid == null) { outputFluid = PotionFluidHandler.getFluidFromPotionItem(output); } From aa479c56fe526e8396e5e4051159f16973f0d397 Mon Sep 17 00:00:00 2001 From: VoidLeech Date: Tue, 12 Dec 2023 20:01:47 +0100 Subject: [PATCH 2/2] Make automated brewing of modded potions use the same fluid amount as vanilla recipes --- .../create/content/fluids/potion/PotionMixingRecipes.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java b/src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java index c33d8dc2ef..cc8f4f353b 100644 --- a/src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java +++ b/src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java @@ -102,9 +102,11 @@ private static List createRecipes() { continue; } FluidStack inputFluid = PotionFluidHandler.getFluidFromPotionItem(stacks[0]); + inputFluid.setAmount(1000); if (outputFluid == null) { outputFluid = PotionFluidHandler.getFluidFromPotionItem(output); } + outputFluid.setAmount(1000); mixingRecipes.add(createRecipe("potion_mixing_modded_" + recipeIndex++, ingredient, inputFluid, outputFluid)); } }