Skip to content

Commit

Permalink
[ci-skip] Combine logger suppression patches
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyGalbreath committed Aug 31, 2021
1 parent 28c587d commit 2b4f3af
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,34 @@ index 7d6dc0a8ee35274052b122bbc446bc54750de0a6..c46df052a5a39d92688f51377ee1f7b5
PlayerAdvancements.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.file);
}
// CraftBukkit end
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 20f57abd6420466002e2413a59482c0af224d830..eade7d7ac8800f7f19b83e1da8c36eeeab796f37 100644
index 20f57abd6420466002e2413a59482c0af224d830..a91f51f80e8c19cfca75086ff7a1a9f71abc4647 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -216,4 +216,11 @@ public class PurpurConfig {
@@ -216,4 +216,13 @@ public class PurpurConfig {
org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27);
enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
}
+
+ 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);
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0035-Dont-send-useless-entity-packets.patch
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ index c71bc00973899feec0ec5530bf3d237928810cf4..c85ca046acbb976f32a671c18ee4efde
this.entity.stopSeenByPlayer(player);
player.connection.send(new ClientboundRemoveEntitiesPacket(new int[]{this.entity.getId()}));
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index eade7d7ac8800f7f19b83e1da8c36eeeab796f37..30e17e8d8c0adeaefb64cd9500d727d8cf89e27a 100644
index a91f51f80e8c19cfca75086ff7a1a9f71abc4647..bfe334678aef01738a834b4b281bed34d8e71a23 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -217,6 +217,11 @@ public class PurpurConfig {
Expand All @@ -54,4 +54,4 @@ index eade7d7ac8800f7f19b83e1da8c36eeeab796f37..30e17e8d8c0adeaefb64cd9500d727d8
+
public static boolean loggerSuppressInitLegacyMaterialError = false;
public static boolean loggerSuppressIgnoredAdvancementWarnings = false;
private static void loggerSettings() {
public static boolean loggerSuppressUnrecognizedRecipeErrors = false;
6 changes: 3 additions & 3 deletions patches/server/0057-Configurable-TPS-Catchup.patch
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ index 41eccbed6dda81f7d50c6ccb3539db3927b96021..88038c8286e46a89eed94169db9de5b8
this.profiler.pop();
this.endMetricsRecordingTick();
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index 30e17e8d8c0adeaefb64cd9500d727d8cf89e27a..6226e04e34f88579e4cd8b9fae5fddfcc0d01912 100644
index bfe334678aef01738a834b4b281bed34d8e71a23..e80ef21d6bd16f4d1ed9f2b47875fbc306b80e54 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -228,4 +228,9 @@ public class PurpurConfig {
loggerSuppressInitLegacyMaterialError = getBoolean("settings.logger.suppress-init-legacy-material-errors", loggerSuppressInitLegacyMaterialError);
@@ -230,4 +230,9 @@ public class PurpurConfig {
loggerSuppressIgnoredAdvancementWarnings = getBoolean("settings.logger.suppress-ignored-advancement-warnings", loggerSuppressIgnoredAdvancementWarnings);
loggerSuppressUnrecognizedRecipeErrors = getBoolean("settings.logger.suppress-unrecognized-recipe-errors", loggerSuppressUnrecognizedRecipeErrors);
}
+
+ public static boolean tpsCatchup = true;
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0082-Add-allow-water-in-end-world-option.patch
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ index df4f2c729f09d5229553308e4876f29de648543f..f2b0278679fa649bbc2904660e0dc9ab
} else {
world.setBlockAndUpdate(pos, Blocks.WATER.defaultBlockState());
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index 53051c4d193cdc5ac7e624a4c7def0ea10e3285e..a6aa607e5b085fdcddab8aa29258be0ba4aa1ac8 100644
index e98257697af84bf7501ee40db0683ab8b9880ee6..a35d10d864418c06b8f4543d886ac14a1ba76a76 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -228,6 +228,11 @@ public class PurpurConfig {
Expand All @@ -82,4 +82,4 @@ index 53051c4d193cdc5ac7e624a4c7def0ea10e3285e..a6aa607e5b085fdcddab8aa29258be0b
+
public static boolean loggerSuppressInitLegacyMaterialError = false;
public static boolean loggerSuppressIgnoredAdvancementWarnings = false;
private static void loggerSettings() {
public static boolean loggerSuppressUnrecognizedRecipeErrors = false;
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ index f8e58d9f71703139a736d93e7f1996e027a29444..d3c8fd8399629efb8bcbaf7d9a0c4334
}

diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index ac1c4d984928cd284183b4ff713155b2bbbdcfbe..6522045a99d93fc756571d8f43949a050cefb246 100644
index 15ce3d3f1f95f232203f5fe10a754c21ae88f729..568e119f599397b8bd5c5e41603f692a8fc848f5 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -355,6 +355,15 @@ public class PurpurConfig {
Expand All @@ -135,4 +135,4 @@ index ac1c4d984928cd284183b4ff713155b2bbbdcfbe..6522045a99d93fc756571d8f43949a05
+
public static boolean loggerSuppressInitLegacyMaterialError = false;
public static boolean loggerSuppressIgnoredAdvancementWarnings = false;
private static void loggerSettings() {
public static boolean loggerSuppressUnrecognizedRecipeErrors = false;

This file was deleted.

0 comments on commit 2b4f3af

Please sign in to comment.