Update Paper

This commit is contained in:
Spottedleaf 2025-09-03 11:20:58 -07:00
parent 890349d47e
commit 319dc6e59f
5 changed files with 56 additions and 69 deletions

View File

@ -1,26 +0,0 @@
package io.papermc.paper.threadedregions;
import org.bukkit.event.HandlerList;
import org.bukkit.event.server.ServerEvent;
import org.jetbrains.annotations.NotNull;
/**
* This event is called after the server is initialised but <b>before</b> the server begins ticking regions in parallel.
* Plugins may use this as a hook to run post initialisation logic without worrying about the possibility that
* regions are ticking in parallel.
*/
public class RegionizedServerInitEvent extends ServerEvent {
private static final HandlerList handlers = new HandlerList();
@NotNull
@Override
public HandlerList getHandlers() {
return handlers;
}
@NotNull
public static HandlerList getHandlerList() {
return handlers;
}
}

View File

@ -8207,7 +8207,7 @@ index 4535858701b2bb232b9d2feb2af6551526232ddc..4a7de2ed6eabe919f0c33de49ed7fab7
}
}
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1e9d67fda 100644
index 9243bb11e3f968d0bf0eb2e3dc9295c0232bc15d..812629d9b5e763cd98766d6a72e31d5d114e35bf 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -184,7 +184,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -8521,7 +8521,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
// Spigot start
// Paper start
LOGGER.info("Running delayed init tasks");
@@ -1219,7 +1313,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1220,7 +1314,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
// Paper start - further improve server tick loop
currentTime = Util.getNanos();
@ -8530,7 +8530,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
final long diff = currentTime - tickSection;
final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
tps1.add(currentTps, diff);
@@ -1238,7 +1332,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1239,7 +1333,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
boolean flag = l == 0L;
if (this.debugCommandProfilerDelayStart) {
this.debugCommandProfilerDelayStart = false;
@ -8539,7 +8539,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
}
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
@@ -1249,7 +1343,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1250,7 +1344,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ProfilerFiller profilerFiller = Profiler.get();
profilerFiller.push("tick");
this.tickFrame.start();
@ -8548,7 +8548,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
// Paper start - rewrite chunk system
final Throwable crash = this.chunkSystemCrash;
if (crash != null) {
@@ -1404,28 +1498,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1405,28 +1499,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public TickTask wrapRunnable(Runnable runnable) {
@ -8581,7 +8581,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
if (super.pollTask()) {
this.moonrise$executeMidTickTasks(); // Paper - rewrite chunk system
return true;
@@ -1445,6 +1535,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1446,6 +1536,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public void doRunTask(TickTask task) {
@ -8589,7 +8589,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
Profiler.get().incrementCounter("runTask");
super.doRunTask(task);
}
@@ -1486,12 +1577,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1487,12 +1578,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return false;
}
@ -8608,7 +8608,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
if (this.playerList.getPlayerCount() == 0 && !this.tickRateManager.isSprinting() && this.pluginsBlockingSleep.isEmpty()) { // Paper - API to allow/disallow tick sleeping
this.emptyTicks++;
} else {
@@ -1516,24 +1610,56 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1517,24 +1611,56 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
level.getChunkSource().tick(() -> true, false);
}
// Paper end - avoid issues with certain tasks not processing during sleep
@ -8672,7 +8672,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
// Paper start - Incremental chunk and player saving
final ProfilerFiller profiler = Profiler.get();
int playerSaveInterval = io.papermc.paper.configuration.GlobalConfiguration.get().playerAutoSave.rate;
@@ -1541,15 +1667,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1542,15 +1668,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
playerSaveInterval = autosavePeriod;
}
profiler.push("save");
@ -8691,7 +8691,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
}
}
} finally {
@@ -1559,32 +1685,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1560,32 +1686,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper end - Incremental chunk and player saving
ProfilerFiller profilerFiller = Profiler.get();
@ -8731,7 +8731,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
LOGGER.debug("Autosave started");
ProfilerFiller profilerFiller = Profiler.get();
profilerFiller.push("save");
@@ -1599,30 +1712,22 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1600,30 +1713,22 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
@ -8770,7 +8770,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
private ServerStatus buildServerStatus() {
ServerStatus.Players players = this.buildPlayerStatus();
return new ServerStatus(
@@ -1635,7 +1740,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1636,7 +1741,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
private ServerStatus.Players buildPlayerStatus() {
@ -8779,7 +8779,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
int maxPlayers = this.getMaxPlayers();
if (this.hidesOnlinePlayers()) {
return new ServerStatus.Players(maxPlayers, players.size(), List.of());
@@ -1654,43 +1759,35 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1655,43 +1760,35 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
@ -8836,7 +8836,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
continue;
}
ServerPlayer entityplayer = (ServerPlayer) entityhuman;
@@ -1703,12 +1800,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1704,12 +1801,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
@ -8852,7 +8852,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
profilerFiller.push(() -> serverLevel + " " + serverLevel.dimension().location());
/* Drop global time updates
if (this.tickCount % 20 == 0) {
@@ -1721,7 +1815,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1722,7 +1816,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
profilerFiller.push("tick");
try {
@ -8861,7 +8861,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
} catch (Throwable var7) {
CrashReport crashReport = CrashReport.forThrowable(var7, "Exception ticking world");
serverLevel.fillReportDetails(crashReport);
@@ -1730,27 +1824,27 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1731,27 +1825,27 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
profilerFiller.pop();
profilerFiller.pop();
@ -8895,7 +8895,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
serverPlayer.connection.chunkSender.sendNextChunks(serverPlayer);
serverPlayer.connection.resumeFlushing();
}
@@ -2076,7 +2170,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2077,7 +2171,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public int getTickCount() {
@ -8904,7 +8904,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
}
public int getSpawnProtectionRadius() {
@@ -2131,6 +2225,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2132,6 +2226,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void invalidateStatus() {
@ -8920,7 +8920,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
this.lastServerStatus = 0L;
}
@@ -2145,6 +2248,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2146,6 +2249,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public void executeIfPossible(Runnable task) {
@ -8928,7 +8928,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
if (this.isStopped()) {
throw new io.papermc.paper.util.ServerStopRejectedExecutionException("Server already shutting down"); // Paper - do not prematurely disconnect players on stop
} else {
@@ -2459,7 +2563,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2460,7 +2564,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public long getAverageTickTimeNanos() {
@ -8942,7 +8942,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
}
public long[] getTickTimesNanos() {
@@ -2704,13 +2813,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2705,13 +2814,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public ProfileResults stopTimeProfiler() {
@ -8957,7 +8957,7 @@ index 574a7c232150642ee6872ce9da3bf742673066ee..5a8cbe318e9a6ad528f881cbfac213b1
}
public int getMaxChainedNeighborUpdates() {
@@ -2899,24 +3002,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2900,24 +3003,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper start - API to check if the server is sleeping
public boolean isTickPaused() {
@ -12826,7 +12826,7 @@ index f02800e4e941b05bde6f0d5fac76e2b6ec5b9832..8150b16c196edcb226be9268ea6e0012
// Paper start - add proper async disconnect
diff --git a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
index c032d5beb28a2181697cc43bd295d839464d34ed..df4fa680d52a67c506cf0b5f3777d258c83f265f 100644
index 7f3379a617932f1e0b0344df75566d2dc6612359..884b7b8c4581742a1ca965d453773dc10b76d5f9 100644
--- a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
@@ -48,6 +48,7 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
@ -14101,7 +14101,7 @@ index a3c7d68469075bf8d33f2016149a181b0fb87e0e..73c581d3ee21d8fa96eae3e47afd6ce2
return blockToFallLocation(blockState);
} else {
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index dbf498e194b6af248ecdf06da697cfa42da467ff..cd6ce03d3a7cc66f8ca276d8f5be99a9060b408b 100644
index 9a102b2c58446bd0aac5bd7f00e647f0270e7983..8a17bb73522bf16a35b3b15f318d2de97f2d007f 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -156,7 +156,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@ -15275,7 +15275,7 @@ index ff660a5756c76abdac5536df80caced7a00c83c6..6c48bf2742199184cd94d08f1d5367b0
) {
Optional<UUID> optional = input.read(key, UUIDUtil.CODEC);
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 0c52e315557e1dae6a852694786e72241fff1e29..2cb06dbf7a1d172ff124e39cb150696708d55460 100644
index 0268e02d2ef2cb3d699644a804e23a6da4521f4c..5f58cbbc48045dfeb418e3b604e6172b4c39249d 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -261,7 +261,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@ -15405,7 +15405,7 @@ index 0c52e315557e1dae6a852694786e72241fff1e29..2cb06dbf7a1d172ff124e39cb1506967
if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) {
Location from = new Location(this.level().getWorld(), this.xo, this.yo, this.zo, this.yRotO, this.xRotO);
Location to = new Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
@@ -4254,7 +4278,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -4270,7 +4294,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
boolean flag = false;
BlockPos blockPos = BlockPos.containing(x, y, z);
Level level = this.level();
@ -15414,7 +15414,7 @@ index 0c52e315557e1dae6a852694786e72241fff1e29..2cb06dbf7a1d172ff124e39cb1506967
boolean flag1 = false;
while (!flag1 && blockPos.getY() > level.getMinY()) {
@@ -4416,6 +4440,11 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -4432,6 +4456,11 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
this.setXRot(0.0F);
}
});
@ -18330,7 +18330,7 @@ index 0e87d20639c382be2221d73c7498480d21ebeafb..0d7d2fe54628ae6ef3d579d6c3d031b9
if (gameTime % 40L == 0L) {
boolean flag = updateShape(level, pos, list);
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
index 800b7e78ae989868ed0b9e060c80dcd002759412..5de769e7bd56bb3355c3c711d46ce5e103ea4409 100644
index 01ed25d1f895d94485b5fecd98476534cbb26930..25ad8bb4099fefaf51f38a8bba70ea3594d0d914 100644
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
@@ -35,7 +35,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen

View File

@ -1458,10 +1458,10 @@ index 4a7de2ed6eabe919f0c33de49ed7fab75abac1b4..7280ca2250ade4166a1a883b205bbc89
if (var4 instanceof ReportedException reportedException && reportedException.getCause() instanceof OutOfMemoryError) {
throw makeReportedException(var4, packet, processor);
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 5a8cbe318e9a6ad528f881cbfac213b1e9d67fda..0238bce5c050808798f092dc07a0206502704bc9 100644
index 812629d9b5e763cd98766d6a72e31d5d114e35bf..92ba82b9040762d11d39b3aed89fbc098eb93623 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1580,6 +1580,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1581,6 +1581,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Folia start - region threading
public void tickServer(long startTime, long scheduledEnd, long targetBuffer,
io.papermc.paper.threadedregions.TickRegions.TickRegionData region) {
@ -1469,7 +1469,7 @@ index 5a8cbe318e9a6ad528f881cbfac213b1e9d67fda..0238bce5c050808798f092dc07a02065
// Folia end - region threading
org.spigotmc.WatchdogThread.tick(); // Spigot
long nanos = startTime; // Folia - region threading
@@ -1617,6 +1618,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1618,6 +1619,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
@ -1477,7 +1477,7 @@ index 5a8cbe318e9a6ad528f881cbfac213b1e9d67fda..0238bce5c050808798f092dc07a02065
// Folia start - region threading
region.world.getCurrentWorldData().updateTickData();
if (region.world.checkInitialised.get() != ServerLevel.WORLD_INIT_CHECKED) {
@@ -1638,17 +1640,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1639,17 +1641,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
new com.destroystokyo.paper.event.server.ServerTickStartEvent((int)region.getCurrentTick()).callEvent(); // Paper - Server Tick Events // Folia - region threading
// Folia start - region threading
if (region != null) {
@ -1504,7 +1504,7 @@ index 5a8cbe318e9a6ad528f881cbfac213b1e9d67fda..0238bce5c050808798f092dc07a02065
}
// Folia end - region threading
//this.tickCount++; // Folia - region threading
@@ -1668,6 +1679,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1669,6 +1680,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
profiler.push("save");
final boolean fullSave = autosavePeriod > 0 && io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick() % autosavePeriod == 0; // Folia - region threading
@ -1512,7 +1512,7 @@ index 5a8cbe318e9a6ad528f881cbfac213b1e9d67fda..0238bce5c050808798f092dc07a02065
try {
this.isSaving = true;
if (playerSaveInterval > 0) {
@@ -1681,6 +1693,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1682,6 +1694,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} finally {
this.isSaving = false;
}
@ -1520,7 +1520,7 @@ index 5a8cbe318e9a6ad528f881cbfac213b1e9d67fda..0238bce5c050808798f092dc07a02065
profiler.pop();
// Paper end - Incremental chunk and player saving
@@ -1762,6 +1775,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1763,6 +1776,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Folia - region threading - moved to regionised data
protected void tickChildren(BooleanSupplier hasTimeLeft, io.papermc.paper.threadedregions.TickRegions.TickRegionData region) { // Folia - region threading
@ -1528,7 +1528,7 @@ index 5a8cbe318e9a6ad528f881cbfac213b1e9d67fda..0238bce5c050808798f092dc07a02065
final io.papermc.paper.threadedregions.RegionizedWorldData regionizedWorldData = io.papermc.paper.threadedregions.TickRegionScheduler.getCurrentRegionizedWorldData(); // Folia - regionised ticking
ProfilerFiller profilerFiller = Profiler.get();
//this.getPlayerList().getPlayers().forEach(serverPlayer1 -> serverPlayer1.connection.suspendFlushing()); // Folia - region threading
@@ -1815,7 +1829,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1816,7 +1830,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
profilerFiller.push("tick");
try {
@ -1538,7 +1538,7 @@ index 5a8cbe318e9a6ad528f881cbfac213b1e9d67fda..0238bce5c050808798f092dc07a02065
} catch (Throwable var7) {
CrashReport crashReport = CrashReport.forThrowable(var7, "Exception ticking world");
serverLevel.fillReportDetails(crashReport);
@@ -1829,7 +1845,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1830,7 +1846,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
//this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked // Folia - region threading
profilerFiller.popPush("connection");

View File

@ -434,10 +434,10 @@ index 3f5e76e4df8ff8152060449f89b522910adee834..04826c91b624cf6e3c8f762a17de52f3
+ // Folia end - threaded regions
}
diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
index 4a974026967fb09a28812575c9d6166eec2560ae..e9594279677040d4860683a1475c269871b211ff 100644
index bd1f0ba488ff9f12de4b85c97617638592bab09c..5c735a574a4233b87f19d7b22514a8591f642161 100644
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
@@ -497,6 +497,7 @@ public class WorldConfiguration extends ConfigurationPart {
@@ -500,6 +500,7 @@ public class WorldConfiguration extends ConfigurationPart {
public Chunks chunks;
public class Chunks extends ConfigurationPart {
@ -445,7 +445,7 @@ index 4a974026967fb09a28812575c9d6166eec2560ae..e9594279677040d4860683a1475c2698
public AutosavePeriod autoSaveInterval = AutosavePeriod.def();
public int maxAutoSaveChunksPerTick = 24;
public int fixedChunkInhabitedTime = -1;
@@ -515,6 +516,7 @@ public class WorldConfiguration extends ConfigurationPart {
@@ -518,6 +519,7 @@ public class WorldConfiguration extends ConfigurationPart {
@PostProcess
private void postProcess() {
@ -453,6 +453,19 @@ index 4a974026967fb09a28812575c9d6166eec2560ae..e9594279677040d4860683a1475c2698
FeatureHooks.setPlayerChunkUnloadDelay(this.delayChunkUnloadsBy.ticks());
}
}
diff --git a/src/main/java/io/papermc/paper/console/BrigadierCommandCompleter.java b/src/main/java/io/papermc/paper/console/BrigadierCommandCompleter.java
index c2174c8ae594fe8ec7741ecdbb53e9acc2bbf5b2..0762cfa9748ed6feff74abe060756d7ad55f96cd 100644
--- a/src/main/java/io/papermc/paper/console/BrigadierCommandCompleter.java
+++ b/src/main/java/io/papermc/paper/console/BrigadierCommandCompleter.java
@@ -46,7 +46,7 @@ public final class BrigadierCommandCompleter {
final ParseResults<CommandSourceStack> results = dispatcher.parse(new StringReader(line.line()), this.commandSourceStack.get());
this.addCandidates(
candidates,
- CompletableFuture.supplyAsync(() -> dispatcher.getCompletionSuggestions(results, line.cursor()), this.server::scheduleOnMain)
+ CompletableFuture.supplyAsync(() -> dispatcher.getCompletionSuggestions(results, line.cursor()), io.papermc.paper.threadedregions.RegionizedServer.getInstance()::addTask) // Folia - region threading
.thenCompose(Function.identity())
.join()
.getList(),
diff --git a/src/main/java/io/papermc/paper/entity/PaperSchoolableFish.java b/src/main/java/io/papermc/paper/entity/PaperSchoolableFish.java
index 04c8213ae6f38902e88f8dcdc77ad70dbcd36afa..b663b38529f25756cc6f8130e2e4e02fe36caa21 100644
--- a/src/main/java/io/papermc/paper/entity/PaperSchoolableFish.java
@ -769,7 +782,7 @@ index 8492a06883e2ff597bbbdaa74fe5e5cdd0a0a1b1..ff6d200c3c3ecb958086f11dff39357d
MinecraftServer.LOGGER.warn("Asynchronous " + reason + "!", new IllegalStateException());
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 32fe51b19323e3c4c56e7f9e621e6e808ee5fe38..9b182315682b5795b2cb6438ea440591ddddc5a3 100644
index 1d12a870a2f239bf95df639ef350b38911558199..53c8009cd4886ddcf1f2ea72b6e51b308c72719c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -318,7 +318,7 @@ public final class CraftServer implements Server {
@ -3774,7 +3787,7 @@ index 9851c3890c9377d9fd1813f82766c2841ae48fd4..034b210ca024dcb3d9f59f1cdeef8c16
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 08db922da37984b82f57c210f6613543d32303bc..c586e42c5056fddb7641d5105950c0565030a983 100644
index 49ce3fdcb8f3f6125e60bf667d79f23cc1629085..00416e0fe016b1e6502a0b57ffc623c68e8f2893 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -819,7 +819,7 @@ public class CraftEventFactory {

View File

@ -2,7 +2,7 @@ group=dev.folia
version=1.21.8-R0.1-SNAPSHOT
mcVersion=1.21.8
paperRef=38fe16b5f274068df445ce89d84cd39492d1c5da
paperRef=65641d1006c80ee015edeb72ab78de7d9cde67c7
org.gradle.configuration-cache=true
org.gradle.caching=true