From bf014b1060cc9eb5bd4d8ffd93d4224ff1dc405e Mon Sep 17 00:00:00 2001 From: Kina Date: Mon, 10 Jul 2017 03:12:20 +0900 Subject: [PATCH] Remove unnecessary maxStackSize restrictions on brewing potions. (#4155) --- .../minecraftforge/common/brewing/AbstractBrewingRecipe.java | 5 ----- .../minecraftforge/common/brewing/BrewingRecipeRegistry.java | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/minecraftforge/common/brewing/AbstractBrewingRecipe.java b/src/main/java/net/minecraftforge/common/brewing/AbstractBrewingRecipe.java index 2a96a272a..eaab7acae 100644 --- a/src/main/java/net/minecraftforge/common/brewing/AbstractBrewingRecipe.java +++ b/src/main/java/net/minecraftforge/common/brewing/AbstractBrewingRecipe.java @@ -36,11 +36,6 @@ public abstract class AbstractBrewingRecipe implements IBrewingRecipe this.input = input; this.ingredient = ingredient; this.output = output; - - if (this.getInput().getMaxStackSize() != 1) - { - throw new IllegalArgumentException("Inputs must have a max size of 1 just like water bottles. Brewing Stands override the input with the output when the brewing is done, items that stack would end up getting lost."); - } } @Override diff --git a/src/main/java/net/minecraftforge/common/brewing/BrewingRecipeRegistry.java b/src/main/java/net/minecraftforge/common/brewing/BrewingRecipeRegistry.java index d85560751..ccce0d77e 100644 --- a/src/main/java/net/minecraftforge/common/brewing/BrewingRecipeRegistry.java +++ b/src/main/java/net/minecraftforge/common/brewing/BrewingRecipeRegistry.java @@ -90,7 +90,7 @@ public class BrewingRecipeRegistry { @Nonnull public static ItemStack getOutput(@Nonnull ItemStack input, @Nonnull ItemStack ingredient) { - if (input.isEmpty() || input.getMaxStackSize() != 1 || input.getCount() != 1) return ItemStack.EMPTY; + if (input.isEmpty() || input.getCount() != 1) return ItemStack.EMPTY; if (ingredient.isEmpty()) return ItemStack.EMPTY; for (IBrewingRecipe recipe : recipes) @@ -172,7 +172,7 @@ public class BrewingRecipeRegistry { */ public static boolean isValidInput(@Nonnull ItemStack stack) { - if (stack.getMaxStackSize() != 1 || stack.getCount() != 1) return false; + if (stack.getCount() != 1) return false; for (IBrewingRecipe recipe : recipes) {