mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Fix #636
This commit is contained in:
@@ -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
|
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
|
--- a/src/main/java/net/minecraft/stats/ServerRecipeBook.java
|
||||||
+++ b/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 {
|
@@ -122,6 +122,7 @@ public class ServerRecipeBook extends RecipeBook {
|
||||||
ResourceLocation minecraftkey = new ResourceLocation(s);
|
|
||||||
Optional<? extends Recipe<?>> optional = recipeManager.byKey(minecraftkey);
|
Optional<? extends Recipe<?>> optional = recipeManager.byKey(minecraftkey);
|
||||||
|
|
||||||
- if (!optional.isPresent()) {
|
if (!optional.isPresent()) {
|
||||||
+ if (!optional.isPresent() && !net.pl3x.purpur.PurpurConfig.loggerSuppressUnrecognizedRecipeErrors) { // Purpur
|
+ if (!net.pl3x.purpur.PurpurConfig.loggerSuppressUnrecognizedRecipeErrors) // Purpur
|
||||||
ServerRecipeBook.LOGGER.error("Tried to load unrecognized recipe: {} removed now.", minecraftkey);
|
ServerRecipeBook.LOGGER.error("Tried to load unrecognized recipe: {} removed now.", minecraftkey);
|
||||||
} else {
|
} else {
|
||||||
handler.accept((Recipe) optional.get());
|
handler.accept((Recipe) optional.get());
|
||||||
|
|||||||
Reference in New Issue
Block a user