Compare commits

...

1 Commits

Author SHA1 Message Date
Spottedleaf
29f7062dd2 Switch to experimental SectorFile branch
https://github.com/PaperMC/Paper/pull/10231
2024-06-22 15:15:27 -07:00
4 changed files with 155 additions and 155 deletions

View File

@ -2,7 +2,7 @@ group=dev.folia
version=1.20.6-R0.1-SNAPSHOT version=1.20.6-R0.1-SNAPSHOT
mcVersion=1.20.6 mcVersion=1.20.6
paperRef=e41d44fa873466064879ebed476d280932379a9c paperRef=216b7043633e7041b67ead5265b1ee8c1657832b
org.gradle.caching=true org.gradle.caching=true
org.gradle.parallel=true org.gradle.parallel=true

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Build changes
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index 4998aff0b7cb084dcda15c6a18bbe45e99b6000a..eb2f9941b24af591f1e56339b97f5284a765cf81 100644 index 4649e14d279ab63e07658addf840e6e5da25d387..35de1dc2cb5b547e9265082d6d223e66c0cd5bc4 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { @@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
@ -17,7 +17,7 @@ index 4998aff0b7cb084dcda15c6a18bbe45e99b6000a..eb2f9941b24af591f1e56339b97f5284
// Paper start // Paper start
implementation("org.jline:jline-terminal-jansi:3.21.0") implementation("org.jline:jline-terminal-jansi:3.21.0")
implementation("net.minecrell:terminalconsoleappender:1.3.0") implementation("net.minecrell:terminalconsoleappender:1.3.0")
@@ -80,14 +80,14 @@ tasks.jar { @@ -82,14 +82,14 @@ tasks.jar {
val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
attributes( attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main", "Main-Class" to "org.bukkit.craftbukkit.Main",
@ -36,7 +36,7 @@ index 4998aff0b7cb084dcda15c6a18bbe45e99b6000a..eb2f9941b24af591f1e56339b97f5284
"Build-Number" to (build ?: ""), "Build-Number" to (build ?: ""),
"Build-Time" to Instant.now().toString(), "Build-Time" to Instant.now().toString(),
"Git-Branch" to gitBranch, // Paper "Git-Branch" to gitBranch, // Paper
@@ -144,7 +144,7 @@ fun TaskContainer.registerRunTask( @@ -146,7 +146,7 @@ fun TaskContainer.registerRunTask(
name: String, name: String,
block: JavaExec.() -> Unit block: JavaExec.() -> Unit
): TaskProvider<JavaExec> = register<JavaExec>(name) { ): TaskProvider<JavaExec> = register<JavaExec>(name) {

File diff suppressed because it is too large Load Diff

View File

@ -926,10 +926,10 @@ index 0000000000000000000000000000000000000000..95c0e6416afafbb633f0a30ae22df166
+ ) {} + ) {}
+} +}
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
index 67bf841878eb8e3703782caeb16db4803d13f0d9..0d8b2a4127e8c8e4970d220b8a2240490da6e7df 100644 index 6c071cbe9d0c987b63b31a1e7dd56a935961233c..96195372ced99a969dc2801445e3ab892dabfb27 100644
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java --- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java +++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
@@ -1462,8 +1462,11 @@ public final class ChunkHolderManager { @@ -1452,8 +1452,11 @@ public final class ChunkHolderManager {
} }
public boolean processTicketUpdates() { public boolean processTicketUpdates() {
@ -1466,7 +1466,7 @@ index 7570c2f6048f3b937fa331e1b65ee1a6a1e03498..355c8408da189a4805e206db0932c41f
this.profiler.popPush("players"); this.profiler.popPush("players");
MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index c75990f0549a1267ecb591227b0f97fa8707bc40..c547d51eebd965f2be7ac45bc0981626c0515ef1 100644 index c66ea1abea0ffa9092c269fcbfd3e6eda54055bc..062860fc13a4bebaadbb4bf7c6c173a3c0b570af 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java --- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -466,16 +466,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -466,16 +466,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@ -1491,7 +1491,7 @@ index c75990f0549a1267ecb591227b0f97fa8707bc40..c547d51eebd965f2be7ac45bc0981626
} // Paper } // Paper
} }
@@ -1094,9 +1099,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1073,9 +1078,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Folia start - region threading - replace entity tracking ticking // Folia start - region threading - replace entity tracking ticking
private void foliaEntityTrackerTick() { private void foliaEntityTrackerTick() {
@ -1506,7 +1506,7 @@ index c75990f0549a1267ecb591227b0f97fa8707bc40..c547d51eebd965f2be7ac45bc0981626
TrackedEntity tracker = entity.tracker; TrackedEntity tracker = entity.tracker;
if (tracker == null) { if (tracker == null) {
continue; continue;
@@ -1106,12 +1116,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1085,12 +1095,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
} }
// process unloads // process unloads
for (Entity entity : worldData.takeTrackingUnloads()) { for (Entity entity : worldData.takeTrackingUnloads()) {
@ -1638,10 +1638,10 @@ index 0b323e648d4dbe27822b77b846e4861b9264ca5f..69feb8ee4dd959554a6fb9ccae78e328
// Folia end - region threading // Folia end - region threading
// Paper end - optimise chunk tick iteration // Paper end - optimise chunk tick iteration
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 559b6d0e3611b506ff10e5ae7c42b35f0d710173..b194f3448b5199e1204da31e1408f2e80803a77d 100644 index 1c5c3622633dfb0a9108401cfc423582a60a6586..d4f3eadf721c35ce1f843c8de9971b6910ab8ff0 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -898,6 +898,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -871,6 +871,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void tick(BooleanSupplier shouldKeepTicking, io.papermc.paper.threadedregions.TickRegions.TickRegionData region) { // Folia - regionised ticking public void tick(BooleanSupplier shouldKeepTicking, io.papermc.paper.threadedregions.TickRegions.TickRegionData region) { // Folia - regionised ticking
final io.papermc.paper.threadedregions.RegionizedWorldData regionizedWorldData = this.getCurrentWorldData(); // Folia - regionised ticking final io.papermc.paper.threadedregions.RegionizedWorldData regionizedWorldData = this.getCurrentWorldData(); // Folia - regionised ticking
@ -1649,7 +1649,7 @@ index 559b6d0e3611b506ff10e5ae7c42b35f0d710173..b194f3448b5199e1204da31e1408f2e8
ProfilerFiller gameprofilerfiller = this.getProfiler(); ProfilerFiller gameprofilerfiller = this.getProfiler();
regionizedWorldData.setHandlingTick(true); // Folia - regionised ticking regionizedWorldData.setHandlingTick(true); // Folia - regionised ticking
@@ -926,9 +927,13 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -899,9 +900,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (!this.isDebug() && flag) { if (!this.isDebug() && flag) {
j = regionizedWorldData.getRedstoneGameTime(); // Folia - region threading j = regionizedWorldData.getRedstoneGameTime(); // Folia - region threading
gameprofilerfiller.push("blockTicks"); gameprofilerfiller.push("blockTicks");
@ -1663,7 +1663,7 @@ index 559b6d0e3611b506ff10e5ae7c42b35f0d710173..b194f3448b5199e1204da31e1408f2e8
gameprofilerfiller.pop(); gameprofilerfiller.pop();
} }
this.timings.scheduledBlocks.stopTiming(); // Paper this.timings.scheduledBlocks.stopTiming(); // Paper
@@ -936,18 +941,24 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -909,18 +914,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
gameprofilerfiller.popPush("raid"); gameprofilerfiller.popPush("raid");
if (flag) { if (flag) {
this.timings.raids.startTiming(); // Paper - timings this.timings.raids.startTiming(); // Paper - timings
@ -1688,7 +1688,7 @@ index 559b6d0e3611b506ff10e5ae7c42b35f0d710173..b194f3448b5199e1204da31e1408f2e8
this.timings.doSounds.stopTiming(); // Spigot this.timings.doSounds.stopTiming(); // Spigot
} }
@@ -963,6 +974,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -936,6 +947,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
gameprofilerfiller.push("entities"); gameprofilerfiller.push("entities");
this.timings.tickEntities.startTiming(); // Spigot this.timings.tickEntities.startTiming(); // Spigot
if (this.dragonFight != null && flag) { if (this.dragonFight != null && flag) {
@ -1696,7 +1696,7 @@ index 559b6d0e3611b506ff10e5ae7c42b35f0d710173..b194f3448b5199e1204da31e1408f2e8
if (io.papermc.paper.util.TickThread.isTickThreadFor(this, this.dragonFight.origin)) { // Folia - region threading if (io.papermc.paper.util.TickThread.isTickThreadFor(this, this.dragonFight.origin)) { // Folia - region threading
gameprofilerfiller.push("dragonFight"); gameprofilerfiller.push("dragonFight");
this.dragonFight.tick(); this.dragonFight.tick();
@@ -975,10 +987,12 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -948,10 +960,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
fightCenter fightCenter
); );
} // Folia end - region threading } // Folia end - region threading
@ -1709,7 +1709,7 @@ index 559b6d0e3611b506ff10e5ae7c42b35f0d710173..b194f3448b5199e1204da31e1408f2e8
regionizedWorldData.forEachTickingEntity((entity) -> { // Folia - regionised ticking regionizedWorldData.forEachTickingEntity((entity) -> { // Folia - regionised ticking
if (!entity.isRemoved()) { if (!entity.isRemoved()) {
if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed
@@ -1006,10 +1020,13 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -979,10 +993,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
} }
} }
}); });
@ -1723,7 +1723,7 @@ index 559b6d0e3611b506ff10e5ae7c42b35f0d710173..b194f3448b5199e1204da31e1408f2e8
} }
gameprofilerfiller.push("entityManagement"); gameprofilerfiller.push("entityManagement");
@@ -1069,12 +1086,15 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1042,12 +1059,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
} }
public void tickCustomSpawners(boolean spawnMonsters, boolean spawnAnimals) { public void tickCustomSpawners(boolean spawnMonsters, boolean spawnAnimals) {
@ -1739,7 +1739,7 @@ index 559b6d0e3611b506ff10e5ae7c42b35f0d710173..b194f3448b5199e1204da31e1408f2e8
} }
} }
@@ -1524,6 +1544,11 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1497,6 +1517,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Paper start- timings // Paper start- timings
final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(entity); final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(entity);
timer = isActive ? entity.getType().tickTimer.startTiming() : entity.getType().inactiveTickTimer.startTiming(); // Paper timer = isActive ? entity.getType().tickTimer.startTiming() : entity.getType().inactiveTickTimer.startTiming(); // Paper
@ -1751,7 +1751,7 @@ index 559b6d0e3611b506ff10e5ae7c42b35f0d710173..b194f3448b5199e1204da31e1408f2e8
try { try {
// Paper end - timings // Paper end - timings
entity.setOldPosAndRot(); entity.setOldPosAndRot();
@@ -1549,7 +1574,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1522,7 +1547,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Folia end - region threading // Folia end - region threading
} else { entity.inactiveTick(); } // Paper - EAR 2 } else { entity.inactiveTick(); } // Paper - EAR 2
this.getProfiler().pop(); this.getProfiler().pop();
@ -1760,7 +1760,7 @@ index 559b6d0e3611b506ff10e5ae7c42b35f0d710173..b194f3448b5199e1204da31e1408f2e8
Iterator iterator = entity.getPassengers().iterator(); Iterator iterator = entity.getPassengers().iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -1573,6 +1598,11 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1546,6 +1571,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Paper - EAR 2 // Paper - EAR 2
final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(passenger); final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(passenger);
co.aikar.timings.Timing timer = isActive ? passenger.getType().passengerTickTimer.startTiming() : passenger.getType().passengerInactiveTickTimer.startTiming(); // Paper co.aikar.timings.Timing timer = isActive ? passenger.getType().passengerTickTimer.startTiming() : passenger.getType().passengerInactiveTickTimer.startTiming(); // Paper
@ -1772,7 +1772,7 @@ index 559b6d0e3611b506ff10e5ae7c42b35f0d710173..b194f3448b5199e1204da31e1408f2e8
try { try {
// Paper end // Paper end
passenger.setOldPosAndRot(); passenger.setOldPosAndRot();
@@ -1612,7 +1642,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1585,7 +1615,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.tickPassenger(passenger, entity2); this.tickPassenger(passenger, entity2);
} }