mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-14 01:14:07 +00:00
Made handler tab names customizable
Allow Recipe Handlers to have a different tab name than what's displayed on top of the UI.
This commit is contained in:
1 parent
7834d72ecf
commit
47951372cb
2 files changed
+12
-2
No files matched your search
@@ -130,7 +130,7 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
}
|
||||
|
||||
public void addTooltips(List<String> tooltip) {
|
||||
tooltip.add(handler.getRecipeName().trim());
|
||||
tooltip.add(handler.getRecipeTabName().trim());
|
||||
|
||||
String handlerMod = getHandlerMod(handlerName, handlerID);
|
||||
tooltip.add(EnumChatFormatting.BLUE + handlerMod);
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user