Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@45e01a2 Use correct max stack size in crafter (#10057)
PaperMC/Paper@d11a588 Remove duplicate code in chunk tick iteration (#10056)
PaperMC/Paper@b4c9e7e add missing Experimental annotations (#10012)
This commit is contained in:
granny
2023-12-21 17:32:35 -08:00
parent 4d698b447c
commit 75a886f8bb
4 changed files with 23 additions and 26 deletions

View File

@@ -2,7 +2,7 @@ group = org.purpurmc.purpur
version = 1.20.4-R0.1-SNAPSHOT
mcVersion = 1.20.4
paperCommit = 086ca616d8bd98dde4e4859d29ce89314494d90c
paperCommit = b4c9e7e5d40fd4a0a7fea270fd4ebb72b38fa0fc
org.gradle.caching = true
org.gradle.parallel = true

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack convenience methods
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 9f86ad25a57b3f6e6bda1ce657833837cb3b2292..7a8a2387d8ae5aae44325da9277e8284b4caa8c0 100644
index f9af60356da4668cec8b24e73f5747ab82e35a91..b304ad1307cdd6785653b1eab9781e070fb14c5a 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -11500,4 +11500,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -11557,4 +11557,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
public boolean isEnabledByFeature(@NotNull World world) {
return Bukkit.getDataPackManager().isEnabledByFeature(this, world);
}

View File

@@ -319,7 +319,7 @@ index caa73632aee15583c6b6ed12a668c8f49b794708..c5a4a6a61c160e1cc29ee3c7d03debc0
}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 6e212f672579a3e08dc362c287be59ca5170d717..3c16bf34a63ca1391268da3678ea3b59fa5d4190 100644
index 44ada45d9bf2d9b48e5de1c3cb1a855902f3884b..e2b02a6f18932478c534a4eb4d349badadbe04a2 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -293,10 +293,10 @@ public class ServerChunkCache extends ChunkSource {
@@ -387,16 +387,14 @@ index 6e212f672579a3e08dc362c287be59ca5170d717..3c16bf34a63ca1391268da3678ea3b59
this.level.getProfiler().pop();
this.clearCache();
}
@@ -516,7 +516,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -517,13 +517,13 @@ public class ServerChunkCache extends ChunkSource {
gameprofilerfiller.push("pollingChunks");
gameprofilerfiller.push("filteringLoadedChunks");
// Paper - optimise chunk tick iteration
- if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper
+ // if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper // Purpur
+ //if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper // Purpur
// Paper start - optimise chunk tick iteration
ChunkMap playerChunkMap = this.chunkMap;
@@ -556,7 +556,7 @@ public class ServerChunkCache extends ChunkSource {
// Paper - optimise chunk tick iteration
if (this.level.getServer().tickRateManager().runsNormally()) {
gameprofilerfiller.popPush("naturalSpawnCount");
@@ -405,7 +403,7 @@ index 6e212f672579a3e08dc362c287be59ca5170d717..3c16bf34a63ca1391268da3678ea3b59
int k = this.distanceManager.getNaturalSpawnChunkCount();
// Paper start - per player mob spawning
int naturalSpawnChunkCount = k;
@@ -581,7 +581,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -548,7 +548,7 @@ public class ServerChunkCache extends ChunkSource {
spawnercreature_d = NaturalSpawner.createState(naturalSpawnChunkCount, this.level.getAllEntities(), this::getFullChunk, !this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new LocalMobCapCalculator(this.chunkMap) : null, false);
}
// Paper end
@@ -414,7 +412,7 @@ index 6e212f672579a3e08dc362c287be59ca5170d717..3c16bf34a63ca1391268da3678ea3b59
this.lastSpawnState = spawnercreature_d;
gameprofilerfiller.popPush("spawnAndTick");
@@ -688,19 +688,19 @@ public class ServerChunkCache extends ChunkSource {
@@ -657,19 +657,19 @@ public class ServerChunkCache extends ChunkSource {
}
}
// Paper end - optimise chunk tick iteration
@@ -438,7 +436,7 @@ index 6e212f672579a3e08dc362c287be59ca5170d717..3c16bf34a63ca1391268da3678ea3b59
// Paper start - optimise chunk tick iteration
if (!this.chunkMap.needsChangeBroadcasting.isEmpty()) {
it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<ChunkHolder> copy = this.chunkMap.needsChangeBroadcasting.clone();
@@ -714,7 +714,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -683,7 +683,7 @@ public class ServerChunkCache extends ChunkSource {
}
}
// Paper end - optimise chunk tick iteration
@@ -631,7 +629,7 @@ index 90328eec0aefa1447e03e0003f43f2a27959cab0..3c0b3db58f31c7b63ab798a7be6076c6
} else if (close) { chunkproviderserver.close(false); } // Paper - rewrite chunk system
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 417dd74c422411e9f85694e3a1a1e31024f5b55e..823f513f19dd5399b84342e2a860c3637bbf0516 100644
index a8c7534e50e89b281cc9dca8bacc3a00c219bcb0..bff8e4f1b6494ca9728a717199a051b3256cbd16 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2452,7 +2452,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@@ -476,7 +476,7 @@ index c5a4a6a61c160e1cc29ee3c7d03debc0f51ce204..710156f616afd0a9666b3eede98fb19c
public boolean hasWork() {
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 3c16bf34a63ca1391268da3678ea3b59fa5d4190..1a22b58e2ce7a4e7034898e9fe24f238d6a7ec22 100644
index e2b02a6f18932478c534a4eb4d349badadbe04a2..248bb50532e2dfab7116f72dd2469620cf22988b 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -274,16 +274,16 @@ public class ServerChunkCache extends ChunkSource {
@@ -542,7 +542,7 @@ index 3c16bf34a63ca1391268da3678ea3b59fa5d4190..1a22b58e2ce7a4e7034898e9fe24f238
this.clearCache();
}
@@ -512,10 +512,10 @@ public class ServerChunkCache extends ChunkSource {
@@ -512,17 +512,17 @@ public class ServerChunkCache extends ChunkSource {
this.lastInhabitedUpdate = i;
if (!this.level.isDebug()) {
@@ -553,11 +553,10 @@ index 3c16bf34a63ca1391268da3678ea3b59fa5d4190..1a22b58e2ce7a4e7034898e9fe24f238
- gameprofilerfiller.push("filteringLoadedChunks");
+ //gameprofilerfiller.push("pollingChunks"); // Purpur
+ //gameprofilerfiller.push("filteringLoadedChunks"); // Purpur
// if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper // Purpur
// Paper - optimise chunk tick iteration
//if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper // Purpur
// Paper start - optimise chunk tick iteration
@@ -555,7 +555,7 @@ public class ServerChunkCache extends ChunkSource {
// Paper end - optimise chunk tick iteration
// Paper - optimise chunk tick iteration
if (this.level.getServer().tickRateManager().runsNormally()) {
- gameprofilerfiller.popPush("naturalSpawnCount");
@@ -565,7 +564,7 @@ index 3c16bf34a63ca1391268da3678ea3b59fa5d4190..1a22b58e2ce7a4e7034898e9fe24f238
//this.level.timings.countNaturalMobs.startTiming(); // Paper - timings // Purpur
int k = this.distanceManager.getNaturalSpawnChunkCount();
// Paper start - per player mob spawning
@@ -584,7 +584,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -551,7 +551,7 @@ public class ServerChunkCache extends ChunkSource {
// this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings // Purpur
this.lastSpawnState = spawnercreature_d;
@@ -574,7 +573,7 @@ index 3c16bf34a63ca1391268da3678ea3b59fa5d4190..1a22b58e2ce7a4e7034898e9fe24f238
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
// Paper start - optimise chunk tick iteration
@@ -690,7 +690,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -659,7 +659,7 @@ public class ServerChunkCache extends ChunkSource {
// Paper end - optimise chunk tick iteration
// this.level.timings.chunkTicks.stopTiming(); // Paper // Purpur
@@ -583,7 +582,7 @@ index 3c16bf34a63ca1391268da3678ea3b59fa5d4190..1a22b58e2ce7a4e7034898e9fe24f238
if (flag) {
//try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings // Purpur
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
@@ -698,7 +698,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -667,7 +667,7 @@ public class ServerChunkCache extends ChunkSource {
}
}
@@ -592,7 +591,7 @@ index 3c16bf34a63ca1391268da3678ea3b59fa5d4190..1a22b58e2ce7a4e7034898e9fe24f238
// Paper - optimise chunk tick iteration
//this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing // Purpur
// Paper start - optimise chunk tick iteration
@@ -716,8 +716,8 @@ public class ServerChunkCache extends ChunkSource {
@@ -685,8 +685,8 @@ public class ServerChunkCache extends ChunkSource {
// Paper end - optimise chunk tick iteration
//this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing // Purpur
// Paper - optimise chunk tick iteration
@@ -603,7 +602,7 @@ index 3c16bf34a63ca1391268da3678ea3b59fa5d4190..1a22b58e2ce7a4e7034898e9fe24f238
}
}
@@ -889,7 +889,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -858,7 +858,7 @@ public class ServerChunkCache extends ChunkSource {
@Override
protected void doRunTask(Runnable task) {
@@ -829,7 +828,7 @@ index 3c0b3db58f31c7b63ab798a7be6076c6cee5f9f6..90fd350cec2ca726ff6707ab2cd3c7af
while (iterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 1093ef4e97d3bc84802d4fc96a6f95a5a24624b9..adbce4f4334c8857f0ab2fec910ba3883582256b 100644
index f9c516da1cd706095f391e1f64bce581e8dcd676..5cb6f39830c6d4cf31ba011964edbcf9c4f8c75e 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1239,7 +1239,7 @@ public class ServerPlayer extends Player {