Added a null check for transitions
This commit is contained in:
parent
37bc6a07c0
commit
82c355cb86
1 changed files with 5 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue