Turns out the itemid can change on world load.

Use the unlocalised name instead as this should be constant. Anyone using the stack size in the unlocalized name method should be shot.
This commit is contained in:
Ben Spiers 2014-09-05 04:22:04 +01:00
parent c7a429177b
commit 573b60de04

View file

@ -242,6 +242,6 @@ public final class StackUtils
public static int hashItemStack(ItemStack stack)
{
return Item.getIdFromItem(stack.getItem()) << 8 | stack.getItemDamage();
return stack.getItem().getUnlocalizedName(stack).hashCode() << 8 | stack.getItemDamage();
}
}