use of com.codetaylor.mc.artisanworktables.modules.worktables.recipe.copy.IRecipeBuilderCopyStrategyInternal in project artisan-worktables by codetaylor.
the class RecipeAdditionQueue method onRegisterRecipesEvent.
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onRegisterRecipesEvent(RegistryEvent.Register<IRecipe> event) {
for (RecipeBuilderInternal builder : this.recipeBuilderWithCopyList) {
IRecipeBuilderCopyStrategyInternal recipeCopyStrategy = builder.getRecipeCopyStrategy();
if (recipeCopyStrategy != null) {
try {
recipeCopyStrategy.apply(builder, this.recipeBuilderList);
} catch (Exception e) {
ModuleWorktables.LOG.error("", e);
}
}
}
for (RecipeBuilderInternal builder : this.recipeBuilderList) {
try {
builder.apply(LOGGER);
} catch (RecipeBuilderException e) {
ModuleWorktables.LOG.error("", e);
}
}
this.recipeBuilderList.clear();
this.recipeBuilderWithCopyList.clear();
}
Aggregations