use of mezz.jei.api.runtime.IJeiRuntime in project minecolonies by Minecolonies.
the class JEIPlugin method onCustomRecipesReloaded.
private void onCustomRecipesReloaded(@NotNull final CustomRecipesReloadedEvent event) {
// the usual place once we know that happened).
if (weakRuntime != null && !recipesLoaded && !categories.isEmpty()) {
final IJeiRuntime runtime = weakRuntime.get();
if (runtime != null) {
final IRecipeManager jeiManager = runtime.getRecipeManager();
populateRecipes(buildVanillaRecipesMap(), (list, uid) -> {
for (final Object recipe : list) {
// noinspection deprecation
jeiManager.addRecipe(recipe, uid);
}
});
}
}
recipesLoaded = true;
}
use of mezz.jei.api.runtime.IJeiRuntime in project minecolonies by ldtteam.
the class JEIPlugin method onCustomRecipesReloaded.
private void onCustomRecipesReloaded(@NotNull final CustomRecipesReloadedEvent event) {
// the usual place once we know that happened).
if (weakRuntime != null && !recipesLoaded && !categories.isEmpty()) {
final IJeiRuntime runtime = weakRuntime.get();
if (runtime != null) {
final IRecipeManager jeiManager = runtime.getRecipeManager();
populateRecipes(buildVanillaRecipesMap(), (list, uid) -> {
for (final Object recipe : list) {
// noinspection deprecation
jeiManager.addRecipe(recipe, uid);
}
});
}
}
recipesLoaded = true;
}
Aggregations