Skip to content

Commit

Permalink
Fix missing mod name on items with names that match the mod name
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Oct 10, 2016
1 parent e586090 commit d1b1703
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/mezz/jei/util/ModIdUtil.java
Expand Up @@ -55,10 +55,10 @@ public <T> String getModNameForIngredient(T ingredient, IIngredientHelper<T> ing

public <T> void addModNameToIngredientTooltip(List<String> tooltip, T ingredient, IIngredientHelper<T> ingredientHelper) {
String modName = getModNameForIngredient(ingredient, ingredientHelper);
if (!tooltip.isEmpty()) {
if (tooltip.size() > 1) {
String lastTooltipLine = tooltip.get(tooltip.size() - 1);
lastTooltipLine = TextFormatting.getTextWithoutFormattingCodes(lastTooltipLine);
if (lastTooltipLine != null && lastTooltipLine.equals(modName)) {
if (modName.equals(lastTooltipLine)) {
return;
}
}
Expand Down

0 comments on commit d1b1703

Please sign in to comment.