diff options
| author | shedaniel <daniel@shedaniel.me> | 2019-11-15 20:09:15 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2019-11-15 20:09:15 +0800 |
| commit | b7246fa0016888fd52c45f9c77df46f9d791e326 (patch) | |
| tree | ca455d73ea2213ef6e5a62855834119715a13fe2 /src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java | |
| parent | 5c34cd8dae4879e04fd825f423e0ddbf8480668e (diff) | |
| download | RoughlyEnoughItems-b7246fa0016888fd52c45f9c77df46f9d791e326.tar.gz RoughlyEnoughItems-b7246fa0016888fd52c45f9c77df46f9d791e326.tar.bz2 RoughlyEnoughItems-b7246fa0016888fd52c45f9c77df46f9d791e326.zip | |
Using more of the API instead of the Impl
Diffstat (limited to 'src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java b/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java index a071485da..a6f65e1b3 100644 --- a/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java +++ b/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java @@ -7,8 +7,8 @@ package me.shedaniel.rei.impl; import com.google.common.collect.Lists; import me.shedaniel.math.api.Rectangle; -import me.shedaniel.rei.RoughlyEnoughItemsCore; import me.shedaniel.rei.api.ClientHelper; +import me.shedaniel.rei.api.ConfigManager; import me.shedaniel.rei.api.EntryStack; import me.shedaniel.rei.gui.widget.EntryListWidget; import me.shedaniel.rei.gui.widget.QueuedTooltip; @@ -137,6 +137,16 @@ public class FluidEntryStack extends AbstractEntryStack { return fluid == stack.getFluid() && amount == stack.getAmount(); } + @Override + public int hashCode() { + int result = 1; + result = 31 * result + getType().ordinal(); + result = 31 * result + fluid.hashCode(); + result = 31 * result + amount; + result = 31 * result; + return result; + } + @Nullable @Override public QueuedTooltip getTooltip(int mouseX, int mouseY) { @@ -148,7 +158,7 @@ public class FluidEntryStack extends AbstractEntryStack { if (amountTooltip != null) for (String s : amountTooltip.split("\n")) toolTip.add(s); } toolTip.addAll(getSetting(Settings.TOOLTIP_APPEND_EXTRA).value().apply(this)); - if (getSetting(Settings.TOOLTIP_APPEND_MOD).value().get() && RoughlyEnoughItemsCore.getConfigManager().getConfig().shouldAppendModNames()) { + if (getSetting(Settings.TOOLTIP_APPEND_MOD).value().get() && ConfigManager.getInstance().getConfig().shouldAppendModNames()) { final String modString = ClientHelper.getInstance().getFormattedModFromIdentifier(Registry.FLUID.getId(fluid)); boolean alreadyHasMod = false; for (String s : toolTip) |
