mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
6249addbaa
Upstream has released updates that appear to apply compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing. Bukkit Changes: d2834556 SPIGOT-4219: Event for PigZombies angering. CraftBukkit Changes:a9c796f1
SPIGOT-4184: Fix furnaces not matching Vanilla smelt or animations195f071e
SPIGOT-4219: Event for PigZombies angering.5e3082c7
SPIGOT-4230: Improve legacy block types
45 lines
No EOL
2.3 KiB
Diff
45 lines
No EOL
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
|
Date: Tue, 20 Dec 2016 23:09:21 -0600
|
|
Subject: [PATCH] Add option to remove invalid statistics
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
index c1845d6811..9f1182c723 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
@@ -0,0 +0,0 @@ public class PaperConfig {
|
|
maxPlayerAutoSavePerTick = (playerAutoSaveRate == -1 || playerAutoSaveRate > 100) ? 10 : 20;
|
|
}
|
|
}
|
|
+
|
|
+ public static boolean removeInvalidStatistics = false;
|
|
+ private static void removeInvalidStatistics() {
|
|
+ if (version < 12) {
|
|
+ boolean oldValue = getBoolean("remove-invalid-statistics", false);
|
|
+ set("settings.remove-invalid-statistics", oldValue);
|
|
+ }
|
|
+ removeInvalidStatistics = getBoolean("settings.remove-invalid-statistics", false);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
|
index 07e7db455b..34c57e26f4 100644
|
|
--- a/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
|
+++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
|
@@ -0,0 +0,0 @@ public class ServerStatisticManager extends StatisticManager {
|
|
try {
|
|
JsonReader jsonreader = new JsonReader(new StringReader(s));
|
|
Throwable throwable = null;
|
|
+ java.util.List<String> invalidStats = com.google.common.collect.Lists.newArrayList(); // Paper
|
|
|
|
try {
|
|
jsonreader.setLenient(false);
|
|
@@ -0,0 +0,0 @@ public class ServerStatisticManager extends StatisticManager {
|
|
|
|
if (statistic == null) {
|
|
ServerStatisticManager.b.warn("Invalid statistic in {}: Don\'t know what {} is", this.d, s2);
|
|
+ if (com.destroystokyo.paper.PaperConfig.removeInvalidStatistics) invalidStats.add(s2); // Paper
|
|
} else {
|
|
this.a.put(statistic, nbttagcompound2.getInt(s2));
|
|
}
|
|
--
|