Merge pull request #1953 from ganymedes01/patch-1
Fixed NPE when calling canBrew
This commit is contained in:
commit
40bc035d74
1 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ public class VanillaBrewingRecipe implements IBrewingRecipe {
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getOutput(ItemStack input, ItemStack ingredient)
|
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 inputMeta = input.getMetadata();
|
||||||
int outputMeta = PotionHelper.applyIngredient(inputMeta, ingredient.getItem().getPotionEffect(ingredient));
|
int outputMeta = PotionHelper.applyIngredient(inputMeta, ingredient.getItem().getPotionEffect(ingredient));
|
||||||
|
|
Loading…
Reference in a new issue