Fixed a crash with The Spectator and the Helpful Villagers mod. Closes #420 (blaze it)

This commit is contained in:
Lizbeth Rika committed 2014-12-20 16:58:10 +00:00
1 parent 5bbc68ceda
commit f48ee2858b
1 file changed
+2 -2
@@ -150,9 +150,9 @@ public class ItemItemFinder extends ItemBauble implements IBaubleRender {
} else if(e instanceof EntityVillager) {
EntityVillager villager = (EntityVillager) e;
ArrayList<MerchantRecipe> recipes = villager.getRecipes(player);
if(pstack != null)
if(pstack != null && recipes != null)
for(MerchantRecipe recipe : recipes)
if(!recipe.isRecipeDisabled() && (equalStacks(pstack, recipe.getItemToBuy()) || equalStacks(pstack, recipe.getItemToSell())))
if(recipe != null && !recipe.isRecipeDisabled() && (equalStacks(pstack, recipe.getItemToBuy()) || equalStacks(pstack, recipe.getItemToSell())))
positionsBuilder.append(villager.getEntityId()).append(";");
} else if(e instanceof EntityLivingBase) {