Skip to content

Commit

Permalink
add exception handling for recipe manager mixin entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
rlnt committed Aug 26, 2024
1 parent a4036db commit bc81f24
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ public class RecipeManagerMixin {

@Inject(method = "apply(Ljava/util/Map;Lnet/minecraft/server/packs/resources/ResourceManager;Lnet/minecraft/util/profiling/ProfilerFiller;)V", at = @At("HEAD"))
private void almostunified$onRecipeReload(Map<ResourceLocation, JsonElement> recipes, ResourceManager resourceManager, ProfilerFiller profiler, CallbackInfo ci) {
AlmostUnifiedCommon.onRecipeManagerReload(recipes, registries);
try {
AlmostUnifiedCommon.onRecipeManagerReload(recipes, registries);
} catch (Exception e) {
AlmostUnifiedCommon.LOGGER.error(e.getMessage(), e);
}
}

@Inject(method = "apply(Ljava/util/Map;Lnet/minecraft/server/packs/resources/ResourceManager;Lnet/minecraft/util/profiling/ProfilerFiller;)V", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;error(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V"), remap = false)
Expand Down

0 comments on commit bc81f24

Please sign in to comment.