aboutsummaryrefslogtreecommitdiff
path: root/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-09-22 12:20:12 +0800
committershedaniel <daniel@shedaniel.me>2020-09-22 12:20:12 +0800
commit72e44a1432f831bdbd42f1c8a574bf22e8b4a481 (patch)
tree42ce881152e2dab8f4378612c45226ea9b0a773a /RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java
parentb76420e3bd81886593587c295284b33e57b29cdf (diff)
downloadRoughlyEnoughItems-72e44a1432f831bdbd42f1c8a574bf22e8b4a481.tar.gz
RoughlyEnoughItems-72e44a1432f831bdbd42f1c8a574bf22e8b4a481.tar.bz2
RoughlyEnoughItems-72e44a1432f831bdbd42f1c8a574bf22e8b4a481.zip
Fix #409 and more
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java')
-rw-r--r--RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java
index f59746214..cc471494e 100644
--- a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java
+++ b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java
@@ -38,7 +38,6 @@ import me.shedaniel.rei.api.ConfigObject;
import me.shedaniel.rei.api.EntryStack;
import me.shedaniel.rei.api.fractions.Fraction;
import me.shedaniel.rei.api.widgets.Tooltip;
-import me.shedaniel.rei.utils.FormattingUtils;
import me.shedaniel.rei.utils.ImmutableLiteralText;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.MultiBufferSource;
@@ -290,15 +289,7 @@ public class ItemEntryStack extends AbstractEntryStack implements OptimalEntrySt
List<Component> toolTip = tryGetItemStackToolTip(true);
toolTip.addAll(get(Settings.TOOLTIP_APPEND_EXTRA).apply(this));
if (get(Settings.TOOLTIP_APPEND_MOD).get() && ConfigObject.getInstance().shouldAppendModNames()) {
- final String modId = ClientHelper.getInstance().getModFromItem(getItem());
- boolean alreadyHasMod = false;
- for (Component s : toolTip)
- if (FormattingUtils.stripFormatting(s.getString()).equalsIgnoreCase(modId)) {
- alreadyHasMod = true;
- break;
- }
- if (!alreadyHasMod)
- toolTip.add(ClientHelper.getInstance().getFormattedModFromItem(getItem()));
+ ClientHelper.getInstance().appendModIdToTooltips(toolTip, Registry.ITEM.getKey(getItem()).getNamespace());
}
return Tooltip.create(toolTip);
}