From 573b60de04dd88560664dd9d3740a5d021aaeacb Mon Sep 17 00:00:00 2001 From: Ben Spiers Date: Fri, 5 Sep 2014 04:22:04 +0100 Subject: [PATCH] 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. --- src/main/java/mekanism/api/util/StackUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/mekanism/api/util/StackUtils.java b/src/main/java/mekanism/api/util/StackUtils.java index 069bfc187..a215038a1 100644 --- a/src/main/java/mekanism/api/util/StackUtils.java +++ b/src/main/java/mekanism/api/util/StackUtils.java @@ -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(); } }