mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Added a null check for transitions
This commit is contained in:
1 parent
37bc6a07c0
commit
82c355cb86
1 file changed
+5
@@ -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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user