From 28c587dac0c205d746a3a55feff7ac9572b74f19 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Mon, 30 Aug 2021 20:17:58 -0500 Subject: [PATCH] Fix #636 --- ...dd-option-to-supress-unrecognized-recipe-errors.patch | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/patches/server/0255-Add-option-to-supress-unrecognized-recipe-errors.patch b/patches/server/0255-Add-option-to-supress-unrecognized-recipe-errors.patch index e3e1453111..80a6247755 100644 --- a/patches/server/0255-Add-option-to-supress-unrecognized-recipe-errors.patch +++ b/patches/server/0255-Add-option-to-supress-unrecognized-recipe-errors.patch @@ -5,15 +5,14 @@ Subject: [PATCH] Add option to supress unrecognized recipe errors diff --git a/src/main/java/net/minecraft/stats/ServerRecipeBook.java b/src/main/java/net/minecraft/stats/ServerRecipeBook.java -index 63a4fa2408edf84b490ca39e824977135d78eff0..ca9fbc35b6c43b771116ed8607397f22456975dd 100644 +index 63a4fa2408edf84b490ca39e824977135d78eff0..461796c9c559f43bd2e0126b12a46bfc41c830a5 100644 --- a/src/main/java/net/minecraft/stats/ServerRecipeBook.java +++ b/src/main/java/net/minecraft/stats/ServerRecipeBook.java -@@ -121,7 +121,7 @@ public class ServerRecipeBook extends RecipeBook { - ResourceLocation minecraftkey = new ResourceLocation(s); +@@ -122,6 +122,7 @@ public class ServerRecipeBook extends RecipeBook { Optional> optional = recipeManager.byKey(minecraftkey); -- if (!optional.isPresent()) { -+ if (!optional.isPresent() && !net.pl3x.purpur.PurpurConfig.loggerSuppressUnrecognizedRecipeErrors) { // Purpur + if (!optional.isPresent()) { ++ if (!net.pl3x.purpur.PurpurConfig.loggerSuppressUnrecognizedRecipeErrors) // Purpur ServerRecipeBook.LOGGER.error("Tried to load unrecognized recipe: {} removed now.", minecraftkey); } else { handler.accept((Recipe) optional.get());