diff --git a/src/main/java/codechicken/nei/recipe/GuiRecipeTab.java b/src/main/java/codechicken/nei/recipe/GuiRecipeTab.java index 7f76f71c..f4ecb9b9 100644 --- a/src/main/java/codechicken/nei/recipe/GuiRecipeTab.java +++ b/src/main/java/codechicken/nei/recipe/GuiRecipeTab.java @@ -130,7 +130,7 @@ public abstract class GuiRecipeTab extends Widget { } public void addTooltips(List tooltip) { - tooltip.add(handler.getRecipeName().trim()); + tooltip.add(handler.getRecipeTabName().trim()); String handlerMod = getHandlerMod(handlerName, handlerID); tooltip.add(EnumChatFormatting.BLUE + handlerMod); diff --git a/src/main/java/codechicken/nei/recipe/IRecipeHandler.java b/src/main/java/codechicken/nei/recipe/IRecipeHandler.java index f35dd36e..c22d3e3a 100644 --- a/src/main/java/codechicken/nei/recipe/IRecipeHandler.java +++ b/src/main/java/codechicken/nei/recipe/IRecipeHandler.java @@ -29,7 +29,17 @@ public interface IRecipeHandler * @return The name of this inventory. * To be displayed at the top of the viewing container. */ - public String getRecipeName(); + + /** + * For legacy compatibility reasons, this method's default implementation returns the recipe name. This is also the expected behavior + * + * @return The name of this inventory. + * To be displayed in the tooltip in the tab at the top of the viewing container. + */ + default String getRecipeTabName() { + return getRecipeName(); + } + /** * * @return The number of recipes that this handler contains.