-
-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to supress unrecognized recipe errors
- Loading branch information
1 parent
b298361
commit 348846b
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
patches/server/0256-Add-option-to-supress-unrecognized-recipe-errors.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Ben Kerllenevich <ben@omega24.dev> | ||
Date: Sat, 28 Aug 2021 08:47:04 -0400 | ||
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 | ||
--- 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); | ||
Optional<? extends Recipe<?>> optional = recipeManager.byKey(minecraftkey); | ||
|
||
- if (!optional.isPresent()) { | ||
+ if (!optional.isPresent() && !net.pl3x.purpur.PurpurConfig.loggerSuppressUnrecognizedRecipeErrors) { // Purpur | ||
ServerRecipeBook.LOGGER.error("Tried to load unrecognized recipe: {} removed now.", minecraftkey); | ||
} else { | ||
handler.accept((Recipe) optional.get()); | ||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java | ||
index 07bdddf241df745f483a7318f5c08ac791958d05..54215cfbef7b5517151f02976be4a92b1c97b188 100644 | ||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java | ||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java | ||
@@ -486,9 +486,11 @@ public class PurpurConfig { | ||
|
||
public static boolean loggerSuppressInitLegacyMaterialError = false; | ||
public static boolean loggerSuppressIgnoredAdvancementWarnings = false; | ||
+ public static boolean loggerSuppressUnrecognizedRecipeErrors = false; | ||
private static void loggerSettings() { | ||
loggerSuppressInitLegacyMaterialError = getBoolean("settings.logger.suppress-init-legacy-material-errors", loggerSuppressInitLegacyMaterialError); | ||
loggerSuppressIgnoredAdvancementWarnings = getBoolean("settings.logger.suppress-ignored-advancement-warnings", loggerSuppressIgnoredAdvancementWarnings); | ||
+ loggerSuppressUnrecognizedRecipeErrors = getBoolean("settings.logger.suppress-unrecognized-recipe-errors", loggerSuppressUnrecognizedRecipeErrors); | ||
} | ||
|
||
public static boolean tpsCatchup = true; |