Skip to content

Commit

Permalink
Allow recipe categories to return the ModID or Mod Name for the tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Aug 17, 2017
1 parent e1a1524 commit b3c73f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/java/mezz/jei/api/recipe/IRecipeCategory.java
Expand Up @@ -35,7 +35,7 @@ public interface IRecipeCategory<T extends IRecipeWrapper> {
String getTitle();

/**
* Return the name of the mod associated with this recipe category.
* Return the mod name or id associated with this recipe category.
* Used for the recipe category tab's tooltip.
*
* @since JEI 4.5.0
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/mezz/jei/gui/recipes/RecipeCategoryTab.java
Expand Up @@ -9,6 +9,7 @@
import mezz.jei.api.recipe.IRecipeCategory;
import mezz.jei.config.Config;
import mezz.jei.ingredients.IngredientRegistry;
import mezz.jei.startup.ForgeModIdHelper;
import mezz.jei.util.LegacyUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
Expand Down Expand Up @@ -89,6 +90,7 @@ public List<String> getTooltip() {

String modName = LegacyUtil.getModName(category);
if (modName != null) {
modName = ForgeModIdHelper.getInstance().getModNameForModId(modName);
tooltip.add(Config.getModNameFormat() + modName);
}
return tooltip;
Expand Down

0 comments on commit b3c73f5

Please sign in to comment.