aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java')
-rw-r--r--src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java b/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java
index e4e3b5013..93515e8e9 100644
--- a/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java
+++ b/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java
@@ -134,15 +134,30 @@ public class FluidEntryStack extends AbstractEntryStack {
}
@Override
- public int hashCode() {
+ public int hashOfAll() {
+ int result = hashIgnoreAmountAndTags();
+ result = 31 * result + amount;
+ return result;
+ }
+
+ @Override
+ public int hashIgnoreAmountAndTags() {
int result = 1;
result = 31 * result + getType().ordinal();
result = 31 * result + fluid.hashCode();
- result = 31 * result + amount;
- result = 31 * result;
return result;
}
+ @Override
+ public int hashIgnoreTags() {
+ return hashOfAll();
+ }
+
+ @Override
+ public int hashIgnoreAmount() {
+ return hashIgnoreAmountAndTags();
+ }
+
@Nullable
@Override
public QueuedTooltip getTooltip(int mouseX, int mouseY) {