Added couple of useful events (#149)

* Added some useful events
* 2.1.8
This commit is contained in:
Andrey authored and GitHub committed 2021-08-13 12:49:00 -07:00
1 parent 8b073543b3
commit f8d492e5f5
6 files changed
+52 -6

No files matched your search

+1 -3
View File
@@ -299,16 +299,14 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
setRecipePage(--recipetype);
}
public HandlerInfo getHandlerInfo(IRecipeHandler handler) {
final String handlerName = handler.toString().split("@")[0];
final String handlerID;
if(handler instanceof TemplateRecipeHandler) {
handlerID = (((TemplateRecipeHandler)handler).getOverlayIdentifier());
} else {
handlerID = null;
}
HandlerInfo info = GuiRecipeTab.getHandlerInfo(handlerName, handlerID);
HandlerInfo info = GuiRecipeTab.getHandlerInfo(handler.getClass().getName(), handlerID);
if (info == null)
return GuiRecipeTab.DEFAULT_HANDLER_INFO;