Added a null check for transitions

This commit is contained in:
Aidan C. Brady 2015-03-20 17:37:22 -05:00
parent 37bc6a07c0
commit 82c355cb86

View file

@ -242,6 +242,11 @@ public final class StackUtils
public static int hashItemStack(ItemStack stack)
{
if(stack == null)
{
return -1;
}
String name = stack.getItemDamage() == OreDictionary.WILDCARD_VALUE ? stack.getItem().getUnlocalizedName() : stack.getItem().getUnlocalizedName(stack);
return name.hashCode() << 8 | stack.getItemDamage();
}