use of gregtech.integration.jei.multiblock.MultiblockInfoRecipeWrapper in project GregTech by GregTechCEu.
the class JEIOptional method getWorldSceneRenderer.
@Optional.Method(modid = "jei")
public static WorldSceneRenderer getWorldSceneRenderer(MultiblockControllerBase controllerBase) {
IRecipeRegistry rr = GTJeiPlugin.jeiRuntime.getRecipeRegistry();
IFocus<ItemStack> focus = rr.createFocus(IFocus.Mode.INPUT, controllerBase.getStackForm());
return rr.getRecipeCategories(focus).stream().map(c -> (IRecipeCategory<IRecipeWrapper>) c).map(c -> rr.getRecipeWrappers(c, focus)).flatMap(List::stream).filter(MultiblockInfoRecipeWrapper.class::isInstance).findFirst().map(MultiblockInfoRecipeWrapper.class::cast).map(MultiblockInfoRecipeWrapper::getCurrentRenderer).orElse(null);
}
Aggregations