mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
35 lines
2.2 KiB
Diff
35 lines
2.2 KiB
Diff
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..461796c9c559f43bd2e0126b12a46bfc41c830a5 100644
|
|
--- a/src/main/java/net/minecraft/stats/ServerRecipeBook.java
|
|
+++ b/src/main/java/net/minecraft/stats/ServerRecipeBook.java
|
|
@@ -122,6 +122,7 @@ public class ServerRecipeBook extends RecipeBook {
|
|
Optional<? extends Recipe<?>> optional = recipeManager.byKey(minecraftkey);
|
|
|
|
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());
|
|
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;
|