mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 00:47:38 +01:00
fix timings patch field use
This commit is contained in:
parent
1a33343012
commit
9d9fcf7e62
@ -712,7 +712,7 @@ index daedf825e68655492f5ab776bc206a5eb87c0170..7de24c39b460e43d27839b3821e67213
|
||||
} catch (Exception exception) {
|
||||
label25:
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1eb0809addfd77303b94bb594701ee7f38483909..337a1e89ba63471ea6b413cdec3e68d343a0b46b 100644
|
||||
index 1eb0809addfd77303b94bb594701ee7f38483909..206751253a02a5f144bbf7bfc5401577767e9030 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -186,7 +186,7 @@ import org.bukkit.craftbukkit.Main;
|
||||
@ -743,11 +743,11 @@ index 1eb0809addfd77303b94bb594701ee7f38483909..337a1e89ba63471ea6b413cdec3e68d3
|
||||
+ // Paper start
|
||||
+ boolean isOversleep = false;
|
||||
+ private boolean canOversleep() {
|
||||
+ return this.mayHaveDelayedTasks && Util.getMillis() < this.delayedTasksMaxNextTickTime;
|
||||
+ return this.mayHaveDelayedTasks && Util.getNanos() < this.delayedTasksMaxNextTickTimeNanos;
|
||||
+ }
|
||||
+
|
||||
+ private boolean canSleepForTickNoOversleep() {
|
||||
+ return this.forceTicks || this.runningTask() || Util.getMillis() < this.nextTickTime;
|
||||
+ return this.forceTicks || this.runningTask() || Util.getNanos() < this.nextTickTimeNanos;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
|
@ -16652,7 +16652,7 @@ index 884731fa4ebbbdc7c06ff670941f36ef3bf384ad..360ecf561cde34b07929519a67485e03
|
||||
DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, worldLoader.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::new);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 337a1e89ba63471ea6b413cdec3e68d343a0b46b..2021526bf6b8bdc286c31aaa62ab0235fac073cd 100644
|
||||
index 206751253a02a5f144bbf7bfc5401577767e9030..b608788552d380328b729ce6164e0fc60cf3fefd 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -300,7 +300,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 2021526bf6b8bdc286c31aaa62ab0235fac073cd..b082e17b9fbcc0e8ee881a89df1207d26bbeda0b 100644
|
||||
index b608788552d380328b729ce6164e0fc60cf3fefd..457b0f1f469436f6caa7473d91f906f1a61d6c74 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1559,7 +1559,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly.
|
||||
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b082e17b9fbcc0e8ee881a89df1207d26bbeda0b..2955636e2afd425988e9377d4bbe93258fd4e412 100644
|
||||
index 457b0f1f469436f6caa7473d91f906f1a61d6c74..2f04f10f5819be04b98ac0b52a2d7f4dfa525cea 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -283,7 +283,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -10,7 +10,7 @@ This patch adds a per-tick cache that is used for storing and retrieving
|
||||
an entity's exposure during an explosion.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 2955636e2afd425988e9377d4bbe93258fd4e412..6986109ca6de3c73d63c4539477997361044e64f 100644
|
||||
index 2f04f10f5819be04b98ac0b52a2d7f4dfa525cea..e0a2759169f41b68b8e1bc48f0b323c0a4bc1fed 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1492,6 +1492,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
|
||||
Saves on some object allocation and processing when no plugin listens to this
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 6986109ca6de3c73d63c4539477997361044e64f..3b13d7b760ac2df6e21c0ac7064fae8240866399 100644
|
||||
index e0a2759169f41b68b8e1bc48f0b323c0a4bc1fed..180bcaa2b5a74c527d8556301fb4a8161c76a64c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1453,6 +1453,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -18,7 +18,7 @@ index 3d2a689d11bfa230bab61a2a65c6051328f6b78d..e52644010dc2cf41bbf508b16b8ec2f0
|
||||
buf.writeComponent(this.playerPrefix);
|
||||
buf.writeComponent(this.playerSuffix);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 3b13d7b760ac2df6e21c0ac7064fae8240866399..450a9336a8a39a4ace147c73f82f9281fb5cc787 100644
|
||||
index 180bcaa2b5a74c527d8556301fb4a8161c76a64c..24f7ecc68c206346e4e2957bc27bf5579ba1b663 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -621,6 +621,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
|
||||
to stop IDE complaining about potential NPE
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 450a9336a8a39a4ace147c73f82f9281fb5cc787..ee751fb9580064682e650cf1c959a0e159a89bf2 100644
|
||||
index 24f7ecc68c206346e4e2957bc27bf5579ba1b663..3ecb45c98bfbc189e8235e980b14ee6b11536cc5 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -190,6 +190,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Async GameProfileCache saving
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ee751fb9580064682e650cf1c959a0e159a89bf2..e1849b879334bc9d17e6efeff061e1db6ab4ec7b 100644
|
||||
index 3ecb45c98bfbc189e8235e980b14ee6b11536cc5..77ea9b316f186243c74cc080cc7c382ab6666a21 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -960,7 +960,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result
|
||||
in corruption/dataloss.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e1849b879334bc9d17e6efeff061e1db6ab4ec7b..546cbd1c6086b737bcf68380e21feb9b1ffa2c2b 100644
|
||||
index 77ea9b316f186243c74cc080cc7c382ab6666a21..e91dd35a84dceae1ad9c5ede0565591e59d9d84f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -236,6 +236,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -252,7 +252,7 @@ index c3631efda9c7fa531a8a9f18fbee7b5f8655382b..769f6489632302627fa1730cc08e77f5
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 546cbd1c6086b737bcf68380e21feb9b1ffa2c2b..6e6a8a7d9af2e5de6782fd5935d22d7de3f248ee 100644
|
||||
index e91dd35a84dceae1ad9c5ede0565591e59d9d84f..721219807fd9abd12123cf0f3a0e3afd5839bf30 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -155,7 +155,7 @@ import org.slf4j.Logger;
|
||||
|
@ -181,7 +181,7 @@ index 0000000000000000000000000000000000000000..6b0bdc266109cdfb874f08bf74323603
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 6e6a8a7d9af2e5de6782fd5935d22d7de3f248ee..65625a84de2980f4d719cf5a2bec205cd1f3d835 100644
|
||||
index 721219807fd9abd12123cf0f3a0e3afd5839bf30..584dca7c8aa5fc3bc73101482acd6ad892019a3d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -3,6 +3,9 @@ package net.minecraft.server;
|
||||
|
@ -9,7 +9,7 @@ thread dumps at an interval until the point of crash.
|
||||
This will help diagnose what was going on in that time before the crash.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 65625a84de2980f4d719cf5a2bec205cd1f3d835..a2daac80fcbe51b7b68ab01416f052d01267f3fe 100644
|
||||
index 584dca7c8aa5fc3bc73101482acd6ad892019a3d..06d9cafeeedb3020c5e2313d32c6fe9285f99925 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1075,6 +1075,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -80,7 +80,7 @@ index aa52b271bd556a29f774fde375b713d0d187521b..8188febd6f1039a31619b42af23df18a
|
||||
return executorService;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a2daac80fcbe51b7b68ab01416f052d01267f3fe..0090f920f0e0460c5880f0661d29fdc95530abf2 100644
|
||||
index 06d9cafeeedb3020c5e2313d32c6fe9285f99925..eac560bf8af3c7c28ed5eed61ef352f52d823cef 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -312,6 +312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -8,7 +8,7 @@ the updates per world, so that we can re-use the same packet
|
||||
object for every player unless they have per-player time enabled.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 0090f920f0e0460c5880f0661d29fdc95530abf2..ec0d9a7221d61a38aabfbb270a122f1c3ceeed23 100644
|
||||
index eac560bf8af3c7c28ed5eed61ef352f52d823cef..ab6402fbe9da82c13d3eb56d22d82d10825105e6 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1475,12 +1475,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -53,7 +53,7 @@ index 5a1accff1a7dc2ab40224ec0952a287cd6099aee..2a88cf008c98284954108f2362f46ac1
|
||||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ec0d9a7221d61a38aabfbb270a122f1c3ceeed23..ca50e8240c62323c5a0e34aec91e6684a92189c4 100644
|
||||
index ab6402fbe9da82c13d3eb56d22d82d10825105e6..fc0ab6d0436aa6f79b13e0b755d445403fb81330 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -926,6 +926,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Server Tick Events
|
||||
Fires event at start and end of a server tick
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ca50e8240c62323c5a0e34aec91e6684a92189c4..9f0f73cca985ec3f55a7e83471c2aba8420c91e7 100644
|
||||
index fc0ab6d0436aa6f79b13e0b755d445403fb81330..af90bb579429336cc4e99386fd620c898c23d274 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1354,6 +1354,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world
|
||||
This lets you disable it for some worlds and lower it for others.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 9f0f73cca985ec3f55a7e83471c2aba8420c91e7..0752685c28b293a67560e6a81d1aea7bd11c526d 100644
|
||||
index af90bb579429336cc4e99386fd620c898c23d274..96fd66ed2742a79064852af6e936830ddaf14f4c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -768,30 +768,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
Loading…
Reference in New Issue
Block a user