Remove unnecessary maxStackSize restrictions on brewing potions. (#4155)

This commit is contained in:
Kina 2017-07-10 03:12:20 +09:00 committed by LexManos
parent cd4d701b5f
commit bf014b1060
2 changed files with 2 additions and 7 deletions

View file

@ -36,11 +36,6 @@ public abstract class AbstractBrewingRecipe<T> 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

View file

@ -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)
{