From 1b7fe4ad3cefa1b86c8a9678cf4b54704c95c301 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Sat, 28 Dec 2019 00:38:39 +0800 Subject: trying to optimise it --- src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java') diff --git a/src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java b/src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java index 3778cd5f0..2e6138cb2 100644 --- a/src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java +++ b/src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java @@ -116,17 +116,17 @@ public class ItemEntryStack extends AbstractEntryStack { @Override public int hashCode() { - if (hash == -1) { +// if (hash == -1) { int result = 1; - result = 31 * result + getType().ordinal(); + result = 31 * result + getType().hashCode(); result = 31 * result + itemStack.getItem().hashCode(); result = 31 * result + itemStack.getCount(); result = 31 * result + (itemStack.hasTag() ? itemStack.getTag().hashCode() : 0); hash = result; - if (hash == -1) { - hash = -2; - } - } +// if (hash == -1) { +// hash = -2; +// } +// } return hash; } -- cgit