diff --git a/src/main/java/com/simibubi/create/content/processing/basin/BasinRecipe.java b/src/main/java/com/simibubi/create/content/processing/basin/BasinRecipe.java index 3bb782715..0cf479e12 100644 --- a/src/main/java/com/simibubi/create/content/processing/basin/BasinRecipe.java +++ b/src/main/java/com/simibubi/create/content/processing/basin/BasinRecipe.java @@ -22,6 +22,8 @@ import com.simibubi.create.foundation.recipe.IRecipeTypeInfo; import com.simibubi.create.foundation.utility.Iterate; import net.minecraft.client.Minecraft; +import net.minecraft.world.Container; +import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.CraftingRecipe; import net.minecraft.world.item.crafting.Ingredient; @@ -32,7 +34,7 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.items.IItemHandler; -public class BasinRecipe extends ProcessingRecipe { +public class BasinRecipe extends ProcessingRecipe { public static boolean match(BasinBlockEntity basin, Recipe recipe) { FilteringBehaviour filter = basin.getFilter(); @@ -148,23 +150,24 @@ public class BasinRecipe extends ProcessingRecipe { } if (simulate) { + CraftingContainer remainderContainer = new DummyCraftingContainer(availableItems, extractedItemsFromSlot); + if (recipe instanceof BasinRecipe basinRecipe) { recipeOutputItems.addAll(basinRecipe.rollResults()); - + for (FluidStack fluidStack : basinRecipe.getFluidResults()) if (!fluidStack.isEmpty()) recipeOutputFluids.add(fluidStack); - for (ItemStack stack : basinRecipe.getRemainingItems(basin.getInputInventory())) + for (ItemStack stack : basinRecipe.getRemainingItems(remainderContainer)) if (!stack.isEmpty()) recipeOutputItems.add(stack); - + } else { recipeOutputItems.add(recipe.getResultItem(basin.getLevel() .registryAccess())); if (recipe instanceof CraftingRecipe craftingRecipe) { - for (ItemStack stack : craftingRecipe - .getRemainingItems(new DummyCraftingContainer(availableItems, extractedItemsFromSlot))) + for (ItemStack stack : craftingRecipe.getRemainingItems(remainderContainer)) if (!stack.isEmpty()) recipeOutputItems.add(stack); } @@ -225,7 +228,7 @@ public class BasinRecipe extends ProcessingRecipe { } @Override - public boolean matches(SmartInventory inv, @Nonnull Level worldIn) { + public boolean matches(Container inv, @Nonnull Level worldIn) { return false; }