diff options
author | Jake Potrebic <[email protected]> | 2023-06-12 16:51:45 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2023-06-12 16:51:45 -0700 |
commit | c287e921a96438964f32f3c4e394d6809e0d06fa (patch) | |
tree | fcc826670454d8a8f5547838414583ce5f1df02d /patches/server/0014-Timings-v2.patch | |
parent | b48e2e352e21c56d6a9e90bb8d9e548d3658a691 (diff) | |
download | Paper-c287e921a96438964f32f3c4e394d6809e0d06fa.tar.gz Paper-c287e921a96438964f32f3c4e394d6809e0d06fa.zip |
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9301)1.20
Diffstat (limited to 'patches/server/0014-Timings-v2.patch')
-rw-r--r-- | patches/server/0014-Timings-v2.patch | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/patches/server/0014-Timings-v2.patch b/patches/server/0014-Timings-v2.patch index c3a9827a13..ac01109fe4 100644 --- a/patches/server/0014-Timings-v2.patch +++ b/patches/server/0014-Timings-v2.patch @@ -732,7 +732,7 @@ index fc4dcd801480fe6d89a985de411baa9a3a66f6ef..4a1148a76020089caf01f888f87afdbb } catch (Exception exception) { if (listener.shouldPropagateHandlingExceptions()) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2d35572157b28f2e637d9b47a82c5e7adecde96e..96897d883671e018bae5f71545c5f7af205e309c 100644 +index 3250a9310b57351d6d832a8ef42837d990cf6c99..f0cd94f877a83485ab8e96e1c4e00bf658f227b7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -189,7 +189,7 @@ import org.bukkit.event.player.AsyncPlayerChatPreviewEvent; @@ -744,7 +744,7 @@ index 2d35572157b28f2e637d9b47a82c5e7adecde96e..96897d883671e018bae5f71545c5f7af public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable { -@@ -863,6 +863,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -861,6 +861,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa } MinecraftServer.LOGGER.info("Stopping server"); @@ -752,7 +752,7 @@ index 2d35572157b28f2e637d9b47a82c5e7adecde96e..96897d883671e018bae5f71545c5f7af // CraftBukkit start if (this.server != null) { this.server.disablePlugins(); -@@ -1101,9 +1102,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1099,9 +1100,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa private boolean haveTime() { // CraftBukkit start @@ -774,7 +774,7 @@ index 2d35572157b28f2e637d9b47a82c5e7adecde96e..96897d883671e018bae5f71545c5f7af private void executeModerately() { this.runAllTasks(); java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L); -@@ -1111,9 +1124,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1109,9 +1122,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa // CraftBukkit end protected void waitUntilNextTick() { @@ -786,7 +786,7 @@ index 2d35572157b28f2e637d9b47a82c5e7adecde96e..96897d883671e018bae5f71545c5f7af }); } -@@ -1198,9 +1211,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1196,9 +1209,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa public void onServerExit() {} public void tickServer(BooleanSupplier shouldKeepTicking) { @@ -805,7 +805,7 @@ index 2d35572157b28f2e637d9b47a82c5e7adecde96e..96897d883671e018bae5f71545c5f7af ++this.tickCount; this.tickChildren(shouldKeepTicking); if (i - this.lastServerStatus >= 5000000000L) { -@@ -1209,15 +1230,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1207,15 +1228,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa } if (this.autosavePeriod > 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit @@ -826,7 +826,7 @@ index 2d35572157b28f2e637d9b47a82c5e7adecde96e..96897d883671e018bae5f71545c5f7af this.profiler.push("tallying"); long j = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i; -@@ -1227,8 +1251,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1225,8 +1249,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa this.frameTimer.logFrameDuration(k - i); this.profiler.pop(); org.spigotmc.WatchdogThread.tick(); // Spigot @@ -836,7 +836,7 @@ index 2d35572157b28f2e637d9b47a82c5e7adecde96e..96897d883671e018bae5f71545c5f7af } private ServerStatus buildServerStatus() { -@@ -1260,26 +1283,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1258,26 +1281,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa } public void tickChildren(BooleanSupplier shouldKeepTicking) { @@ -870,7 +870,7 @@ index 2d35572157b28f2e637d9b47a82c5e7adecde96e..96897d883671e018bae5f71545c5f7af // Send time updates to everyone, it will get the right time from the world the player is in. if (this.tickCount % 20 == 0) { for (int i = 0; i < this.getPlayerList().players.size(); ++i) { -@@ -1287,7 +1310,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1285,7 +1308,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level().getGameTime(), entityplayer.getPlayerTime(), entityplayer.level().getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time } } @@ -879,7 +879,7 @@ index 2d35572157b28f2e637d9b47a82c5e7adecde96e..96897d883671e018bae5f71545c5f7af while (iterator.hasNext()) { ServerLevel worldserver = (ServerLevel) iterator.next(); -@@ -1333,24 +1356,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1331,24 +1354,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa } this.profiler.popPush("connection"); @@ -1270,7 +1270,7 @@ index 7be97441aed66fa3a21d13ad2211b3e0e08120c0..7cb5abfa89f842194325d26c6e95b494 this.entityManager.saveAll(); } else { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a1b9a2eeba2febef1b568a4c5aea99829210dbe1..403f7c7f31e0072b0cad0706bc981ece24733a1d 100644 +index fa3d02895d57c17416e742d2ea1e51253bce4fad..527654df6628b70fd380ccfd3890c27c7a490ef0 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -339,7 +339,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -1289,7 +1289,7 @@ index a1b9a2eeba2febef1b568a4c5aea99829210dbe1..403f7c7f31e0072b0cad0706bc981ece } -@@ -2144,7 +2142,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2147,7 +2145,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } private void handleCommand(String s) { @@ -1298,7 +1298,7 @@ index a1b9a2eeba2febef1b568a4c5aea99829210dbe1..403f7c7f31e0072b0cad0706bc981ece if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); -@@ -2154,7 +2152,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2157,7 +2155,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.cserver.getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -1307,7 +1307,7 @@ index a1b9a2eeba2febef1b568a4c5aea99829210dbe1..403f7c7f31e0072b0cad0706bc981ece return; } -@@ -2167,7 +2165,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2170,7 +2168,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); return; } finally { @@ -1317,7 +1317,7 @@ index a1b9a2eeba2febef1b568a4c5aea99829210dbe1..403f7c7f31e0072b0cad0706bc981ece } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 645bee9a926d71c3730a23391d21d48418444e9a..ec414e72a36ae330a3a4c6a4c7d879f3350ecb86 100644 +index d3dc7752aadf36985660d04dcb4377a69dfeddff..b922654c0b0b1b0d03beb20bb1944b817907f929 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -1,5 +1,6 @@ @@ -1341,7 +1341,7 @@ index 645bee9a926d71c3730a23391d21d48418444e9a..ec414e72a36ae330a3a4c6a4c7d879f3 public UserWhiteList getWhiteList() { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 18b019aa5908bbc02caa162accbf088abcefc2e2..3eb5659714158a371e8f922c47edd3f9e792c5a5 100644 +index a4e5961991a6debff959d63d70b71b1ded76e72a..fd81979963c3a7e2e03a53d6493ec4e48cad3e70 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -134,7 +134,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent; @@ -1632,10 +1632,10 @@ index 0eb09ce5c850d85ffd7229d27cf06b3e0edda11b..cc1d7626a82881c4410d65c6a33dadae }; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1dc5dc35830437a8511b6fbaf96201ea7228aa59..e982442204972e140f0e5ebac777a931ea7394e2 100644 +index 5efe98cbcb44727fbbb195ff7007d01c823372b6..3338b424ca228693c199d022c01a81f9e2f9af0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -369,7 +369,7 @@ public final class CraftServer implements Server { +@@ -368,7 +368,7 @@ public final class CraftServer implements Server { this.saveCommandsConfig(); this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*"); this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions"); @@ -1644,7 +1644,7 @@ index 1dc5dc35830437a8511b6fbaf96201ea7228aa59..e982442204972e140f0e5ebac777a931 this.overrideSpawnLimits(); console.autosavePeriod = this.configuration.getInt("ticks-per.autosave"); this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose")); -@@ -2412,12 +2412,31 @@ public final class CraftServer implements Server { +@@ -2433,12 +2433,31 @@ public final class CraftServer implements Server { private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot() { @@ -1846,10 +1846,10 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e087ec1f456a8eff1071700fb98eac792ebb8d19..c53b2c452d8e42dca202c5fc7e8dcca4ccf8e4ba 100644 +index e37f69880c4b439245d7edb4c35418ed3da27a5f..3c6617170c618800940d5826c7e73a3ac7f32e19 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2532,6 +2532,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2470,6 +2470,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR)); } @@ -1865,16 +1865,16 @@ index e087ec1f456a8eff1071700fb98eac792ebb8d19..c53b2c452d8e42dca202c5fc7e8dcca4 public Player.Spigot spigot() diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 054fcc3713f02e358dfe049491c8d1689ccc750b..07c4d9cd5081378e1b903518f7174fca959cd9e3 100644 +index 4d94c3a19f98f78476ecc403f410d75a6ea57c2d..fcbf32a233c240dd45f75ee736bd102ce9f79332 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -1,5 +1,6 @@ package org.bukkit.craftbukkit.scheduler; +import co.aikar.timings.MinecraftTimings; // Paper + import com.google.common.base.Preconditions; import com.google.common.util.concurrent.ThreadFactoryBuilder; import java.util.ArrayList; - import java.util.Comparator; @@ -194,7 +195,8 @@ public class CraftScheduler implements BukkitScheduler { } @@ -1924,7 +1924,7 @@ index 054fcc3713f02e358dfe049491c8d1689ccc750b..07c4d9cd5081378e1b903518f7174fca this.debugHead = this.debugHead.getNextHead(currentTick); } -@@ -492,6 +494,7 @@ public class CraftScheduler implements BukkitScheduler { +@@ -491,6 +493,7 @@ public class CraftScheduler implements BukkitScheduler { } private void parsePending() { @@ -1932,7 +1932,7 @@ index 054fcc3713f02e358dfe049491c8d1689ccc750b..07c4d9cd5081378e1b903518f7174fca CraftTask head = this.head; CraftTask task = head.getNext(); CraftTask lastTask = head; -@@ -510,6 +513,7 @@ public class CraftScheduler implements BukkitScheduler { +@@ -509,6 +512,7 @@ public class CraftScheduler implements BukkitScheduler { task.setNext(null); } this.head = lastTask; @@ -2046,7 +2046,7 @@ index f97eccb6a17c7876e1e002d798eb67bbe80571a0..76effc345d362047e64d064eb64a5222 + } // Paper } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 39a9a47ce7150445e1b00a32152c0429b3114302..24319441ea6655c5cbd760c77cdde1e05c1877c4 100644 +index 23d594d7e24389e99f7c589d4cd7d6f3987d42c4..fda157258a5c96c8ef82dbad31b3a3da257f2fd2 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -224,6 +224,12 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -2062,7 +2062,7 @@ index 39a9a47ce7150445e1b00a32152c0429b3114302..24319441ea6655c5cbd760c77cdde1e0 public static byte toLegacyData(BlockState data) { return CraftLegacy.toLegacyData(data); -@@ -452,6 +458,13 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -450,6 +456,13 @@ public final class CraftMagicNumbers implements UnsafeValues { return CraftFeatureFlag.getFromNMS(namespacedKey); } @@ -2077,7 +2077,7 @@ index 39a9a47ce7150445e1b00a32152c0429b3114302..24319441ea6655c5cbd760c77cdde1e0 * 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 b7abac39ea685db1672dc7ba527bce8bfe025f8b..3e5d541d3d7fc3956b2fc68da9f22a0ab0367ce9 100644 +index 7cdfd82fdef19d5732ebc2126e2c377b441de596..ebd48f9977553174b14bdc7429c07d8352f5a297 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -27,7 +27,7 @@ import net.minecraft.world.entity.projectile.ThrownTrident; |