You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the packet processor becomes closed during processing,
we would spin as hasPackets() would be true (if there were packets
queued) but executing packets would fail as it is closed.
index 4dd4cd13d8650b60332cff9c2677ec217affc60d..5692dee91321ce54a0100dc09475503dbf2b984f 100644
8077
+
index 4dd4cd13d8650b60332cff9c2677ec217affc60d..7a6dab62a76b70183441c44b654109fb759e2e72 100644
8078
8078
--- a/net/minecraft/server/MinecraftServer.java
8079
8079
+++ b/net/minecraft/server/MinecraftServer.java
8080
8080
@@ -196,7 +196,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -8469,7 +8469,7 @@ index 4dd4cd13d8650b60332cff9c2677ec217affc60d..5692dee91321ce54a0100dc09475503d
8469
8469
if (this.playerList.getPlayerCount() == 0 && !this.tickRateManager.isSprinting() && this.pluginsBlockingSleep.isEmpty()) { // Paper - API to allow/disallow tick sleeping
8470
8470
this.emptyTicks++;
8471
8471
} else {
8472
-
@@ -1599,24 +1688,53 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8472
+
@@ -1599,24 +1688,51 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8473
8473
level.getChunkSource().tick(() -> true, false);
8474
8474
}
8475
8475
// Paper end - avoid issues with certain tasks not processing during sleep
@@ -8501,9 +8501,7 @@ index 4dd4cd13d8650b60332cff9c2677ec217affc60d..5692dee91321ce54a0100dc09475503d
8501
8501
+ // run all player packets
8502
8502
+ for (ServerPlayer player : new java.util.ArrayList<>(region.world.getCurrentWorldData().getLocalPlayers())) {
@@ -2150,11 +2241,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8762
+
@@ -2150,11 +2239,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8765
8763
int i = 0;
8766
8764
8767
8765
for (ServerPlayer serverPlayer : this.getPlayerList().getPlayers()) {
@@ -8777,7 +8775,7 @@ index 4dd4cd13d8650b60332cff9c2677ec217affc60d..5692dee91321ce54a0100dc09475503d
8777
8775
i++;
8778
8776
// Paper end - Expand PlayerGameModeChangeEvent
8779
8777
}
8780
-
@@ -2176,7 +2269,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8778
+
@@ -2176,7 +2267,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8781
8779
}
8782
8780
8783
8781
public int getTickCount() {
@@ -8786,7 +8784,7 @@ index 4dd4cd13d8650b60332cff9c2677ec217affc60d..5692dee91321ce54a0100dc09475503d
8786
8784
}
8787
8785
8788
8786
public boolean isUnderSpawnProtection(ServerLevel level, BlockPos pos, Player player) {
8789
-
@@ -2212,6 +2305,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8787
+
@@ -2212,6 +2303,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8790
8788
}
8791
8789
8792
8790
public void invalidateStatus() {
@@ -8802,15 +8800,15 @@ index 4dd4cd13d8650b60332cff9c2677ec217affc60d..5692dee91321ce54a0100dc09475503d
8802
8800
this.lastServerStatus = 0L;
8803
8801
}
8804
8802
8805
-
@@ -2226,6 +2328,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8803
+
@@ -2226,6 +2326,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8806
8804
8807
8805
@Override
8808
8806
public void executeIfPossible(Runnable task) {
8809
8807
+ if (true) throw new UnsupportedOperationException(); // Folia - region threading
8810
8808
if (this.isStopped()) {
8811
8809
throw new io.papermc.paper.util.ServerStopRejectedExecutionException("Server already shutting down"); // Paper - do not prematurely disconnect players on stop
8812
8810
} else {
8813
-
@@ -2568,7 +2671,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8811
+
@@ -2568,7 +2669,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8814
8812
}
8815
8813
8816
8814
public long getAverageTickTimeNanos() {
@@ -8824,7 +8822,7 @@ index 4dd4cd13d8650b60332cff9c2677ec217affc60d..5692dee91321ce54a0100dc09475503d
8824
8822
}
8825
8823
8826
8824
public long[] getTickTimesNanos() {
8827
-
@@ -2812,13 +2920,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8825
+
@@ -2812,13 +2918,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8828
8826
}
8829
8827
8830
8828
public ProfileResults stopTimeProfiler() {
@@ -8839,7 +8837,7 @@ index 4dd4cd13d8650b60332cff9c2677ec217affc60d..5692dee91321ce54a0100dc09475503d
8839
8837
}
8840
8838
8841
8839
public int getMaxChainedNeighborUpdates() {
8842
-
@@ -3070,24 +3172,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8840
+
@@ -3070,24 +3170,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
8843
8841
8844
8842
// Paper start - API to check if the server is sleeping
@@ -1706,7 +1708,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
1483
+
@@ -1706,22 +1708,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
1484
1484
new com.destroystokyo.paper.event.server.ServerTickStartEvent((int)region.getCurrentTick()).callEvent(); // Paper - Server Tick Events // Folia - region threading
1485
1485
// Folia start - region threading
1486
1486
if (region != null) {
@@ -1491,9 +1491,7 @@ index aa2c7732749400ffaf6c0e3ff17b698959bfd5f4..9464cf735cedbf662355d9e86c37bb28
1491
1491
// run all player packets
1492
1492
for (ServerPlayer player : new java.util.ArrayList<>(region.world.getCurrentWorldData().getLocalPlayers())) {
0 commit comments