Merge pull request #1953 from ganymedes01/patch-1

Fixed NPE when calling canBrew
This commit is contained in:
LexManos 2015-06-18 11:51:48 -07:00
commit 40bc035d74

View file

@ -40,7 +40,7 @@ public class VanillaBrewingRecipe implements IBrewingRecipe {
@Override
public ItemStack getOutput(ItemStack input, ItemStack ingredient)
{
if (ingredient != null && input != null && input.getItem() instanceof ItemPotion)
if (ingredient != null && input != null && input.getItem() instanceof ItemPotion && isIngredient(ingredient))
{
int inputMeta = input.getMetadata();
int outputMeta = PotionHelper.applyIngredient(inputMeta, ingredient.getItem().getPotionEffect(ingredient));