mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Null check the ItemStack and its Item for RecipePureDaisy.isOreDict.
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user