From bcb365baa900bd14a5f9176a912ddfee66da62e4 Mon Sep 17 00:00:00 2001 From: PepperBell <44146161+PepperCode1@users.noreply.github.com> Date: Wed, 26 May 2021 20:54:17 -0700 Subject: [PATCH] Fix processing for fireproof items with recipes - Check for smelting and blasting recipes before checking for fireproof-ness --- .../processing/InWorldProcessing.java | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/InWorldProcessing.java b/src/main/java/com/simibubi/create/content/contraptions/processing/InWorldProcessing.java index 0858c17ed..b433755f1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/InWorldProcessing.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/InWorldProcessing.java @@ -94,8 +94,23 @@ public class InWorldProcessing { } private static boolean canProcess(ItemStack stack, Type type, World world) { - if (type == Type.BLASTING) + if (type == Type.BLASTING) { + WRAPPER.setInventorySlotContents(0, stack); + Optional smeltingRecipe = world.getRecipeManager() + .getRecipe(IRecipeType.SMELTING, WRAPPER, world); + + if (smeltingRecipe.isPresent()) + return true; + + WRAPPER.setInventorySlotContents(0, stack); + Optional blastingRecipe = world.getRecipeManager() + .getRecipe(IRecipeType.BLASTING, WRAPPER, world); + + if (blastingRecipe.isPresent()) + return true; + return !stack.getItem().isFireproof(); + } if (type == Type.SMOKING) { WRAPPER.setInventorySlotContents(0, stack); @@ -178,11 +193,11 @@ public class InWorldProcessing { .getRecipe(IRecipeType.SMOKING, WRAPPER, world); if (type == Type.BLASTING) { - WRAPPER.setInventorySlotContents(0, stack); - Optional smeltingRecipe = world.getRecipeManager() - .getRecipe(IRecipeType.SMELTING, WRAPPER, world); - if (!smokingRecipe.isPresent()) { + WRAPPER.setInventorySlotContents(0, stack); + Optional smeltingRecipe = world.getRecipeManager() + .getRecipe(IRecipeType.SMELTING, WRAPPER, world); + if (smeltingRecipe.isPresent()) return applyRecipeOn(stack, smeltingRecipe.get());