aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0009-Timings-v2.patch
diff options
context:
space:
mode:
authorMiniDigger | Martin <[email protected]>2021-02-21 21:55:01 +0100
committerGitHub <[email protected]>2021-02-21 20:55:01 +0000
commit4668201606ced19348529b86b6ae70370eba0fe9 (patch)
tree2e51fb258ac71bffe4cdb2f1672f213b46aefb55 /Spigot-Server-Patches/0009-Timings-v2.patch
parent2a0ee4b65d63043564b0dfe001c7f9804a07b477 (diff)
downloadPaper-4668201606ced19348529b86b6ae70370eba0fe9.tar.gz
Paper-4668201606ced19348529b86b6ae70370eba0fe9.zip
Upstream Update (#5211)
Diffstat (limited to 'Spigot-Server-Patches/0009-Timings-v2.patch')
-rw-r--r--Spigot-Server-Patches/0009-Timings-v2.patch67
1 files changed, 34 insertions, 33 deletions
diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch
index 4b9310280e..94a893d1cc 100644
--- a/Spigot-Server-Patches/0009-Timings-v2.patch
+++ b/Spigot-Server-Patches/0009-Timings-v2.patch
@@ -738,10 +738,10 @@ index 871b79cb2c63525c430c257f00b2cf70157aa476..d847326b0099a0c05a085d5d62de6304
private String name;
@Nullable
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
-index 9f1db6491dafa8e32395db381466a3447395da7e..19ddcabdc17c23c4ec46f5669ba0fd56d4bbee58 100644
+index 853e11836b6c4eadd03feead101bf578b17b86a3..0aea16df16b55b1d4756b51d10c8c22d37aef9a3 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
-@@ -697,6 +697,7 @@ public class Chunk implements IChunkAccess {
+@@ -699,6 +699,7 @@ public class Chunk implements IChunkAccess {
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.needsDecoration));
if (this.needsDecoration) {
@@ -749,7 +749,7 @@ index 9f1db6491dafa8e32395db381466a3447395da7e..19ddcabdc17c23c4ec46f5669ba0fd56
this.needsDecoration = false;
java.util.Random random = new java.util.Random();
random.setSeed(world.getSeed());
-@@ -716,6 +717,7 @@ public class Chunk implements IChunkAccess {
+@@ -718,6 +719,7 @@ public class Chunk implements IChunkAccess {
}
}
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
@@ -758,10 +758,10 @@ index 9f1db6491dafa8e32395db381466a3447395da7e..19ddcabdc17c23c4ec46f5669ba0fd56
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
-index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f8fa4fcf8 100644
+index 08f11f98c40221fa4ce9a4f14ee8398f8588f38a..a066026bce318683dcc022920dad39d7ec25e485 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
-@@ -314,11 +314,13 @@ public class ChunkProviderServer extends IChunkProvider {
+@@ -322,11 +322,13 @@ public class ChunkProviderServer extends IChunkProvider {
}
gameprofilerfiller.c("getChunkCacheMiss");
@@ -777,7 +777,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
return ichunkaccess1;
}, (playerchunk_failure) -> {
-@@ -505,7 +507,9 @@ public class ChunkProviderServer extends IChunkProvider {
+@@ -513,7 +515,9 @@ public class ChunkProviderServer extends IChunkProvider {
public void save(boolean flag) {
this.tickDistanceManager();
@@ -787,7 +787,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f
}
@Override
-@@ -542,7 +546,9 @@ public class ChunkProviderServer extends IChunkProvider {
+@@ -550,7 +554,9 @@ public class ChunkProviderServer extends IChunkProvider {
this.tickDistanceManager();
this.world.timings.doChunkMap.stopTiming(); // Spigot
this.world.getMethodProfiler().exitEnter("chunks");
@@ -797,7 +797,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f
this.world.timings.doChunkUnload.startTiming(); // Spigot
this.world.getMethodProfiler().exitEnter("unload");
this.playerChunkMap.unloadChunks(booleansupplier);
-@@ -566,8 +572,10 @@ public class ChunkProviderServer extends IChunkProvider {
+@@ -574,8 +580,10 @@ public class ChunkProviderServer extends IChunkProvider {
boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit
this.world.getMethodProfiler().enter("naturalSpawnCount");
@@ -808,7 +808,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f
this.p = spawnercreature_d;
this.world.getMethodProfiler().exit();
-@@ -578,7 +586,9 @@ public class ChunkProviderServer extends IChunkProvider {
+@@ -586,7 +594,9 @@ public class ChunkProviderServer extends IChunkProvider {
if (optional.isPresent()) {
this.world.getMethodProfiler().enter("broadcast");
@@ -818,7 +818,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f
this.world.getMethodProfiler().exit();
Optional<Chunk> optional1 = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
-@@ -592,25 +602,25 @@ public class ChunkProviderServer extends IChunkProvider {
+@@ -600,25 +610,25 @@ public class ChunkProviderServer extends IChunkProvider {
SpawnerCreature.a(this.world, chunk, spawnercreature_d, this.allowAnimals, this.allowMonsters, flag2);
}
@@ -1007,7 +1007,7 @@ index d91b029c95b6380300db81e7c0fb172ff57958a1..218071260dec39dd4f7eb733ae6f832a
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
-index 9f32f6c3c34464e82a953a50141343b0083dea71..ace7d5a36c0a44763d554d5d83cee7817f77fcc1 100644
+index b35ffae9f88cc14aec01482c2a3ed2e2428c2012..03933c24ed4d97e16bcebf6b89b1a8d1fc43cd0b 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -31,7 +31,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
@@ -1517,7 +1517,7 @@ index b37b791cd66b2e88dd0ecf52beea1844c97cdb94..d34e91887cd73009bf852fb849e495a8
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
-index 2c671629a43f42da8335e7216f9fd399bb878729..eb3269e0ea3ce33d08e9eee3bca7cf434921e991 100644
+index 8c534c2f06fe72287364536b8767bd774b94c027..9c810b5aa21ca714ccf355d5648b7612f99b6884 100644
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@@ -2,6 +2,8 @@ package net.minecraft.server;
@@ -1636,7 +1636,7 @@ index b9ffd000c97111678d45fd55dc9c207ebadc140e..f1d0e2faffb3ef27f5a41d06d0ff7d78
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 9c6b15e70bfb7db853c8e4a8dfd7b24bae27a70c..b4aeea40ee04fd2ed10484f40d25dbd2a3a01b53 100644
+index 6df28adb17d78a7f5189787a979a44fad677f05c..09577ddcb3c2432a0af6047b287a387de5d2920a 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -18,7 +18,6 @@ import org.apache.logging.log4j.Logger;
@@ -1665,7 +1665,7 @@ index 9c6b15e70bfb7db853c8e4a8dfd7b24bae27a70c..b4aeea40ee04fd2ed10484f40d25dbd2
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
}
-@@ -746,15 +745,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
+@@ -745,15 +744,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
}
timings.tileEntityPending.stopTiming(); // Spigot
@@ -1683,7 +1683,7 @@ index 9c6b15e70bfb7db853c8e4a8dfd7b24bae27a70c..b4aeea40ee04fd2ed10484f40d25dbd2
CrashReport crashreport = CrashReport.a(throwable, "Ticking entity");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked");
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
-index c96ad91b15920293e228f5eb7d0843beda92faec..21e4088cfdb7218e78fb771fe4c9bd2027594663 100644
+index 592af06de1fc02d94273363c2ede1175a39997f0..3d915105b277a7cbf330ba2cb3c2f1451ee868e4 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -2,6 +2,8 @@ package net.minecraft.server;
@@ -1810,7 +1810,7 @@ index c96ad91b15920293e228f5eb7d0843beda92faec..21e4088cfdb7218e78fb771fe4c9bd20
// CraftBukkit start - moved from MinecraftServer.saveChunks
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index bf21a80f781e600a08f82d1a16f0e11983dc8f8d..73bd46c980cb13d6cbe4aba41adb122eaab769be 100644
+index a19242d717f7f9c254e6127fb2cb2f202be2d78a..351440f534653c9d315ccaf1e923e03ca6ba01f6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2069,12 +2069,31 @@ public final class CraftServer implements Server {
@@ -1846,10 +1846,9 @@ index bf21a80f781e600a08f82d1a16f0e11983dc8f8d..73bd46c980cb13d6cbe4aba41adb122e
public void restart() {
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
-deleted file mode 100644
-index 7f435847ac1d13756ce233e7d5ae13f9dc17c443..0000000000000000000000000000000000000000
+index 66523c21c49b8a019a82fdeb84a187c3b627ab73..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
-+++ /dev/null
++++ b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
@@ -1,163 +0,0 @@
-package org.bukkit.craftbukkit;
-
@@ -1921,7 +1920,7 @@ index 7f435847ac1d13756ce233e7d5ae13f9dc17c443..00000000000000000000000000000000
-
- String name = "Task: " + plugin + " Runnable: " + taskname;
- if (period > 0) {
-- name += "(interval:" + period +")";
+- name += "(interval:" + period + ")";
- } else {
- name += "(Single)";
- }
@@ -2015,10 +2014,10 @@ index 7f435847ac1d13756ce233e7d5ae13f9dc17c443..00000000000000000000000000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 3551ab3a570042585621c943d74d8d3c0bd299b4..4001145980f4dabbd291336d5a464c3856144996 100644
+index 6ebcf2afe78a0e0ab3ed4570b6aa416973c48fdf..8428ef53e0408c4a7f74cc03e7e238be9c2f1888 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -1821,6 +1821,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -1820,6 +1820,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
packet.components = components;
getHandle().playerConnection.sendPacket(packet);
}
@@ -2110,23 +2109,25 @@ index 4bf48f77f3f7cd62a91590543f5af441c8268029..ffe9cc1011226d604dc5499e7692e9a9
private boolean isReady(final int currentTick) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
-index d85e21b75054067b926ecfee89d62c6dd0744189..9d0d1598bfce2f51998395faf39d8bd2f5d3f9f3 100644
+index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..90ba08993fefd975b1095dafa6304aad49c62088 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
-@@ -1,9 +1,11 @@
+@@ -1,11 +1,13 @@
package org.bukkit.craftbukkit.scheduler;
import java.util.function.Consumer;
+
+import co.aikar.timings.NullTimingHandler;
import org.bukkit.Bukkit;
+ import org.bukkit.plugin.Plugin;
+ import org.bukkit.scheduler.BukkitTask;
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
-import org.spigotmc.CustomTimingsHandler; // Spigot
+import co.aikar.timings.MinecraftTimings; // Paper
+import co.aikar.timings.Timing; // Paper
- import org.bukkit.plugin.Plugin;
- import org.bukkit.scheduler.BukkitTask;
+
+ public class CraftTask implements BukkitTask, Runnable { // Spigot
@@ -26,12 +28,12 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
*/
private volatile long period;
@@ -2238,10 +2239,10 @@ index 6194d8aac0d2e54958aad3fb8b5fe144451cf879..d63a160f1b00de8d67ae1eb4fefbd5ca
* This helper class represents the different NBT Tags.
* <p>
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
-index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f03dd4aa3 100644
+index 383997d2e57a31e2ff30cf1bf34128fe477390a8..093a11b6e355f9e1236ecca921ea55488d70451d 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
-@@ -31,7 +31,7 @@ import net.minecraft.server.EntityWither;
+@@ -29,7 +29,7 @@ import net.minecraft.server.EntityWither;
import net.minecraft.server.MathHelper;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.World;
@@ -2250,7 +2251,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f
public class ActivationRange
{
-@@ -75,8 +75,8 @@ public class ActivationRange
+@@ -73,8 +73,8 @@ public class ActivationRange
/**
* These entities are excluded from Activation range checks.
*
@@ -2261,7 +2262,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f
* @return boolean If it should always tick.
*/
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
-@@ -111,7 +111,7 @@ public class ActivationRange
+@@ -109,7 +109,7 @@ public class ActivationRange
*/
public static void activateEntities(World world)
{
@@ -2270,7 +2271,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f
final int miscActivationRange = world.spigotConfig.miscActivationRange;
final int raiderActivationRange = world.spigotConfig.raiderActivationRange;
final int animalActivationRange = world.spigotConfig.animalActivationRange;
-@@ -148,7 +148,7 @@ public class ActivationRange
+@@ -146,7 +146,7 @@ public class ActivationRange
}
}
}
@@ -2279,7 +2280,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f
}
/**
-@@ -245,10 +245,8 @@ public class ActivationRange
+@@ -243,10 +243,8 @@ public class ActivationRange
*/
public static boolean checkIfActive(Entity entity)
{
@@ -2290,7 +2291,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f
return true;
}
-@@ -272,7 +270,6 @@ public class ActivationRange
+@@ -270,7 +268,6 @@ public class ActivationRange
{
isActive = false;
}