Fix more issues with timings

- fixed usage of timings IDs (fixes region view)
- fixed more duplicated tick handlers
This commit is contained in:
Shane Freeder 2019-07-08 03:54:40 +01:00
parent c8bc57c719
commit 0a8afdacb6
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
8 changed files with 76 additions and 88 deletions

View File

@ -1,4 +1,4 @@
From 6b3f507c26cc2a553c087f4d936bf0574984f808 Mon Sep 17 00:00:00 2001
From 175f1620b7fba6b7a0a189cbd2c1e734498950a7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 18:48:17 -0600
Subject: [PATCH] Timings v2
@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2
diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java
new file mode 100644
index 00000000..64531fcc
index 000000000..64531fcce
--- /dev/null
+++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java
@@ -0,0 +1,84 @@
@ -96,7 +96,7 @@ index 00000000..64531fcc
+}
diff --git a/src/main/java/co/aikar/timings/NullTimingHandler.java b/src/main/java/co/aikar/timings/NullTimingHandler.java
new file mode 100644
index 00000000..9b45ce88
index 000000000..9b45ce887
--- /dev/null
+++ b/src/main/java/co/aikar/timings/NullTimingHandler.java
@@ -0,0 +1,68 @@
@ -170,7 +170,7 @@ index 00000000..9b45ce88
+}
diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java
new file mode 100644
index 00000000..933ecf9b
index 000000000..933ecf9bd
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java
@@ -0,0 +1,83 @@
@ -259,7 +259,7 @@ index 00000000..933ecf9b
+}
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
new file mode 100644
index 00000000..a21e5ead
index 000000000..a21e5ead5
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timing.java
@@ -0,0 +1,83 @@
@ -348,7 +348,7 @@ index 00000000..a21e5ead
+}
diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java
new file mode 100644
index 00000000..a5d13a1e
index 000000000..a5d13a1e4
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingData.java
@@ -0,0 +1,122 @@
@ -476,7 +476,7 @@ index 00000000..a5d13a1e
+}
diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java
new file mode 100644
index 00000000..cc0390c0
index 000000000..cc0390c06
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingHandler.java
@@ -0,0 +1,227 @@
@ -709,7 +709,7 @@ index 00000000..cc0390c0
+}
diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java
new file mode 100644
index 00000000..ddaed812
index 000000000..ddaed8127
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingHistory.java
@@ -0,0 +1,354 @@
@ -1069,7 +1069,7 @@ index 00000000..ddaed812
+}
diff --git a/src/main/java/co/aikar/timings/TimingHistoryEntry.java b/src/main/java/co/aikar/timings/TimingHistoryEntry.java
new file mode 100644
index 00000000..86d5ac6b
index 000000000..86d5ac6bd
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingHistoryEntry.java
@@ -0,0 +1,58 @@
@ -1133,7 +1133,7 @@ index 00000000..86d5ac6b
+}
diff --git a/src/main/java/co/aikar/timings/TimingIdentifier.java b/src/main/java/co/aikar/timings/TimingIdentifier.java
new file mode 100644
index 00000000..df142a89
index 000000000..df142a89b
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingIdentifier.java
@@ -0,0 +1,116 @@
@ -1255,7 +1255,7 @@ index 00000000..df142a89
+}
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
new file mode 100644
index 00000000..0b34e0d0
index 000000000..0b34e0d01
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timings.java
@@ -0,0 +1,293 @@
@ -1554,7 +1554,7 @@ index 00000000..0b34e0d0
+}
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
new file mode 100644
index 00000000..c0d8f201
index 000000000..c0d8f2016
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsCommand.java
@@ -0,0 +1,122 @@
@ -1682,7 +1682,7 @@ index 00000000..c0d8f201
+}
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
new file mode 100644
index 00000000..5923adfe
index 000000000..23eb8c65c
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
@@ -0,0 +1,355 @@
@ -1874,7 +1874,7 @@ index 00000000..5923adfe
+ pair("tileentity",
+ toObjectMapper(tileEntityTypeSet, input -> pair(input.ordinal(), input.name()))),
+ pair("entity",
+ toObjectMapper(entityTypeSet, input -> pair(input.getTypeId(), input.name())))
+ toObjectMapper(entityTypeSet, input -> pair(input.ordinal(), input.name())))
+ ));
+
+ // Information about loaded plugins
@ -2043,7 +2043,7 @@ index 00000000..5923adfe
+}
diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java
new file mode 100644
index 00000000..ef824d70
index 000000000..ef824d701
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsManager.java
@@ -0,0 +1,188 @@
@ -2237,7 +2237,7 @@ index 00000000..ef824d70
+}
diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java
new file mode 100644
index 00000000..bf3e059f
index 000000000..bf3e059fe
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsReportListener.java
@@ -0,0 +1,75 @@
@ -2318,7 +2318,7 @@ index 00000000..bf3e059f
+}
diff --git a/src/main/java/co/aikar/timings/UnsafeTimingHandler.java b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java
new file mode 100644
index 00000000..632c4961
index 000000000..632c49615
--- /dev/null
+++ b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java
@@ -0,0 +1,53 @@
@ -2377,7 +2377,7 @@ index 00000000..632c4961
+}
diff --git a/src/main/java/co/aikar/util/Counter.java b/src/main/java/co/aikar/util/Counter.java
new file mode 100644
index 00000000..80155072
index 000000000..80155072d
--- /dev/null
+++ b/src/main/java/co/aikar/util/Counter.java
@@ -0,0 +1,38 @@
@ -2421,7 +2421,7 @@ index 00000000..80155072
+}
diff --git a/src/main/java/co/aikar/util/JSONUtil.java b/src/main/java/co/aikar/util/JSONUtil.java
new file mode 100644
index 00000000..190bf059
index 000000000..190bf0598
--- /dev/null
+++ b/src/main/java/co/aikar/util/JSONUtil.java
@@ -0,0 +1,140 @@
@ -2567,7 +2567,7 @@ index 00000000..190bf059
+}
diff --git a/src/main/java/co/aikar/util/LoadingIntMap.java b/src/main/java/co/aikar/util/LoadingIntMap.java
new file mode 100644
index 00000000..63a899c7
index 000000000..63a899c7d
--- /dev/null
+++ b/src/main/java/co/aikar/util/LoadingIntMap.java
@@ -0,0 +1,76 @@
@ -2649,7 +2649,7 @@ index 00000000..63a899c7
+}
diff --git a/src/main/java/co/aikar/util/LoadingMap.java b/src/main/java/co/aikar/util/LoadingMap.java
new file mode 100644
index 00000000..aedbb033
index 000000000..aedbb0332
--- /dev/null
+++ b/src/main/java/co/aikar/util/LoadingMap.java
@@ -0,0 +1,368 @@
@ -3023,7 +3023,7 @@ index 00000000..aedbb033
+}
diff --git a/src/main/java/co/aikar/util/MRUMapCache.java b/src/main/java/co/aikar/util/MRUMapCache.java
new file mode 100644
index 00000000..5989ee21
index 000000000..5989ee212
--- /dev/null
+++ b/src/main/java/co/aikar/util/MRUMapCache.java
@@ -0,0 +1,111 @@
@ -3139,7 +3139,7 @@ index 00000000..5989ee21
+ }
+}
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 0822b8e5..940c643d 100644
index 0822b8e53..940c643df 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -574,7 +574,6 @@ public final class Bukkit {
@ -3151,7 +3151,7 @@ index 0822b8e5..940c643d 100644
/**
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 11c5c205..c197e381 100644
index 11c5c2054..c197e3811 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1250,6 +1250,26 @@ public interface Server extends PluginMessageRecipient {
@ -3182,7 +3182,7 @@ index 11c5c205..c197e381 100644
* Sends the component to the player
*
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 247d194f..72c5501e 100644
index 247d194f8..72c5501e8 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -69,4 +69,12 @@ public interface UnsafeValues {
@ -3200,7 +3200,7 @@ index 247d194f..72c5501e 100644
}
diff --git a/src/main/java/org/bukkit/command/BufferedCommandSender.java b/src/main/java/org/bukkit/command/BufferedCommandSender.java
new file mode 100644
index 00000000..f9a00aec
index 000000000..f9a00aecc
--- /dev/null
+++ b/src/main/java/org/bukkit/command/BufferedCommandSender.java
@@ -0,0 +1,21 @@
@ -3226,7 +3226,7 @@ index 00000000..f9a00aec
+ }
+}
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
index 4bfc2146..03bdc162 100644
index 4bfc21468..03bdc1622 100644
--- a/src/main/java/org/bukkit/command/Command.java
+++ b/src/main/java/org/bukkit/command/Command.java
@@ -33,7 +33,8 @@ public abstract class Command {
@ -3256,7 +3256,7 @@ index 4bfc2146..03bdc162 100644
return true;
}
diff --git a/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
index d6c8938b..a6ad94ef 100644
index d6c8938b1..a6ad94ef9 100644
--- a/src/main/java/org/bukkit/command/FormattedCommandAlias.java
+++ b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
@@ -9,6 +9,7 @@ public class FormattedCommandAlias extends Command {
@ -3280,7 +3280,7 @@ index d6c8938b..a6ad94ef 100644
}
diff --git a/src/main/java/org/bukkit/command/MessageCommandSender.java b/src/main/java/org/bukkit/command/MessageCommandSender.java
new file mode 100644
index 00000000..ca1893e9
index 000000000..ca1893e9f
--- /dev/null
+++ b/src/main/java/org/bukkit/command/MessageCommandSender.java
@@ -0,0 +1,114 @@
@ -3399,7 +3399,7 @@ index 00000000..ca1893e9
+
+}
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index 81e4fa57..f020cb04 100644
index 81e4fa573..f020cb04e 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -15,7 +15,6 @@ import org.bukkit.command.defaults.BukkitCommand;
@ -3456,7 +3456,7 @@ index 81e4fa57..f020cb04 100644
diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
deleted file mode 100644
index 6023e4f6..00000000
index 6023e4f61..000000000
--- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
+++ /dev/null
@@ -1,253 +0,0 @@
@ -3714,7 +3714,7 @@ index 6023e4f6..00000000
- // Spigot end
-}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index ae6274d7..bf0b8bf1 100644
index ae6274d70..bf0b8bf19 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1601,6 +1601,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@ -3730,7 +3730,7 @@ index ae6274d7..bf0b8bf1 100644
@NotNull
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index f648c598..78a2d2f8 100644
index f648c5989..78a2d2f8d 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -297,7 +297,6 @@ public final class SimplePluginManager implements PluginManager {
@ -3787,7 +3787,7 @@ index f648c598..78a2d2f8 100644
}
}
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 1173e433..82e379d1 100644
index 1173e433a..82e379d16 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -53,7 +53,6 @@ public final class JavaPluginLoader implements PluginLoader {
@ -3830,7 +3830,7 @@ index 1173e433..82e379d1 100644
eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled()));
} else {
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 0ffc1dfd..b859796b 100644
index 0ffc1dfdb..b859796b4 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -24,7 +24,8 @@ import org.jetbrains.annotations.Nullable;
@ -3844,7 +3844,7 @@ index 0ffc1dfd..b859796b 100644
private final Map<String, Class<?>> classes = new ConcurrentHashMap<String, Class<?>>();
private final PluginDescriptionFile description;
diff --git a/src/main/java/org/bukkit/util/CachedServerIcon.java b/src/main/java/org/bukkit/util/CachedServerIcon.java
index 5ca863b3..612958a3 100644
index 5ca863b36..612958a33 100644
--- a/src/main/java/org/bukkit/util/CachedServerIcon.java
+++ b/src/main/java/org/bukkit/util/CachedServerIcon.java
@@ -2,6 +2,7 @@ package org.bukkit.util;
@ -3867,7 +3867,7 @@ index 5ca863b3..612958a3 100644
+
+}
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
index b71235f6..3cbe5c2b 100644
index b71235f69..3cbe5c2bb 100644
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java
@@ -1,3 +1,26 @@

View File

@ -1,4 +1,4 @@
From 4f5c8e39a041d746a7ba6a18b9839c3b811f0bf0 Mon Sep 17 00:00:00 2001
From 5a6ac2574a72aca6611ad1c416a65c6ec393569a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -1001,7 +1001,7 @@ index 2efaf516ff..22a8ea916a 100644
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
public CraftPersistentDataContainer persistentDataContainer;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 32981c4422..0e09adf7dc 100644
index 32981c4422..2f608305f7 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,5 +1,7 @@
@ -1038,7 +1038,7 @@ index 32981c4422..0e09adf7dc 100644
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
}
@@ -773,21 +774,26 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -773,15 +774,14 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
}
timings.tileEntityPending.stopTiming(); // Spigot
@ -1050,23 +1050,11 @@ index 32981c4422..0e09adf7dc 100644
public void a(Consumer<Entity> consumer, Entity entity) {
try {
- SpigotTimings.tickEntityTimer.startTiming(); // Spigot
+ timings.tickEntities.startTiming();
+ entity.tickTimer.startTiming();
+ // Spigot end
consumer.accept(entity);
- SpigotTimings.tickEntityTimer.stopTiming(); // Spigot
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Ticking entity");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked");
entity.appendEntityCrashDetails(crashreportsystemdetails);
throw new ReportedException(crashreport);
+ } finally {
+ entity.tickTimer.stopTiming();
+ timings.tickEntities.stopTiming();
}
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index df518ff633..229cff562f 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java

View File

@ -1,4 +1,4 @@
From 0dbbc4d55f0d3ef9913bafb08a34bc1f608a6f97 Mon Sep 17 00:00:00 2001
From 74eb90e56377cc140589affc4de430a80f24c0c7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:52:34 -0600
Subject: [PATCH] Prevent tile entity and entity crashes
@ -23,7 +23,7 @@ index 22a8ea916a..e1db243165 100644
}
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index bdb69afab6..1915dd9145 100644
index 67ea828427..35c6306b34 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -714,11 +714,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -45,8 +45,8 @@ index bdb69afab6..1915dd9145 100644
}
// Spigot start
finally {
@@ -787,11 +789,12 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
// Spigot end
@@ -784,11 +786,12 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
try {
consumer.accept(entity);
} catch (Throwable throwable) {
- CrashReport crashreport = CrashReport.a(throwable, "Ticking entity");
@ -60,9 +60,9 @@ index bdb69afab6..1915dd9145 100644
+ entity.dead = true;
+ return;
+ // Paper end
} finally {
entity.tickTimer.stopTiming();
timings.tickEntities.stopTiming();
}
}
--
2.22.0

View File

@ -1,4 +1,4 @@
From 794c8684336df9ed85fdfaa01cf427414789fff8 Mon Sep 17 00:00:00 2001
From 9c80e9bb4734e94684d0d51d56cdf7d9b17f70cd Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event
@ -6,7 +6,7 @@ Subject: [PATCH] Add exception reporting event
diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
new file mode 100644
index 000000000..f699ce18c
index 0000000000..f699ce18ca
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
@@ -0,0 +1,38 @@
@ -49,7 +49,7 @@ index 000000000..f699ce18c
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index f6f5b72de..ec64391a4 100644
index f6f5b72de3..ec64391a4a 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1,5 +1,6 @@
@ -80,7 +80,7 @@ index f6f5b72de..ec64391a4 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 22aba0627..3da7e10a9 100644
index 22aba06270..3da7e10a92 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -14,6 +14,9 @@ import java.util.function.BooleanSupplier;
@ -94,7 +94,7 @@ index 22aba0627..3da7e10a9 100644
public class ChunkProviderServer extends IChunkProvider {
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index 2cb0962ff..21a8ed323 100644
index 2cb0962ff1..21a8ed3231 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -1,5 +1,6 @@
@ -121,7 +121,7 @@ index 2cb0962ff..21a8ed323 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 07a1796c7..808c17815 100644
index 07a1796c77..808c178157 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -644,6 +644,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -141,7 +141,7 @@ index 07a1796c7..808c17815 100644
}
}
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index d4a9af975..88b5aa3a5 100644
index d4a9af975d..88b5aa3a51 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -1,5 +1,6 @@
@ -168,7 +168,7 @@ index d4a9af975..88b5aa3a5 100644
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index a54d65337..4aa65c193 100644
index a54d653372..4aa65c1934 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -8,6 +8,7 @@ import org.apache.logging.log4j.LogManager;
@ -196,7 +196,7 @@ index a54d65337..4aa65c193 100644
}
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index 0a1d342c1..347608531 100644
index 0a1d342c13..347608531f 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -1,5 +1,7 @@
@ -216,7 +216,7 @@ index 0a1d342c1..347608531 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 17d1dc93b..f3f10ca60 100644
index c58c95b03f..d2062b335c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2,6 +2,9 @@ package net.minecraft.server;
@ -242,7 +242,7 @@ index 17d1dc93b..f3f10ca60 100644
tilesThisCycle--;
this.tileEntityListTick.remove(tileTickPosition--);
continue;
@@ -790,8 +796,10 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -787,8 +793,10 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
consumer.accept(entity);
} catch (Throwable throwable) {
// Paper start - Prevent tile entity and entity crashes
@ -255,7 +255,7 @@ index 17d1dc93b..f3f10ca60 100644
return;
// Paper end
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
index f5f540032..00e9a1735 100644
index f5f540032f..00e9a17355 100644
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
@@ -121,6 +121,7 @@ public class WorldPersistentData {
@ -267,7 +267,7 @@ index f5f540032..00e9a1735 100644
} finally {
if (pushbackinputstream != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 8823f94f7..552daf437 100644
index 8823f94f7b..552daf4376 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -16,6 +16,9 @@ import java.util.concurrent.atomic.AtomicInteger;

View File

@ -1,4 +1,4 @@
From e0e40cd4d870115d0e2992bf5f62f2b436be5f28 Mon Sep 17 00:00:00 2001
From 2b06ba42451cff97992fac44f050d6464bb37e47 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 00:25:28 -0400
Subject: [PATCH] Remove unused World Tile Entity List
@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List
Massive hit to performance and it is completely unnecessary.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index cde463c5a..f6cb4d45e 100644
index b1ce9b874a..f396ca6914 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -40,7 +40,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -57,7 +57,7 @@ index cde463c5a..f6cb4d45e 100644
this.a(tileentity1);
}
// CraftBukkit end
@@ -1089,7 +1089,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -1083,7 +1083,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
} else {
if (tileentity != null) {
this.tileEntityListPending.remove(tileentity);

View File

@ -1,11 +1,11 @@
From 6741b23c5a16fce7f2ac61cceab4d2dcb5b2ebd8 Mon Sep 17 00:00:00 2001
From 79838a0c13d8883d5f9544a6385528015770a906 Mon Sep 17 00:00:00 2001
From: Hugo Manrique <hugmanrique@gmail.com>
Date: Mon, 23 Jul 2018 12:57:39 +0200
Subject: [PATCH] Option to prevent armor stands from doing entity lookups
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index fc045593..09607fb4 100644
index fc0455934b..09607fb447 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -321,6 +321,11 @@ public class PaperWorldConfig {
@ -21,10 +21,10 @@ index fc045593..09607fb4 100644
private void maxEntityCollision() {
maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) );
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f476f326..d08bd6d9 100644
index 23d5555d93..0d73a53f64 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -873,6 +873,14 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -867,6 +867,14 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
}
}

View File

@ -1,4 +1,4 @@
From 8565eed0a4de2941afd0ac2f3b8d2654f0197e23 Mon Sep 17 00:00:00 2001
From 9532fdb3c8f23e40e565554862ba04bd37b65c85 Mon Sep 17 00:00:00 2001
From: theosib <millerti@172.16.221.1>
Date: Thu, 27 Sep 2018 01:43:35 -0600
Subject: [PATCH] Optimize redstone algorithm
@ -19,7 +19,7 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee
Just added Bukkit's event system and took a few liberties with dead code and comment misspellings.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 2299860b..91c809b7 100644
index 2299860b81..91c809b7ce 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -434,4 +434,14 @@ public class PaperWorldConfig {
@ -39,7 +39,7 @@ index 2299860b..91c809b7 100644
}
diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
new file mode 100644
index 00000000..cf5661f1
index 0000000000..cf5661f1c5
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
@@ -0,0 +1,912 @@
@ -956,7 +956,7 @@ index 00000000..cf5661f1
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index 7ce9cdb8..6b5015ce 100644
index 7ce9cdb853..6b5015ce5f 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -1,5 +1,7 @@
@ -1124,7 +1124,7 @@ index 7ce9cdb8..6b5015ce 100644
c(iblockdata, world, blockposition);
world.a(blockposition, false);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 26f3b472..1eb689c6 100644
index 1f28358f9e..7368713415 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -594,6 +594,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -1135,7 +1135,7 @@ index 26f3b472..1eb689c6 100644
public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) {
if (!this.isClientSide) {
IBlockData iblockdata = this.getType(blockposition);
@@ -1340,6 +1341,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -1334,6 +1335,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0))));
}

View File

@ -1,4 +1,4 @@
From 96e37fe923fb5a9887e0d89eac3259ebff2ece30 Mon Sep 17 00:00:00 2001
From 1456f6ca40ac1399fa4d2bda1f8ae6e399bf4663 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 6 Apr 2019 10:16:48 -0400
Subject: [PATCH] Optimize Captured TileEntity Lookup
@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to
just do a get call since the value can never be null.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f1552f23e..ef080f957 100644
index 3269d095b7..b1b2766838 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1087,12 +1087,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -1081,12 +1081,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
return null;
} else {
// CraftBukkit start