Smart-Fallback & Alchemic Chemistry Set Fix (#935)

Co-authored-by: FFS <FFS@OhFuckOff>
Co-authored-by: slprime <[email protected]>
This commit is contained in:
authored and GitHub committed 2026-05-27 02:29:59 +03:00
1 parent 2e9ab88692
commit 31fff21a55
3 files changed
+253 -6

No files matched your search

@@ -77,9 +77,24 @@ public class RecipeHandlerRef {
return this.handler.getOverlayHandler(firstGui, this.recipeIndex);
}
if (firstGui != null && canUseSmartOverlay(firstGui)) {
return SmartOverlayHandler.INSTANCE;
}
return null;
}
private boolean canUseSmartOverlay(GuiContainer gui) {
if (!(this.handler instanceof TemplateRecipeHandler templateHandler)
|| templateHandler.getOverlayIdentifier() == null
|| templateHandler.getGuiClass() == null
|| !templateHandler.getGuiClass().isAssignableFrom(gui.getClass())) {
return false;
}
return SmartOverlayHandler.canHandle(gui, this.handler, this.recipeIndex);
}
public boolean canFillCraftingGrid(GuiContainer gui) {
final IOverlayHandler overlayHandler = getOverlayHandler(gui);