Null check the ItemStack and its Item for RecipePureDaisy.isOreDict.

This commit is contained in:
Lizbeth Rika committed 2015-04-18 17:49:53 +01:00
1 parent 7c3704bd62
commit 2bc4c26c97
2 files changed
+4 -1

No files matched your search

@@ -1,4 +1,4 @@
@API(owner = "Botania", apiVersion = "41", provides = "BotaniaAPI")
@API(owner = "Botania", apiVersion = "42", provides = "BotaniaAPI")
package vazkii.botania.api;
import cpw.mods.fml.common.API;
@@ -46,6 +46,9 @@ public class RecipePureDaisy {
}
public boolean isOreDict(ItemStack stack, String entry) {
if(stack == null || stack.getItem() == null)
return false;
for(ItemStack ostack : OreDictionary.getOres(entry)) {
ItemStack cstack = ostack.copy();
if(cstack.getItemDamage() == Short.MAX_VALUE)