Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@250e78c Re-add fixlight command
PaperMC/Paper@c0268ca Copy missing diff from old chunk system patch
PaperMC/Paper@38428c0 Cleanup MCUtils patch for chunk system
PaperMC/Paper@f4ddd4a Fix ChunkHolder#getFullChunkNow returning non-null when it should not
PaperMC/Paper@e0d9d60 Add debug for chunk system unload crash
PaperMC/Paper@2df432f Re-add chunk system debug commands
PaperMC/Paper@cf60574 Fix jukebox playable component not being applied on item meta (#10922)
PaperMC/Paper@666bc4d Experimental annotation changes (#10914)
PaperMC/Paper@bab07e0 Validate speed for tool component rule (#10923)
PaperMC/Paper@2118196 Fixes exception log messages getting dropped during bootstrap (#10935)
This commit is contained in:
granny
2024-06-20 16:31:30 -07:00
parent 783acfed92
commit b5f1c487e7
7 changed files with 69 additions and 74 deletions

View File

@@ -83,7 +83,7 @@ index e9775b4506909bee65a74964f0d5391a0513de1d..684f7f202305c09b1037c5d38a52a5ea
}
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 28fceecee801cd56edc3e0506641d6560756a973..f7c8ded17964394a1a10d16128d507aa5660f278 100644
index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb87073f8af682 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -359,13 +359,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -240,7 +240,7 @@ index 28fceecee801cd56edc3e0506641d6560756a973..f7c8ded17964394a1a10d16128d507aa
try {
//worldserver.timings.doTick.startTiming(); // Spigot // Purpur
@@ -1770,17 +1770,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1765,17 +1765,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
throw new ReportedException(crashreport);
}
@@ -262,7 +262,7 @@ index 28fceecee801cd56edc3e0506641d6560756a973..f7c8ded17964394a1a10d16128d507aa
//MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper // Purpur
this.playerList.tick();
//MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper // Purpur
@@ -1788,7 +1788,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1783,7 +1783,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
GameTestTicker.SINGLETON.tick();
}
@@ -271,7 +271,7 @@ index 28fceecee801cd56edc3e0506641d6560756a973..f7c8ded17964394a1a10d16128d507aa
//MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper // Purpur
for (int i = 0; i < this.tickables.size(); ++i) {
@@ -1796,7 +1796,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1791,7 +1791,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
//MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper // Purpur
@@ -280,7 +280,7 @@ index 28fceecee801cd56edc3e0506641d6560756a973..f7c8ded17964394a1a10d16128d507aa
iterator = this.playerList.getPlayers().iterator();
while (iterator.hasNext()) {
@@ -1806,7 +1806,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1801,7 +1801,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
entityplayer.connection.resumeFlushing();
}
@@ -289,7 +289,7 @@ index 28fceecee801cd56edc3e0506641d6560756a973..f7c8ded17964394a1a10d16128d507aa
}
private void synchronizeTime(ServerLevel world) {
@@ -1814,7 +1814,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1809,7 +1809,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void forceTimeSynchronization() {
@@ -298,7 +298,7 @@ index 28fceecee801cd56edc3e0506641d6560756a973..f7c8ded17964394a1a10d16128d507aa
Iterator iterator = this.getAllLevels().iterator();
while (iterator.hasNext()) {
@@ -1823,7 +1823,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1818,7 +1818,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.synchronizeTime(worldserver);
}
@@ -307,7 +307,7 @@ index 28fceecee801cd56edc3e0506641d6560756a973..f7c8ded17964394a1a10d16128d507aa
}
public boolean isLevelEnabled(Level world) {
@@ -2535,6 +2535,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2530,6 +2530,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public ProfilerFiller getProfiler() {
@@ -315,7 +315,7 @@ index 28fceecee801cd56edc3e0506641d6560756a973..f7c8ded17964394a1a10d16128d507aa
return this.profiler;
}
@@ -2774,7 +2775,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2776,7 +2777,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit end
private void startMetricsRecordingTick() {
@@ -324,7 +324,7 @@ index 28fceecee801cd56edc3e0506641d6560756a973..f7c8ded17964394a1a10d16128d507aa
this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, this.isDedicatedServer()), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
this.executeBlocking(() -> {
this.saveDebugReport(path.resolve("server"));
@@ -2784,40 +2785,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2786,40 +2787,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.willStartRecordingMetrics = false;
}
@@ -377,7 +377,7 @@ index 28fceecee801cd56edc3e0506641d6560756a973..f7c8ded17964394a1a10d16128d507aa
}
public Path getWorldPath(LevelResource worldSavePath) {
@@ -2870,15 +2871,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2872,15 +2873,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public boolean isTimeProfilerRunning() {
@@ -443,10 +443,10 @@ index 9cd4f7c6910727c849ac7f5d675dc6105c4bbba2..4e4b7f2a6d7ed92a2ce06e566186027c
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index b27cb90a52bc7d96d4318979c678a49a884562b2..686f3d8c91e1ffc0c7ffe1cd9bcf5df5503cb938 100644
index 1b6c5a36e96a3845d55b0b798a8cffdc7a4ffd93..ecd02b10c4120a7d7342b12ec95be0ee56318333 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -452,16 +452,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -425,16 +425,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
protected void tick(BooleanSupplier shouldKeepTicking) {
@@ -468,10 +468,10 @@ index b27cb90a52bc7d96d4318979c678a49a884562b2..686f3d8c91e1ffc0c7ffe1cd9bcf5df5
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 fbb1753425a1cd456e4096b9fe506264e3dac505..adf79eb40c62e56311533de6c919f77e81ab4284 100644
index 779b7ec2f243f4a8868d78e7fe5b5c57446d60aa..c50e1dee1a32ea7a8fd412f98e944a0e81b69b02 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -453,26 +453,26 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -374,26 +374,26 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
// CraftBukkit start - modelled on below
public void purgeUnload() {
@@ -503,7 +503,7 @@ index fbb1753425a1cd456e4096b9fe506264e3dac505..adf79eb40c62e56311533de6c919f77e
if (tickChunks) {
//this.level.timings.chunks.startTiming(); // Paper - timings // Purpur
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getPlayerChunkLoader().tick(); // Paper - rewrite chunk system
@@ -482,10 +482,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -403,10 +403,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
//this.level.timings.doChunkUnload.startTiming(); // Spigot // Purpur
@@ -516,7 +516,7 @@ index fbb1753425a1cd456e4096b9fe506264e3dac505..adf79eb40c62e56311533de6c919f77e
this.clearCache();
}
@@ -495,10 +495,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -416,10 +416,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
this.lastInhabitedUpdate = i;
if (!this.level.isDebug()) {
@@ -530,7 +530,7 @@ index fbb1753425a1cd456e4096b9fe506264e3dac505..adf79eb40c62e56311533de6c919f77e
List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size());
Iterator iterator = this.chunkMap.getChunks().iterator();
//if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper // Purpur
@@ -513,7 +513,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -434,7 +434,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
if (this.level.tickRateManager().runsNormally()) {
@@ -539,7 +539,7 @@ index fbb1753425a1cd456e4096b9fe506264e3dac505..adf79eb40c62e56311533de6c919f77e
//this.level.timings.countNaturalMobs.startTiming(); // Paper - timings // Purpur
int k = this.distanceManager.getNaturalSpawnChunkCount();
// Paper start - Optional per player mob spawns
@@ -542,7 +542,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -463,7 +463,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
// this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings // Purpur
this.lastSpawnState = spawnercreature_d;
@@ -548,7 +548,7 @@ index fbb1753425a1cd456e4096b9fe506264e3dac505..adf79eb40c62e56311533de6c919f77e
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
Util.shuffle(list, this.level.random);
@@ -577,7 +577,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -498,7 +498,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
//this.level.timings.chunkTicks.stopTiming(); // Paper // Purpur
@@ -557,7 +557,7 @@ index fbb1753425a1cd456e4096b9fe506264e3dac505..adf79eb40c62e56311533de6c919f77e
if (flag) {
//try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings // Purpur
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
@@ -585,14 +585,14 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -506,14 +506,14 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
}
@@ -575,7 +575,7 @@ index fbb1753425a1cd456e4096b9fe506264e3dac505..adf79eb40c62e56311533de6c919f77e
}
}
@@ -773,7 +773,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -694,7 +694,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@Override
protected void doRunTask(Runnable task) {
@@ -585,7 +585,7 @@ index fbb1753425a1cd456e4096b9fe506264e3dac505..adf79eb40c62e56311533de6c919f77e
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 55446501a3bc42e4881eb38b13d1de5d03d22c0d..500a735113f9f16f9d336c2bb1cad1447e5d64c4 100644
index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791d22f06fb 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -644,16 +644,16 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -1806,7 +1806,7 @@ index bff83fe413c7baef4ba56a3270ea4463a58c792f..3ee7bf7e10f8120258baaae8f77cdcbb
if (this.fire) {
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 2fc472df25f61528e04f5f41e0fc179a3f4151fb..91106cab35f1b219e28e833b7a0735fb0e016bb5 100644
index e353384abb69aa4cee6fb20277df874b40466ace..a5dab1252bec8f0ba5e40313e329731c559945f3 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -268,7 +268,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -1827,7 +1827,7 @@ index 2fc472df25f61528e04f5f41e0fc179a3f4151fb..91106cab35f1b219e28e833b7a0735fb
final List<Entity> ret = new java.util.ArrayList<>();
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel)this).moonrise$getEntityLookup().getHardCollidingEntities(entity, box, ret, predicate);
@@ -984,9 +984,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -982,9 +982,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
}
protected void tickBlockEntities() {
@@ -1839,7 +1839,7 @@ index 2fc472df25f61528e04f5f41e0fc179a3f4151fb..91106cab35f1b219e28e833b7a0735fb
//this.timings.tileEntityPending.startTiming(); // Spigot // Purpur
this.tickingBlockEntities = true;
if (!this.pendingBlockEntityTickers.isEmpty()) {
@@ -1022,7 +1022,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -1020,7 +1020,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
//this.timings.tileEntityTick.stopTiming(); // Spigot // Purpur
this.tickingBlockEntities = false;
co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper
@@ -1848,7 +1848,7 @@ index 2fc472df25f61528e04f5f41e0fc179a3f4151fb..91106cab35f1b219e28e833b7a0735fb
this.spigotConfig.currentPrimedTnt = 0; // Spigot
}
@@ -1226,7 +1226,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -1224,7 +1224,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@Override
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
@@ -1857,7 +1857,7 @@ index 2fc472df25f61528e04f5f41e0fc179a3f4151fb..91106cab35f1b219e28e833b7a0735fb
// Paper start - rewrite chunk system
final List<Entity> ret = new java.util.ArrayList<>();
@@ -1252,7 +1252,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -1250,7 +1250,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
public <T extends Entity> void getEntities(final EntityTypeTest<Entity, T> entityTypeTest,
final AABB boundingBox, final Predicate<? super T> predicate,
final List<? super T> into, final int maxCount) {
@@ -1866,7 +1866,7 @@ index 2fc472df25f61528e04f5f41e0fc179a3f4151fb..91106cab35f1b219e28e833b7a0735fb
if (entityTypeTest instanceof net.minecraft.world.entity.EntityType<T> byType) {
if (maxCount != Integer.MAX_VALUE) {
@@ -1547,6 +1547,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -1545,6 +1545,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
}
public ProfilerFiller getProfiler() {
@@ -1897,10 +1897,10 @@ index 2812505185df691e8f08932aa0bba162a7d9db86..35e94c06361795d032f995e8282f8b35
// Paper start - Add mobcaps commands
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 1a57806714e347ab4efe12f5f7782c2167a439a2..5d67b0fb6e979133d80c852d0c8d9fe02e2f97d2 100644
index 191a6bedcd31ec070dd4ad245722d0f016319d7a..7238f28b7d4b40359a28970a7a53018c242af6e2 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -449,11 +449,11 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
@@ -350,11 +350,11 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
if (LightEngine.hasDifferentLightProperties(this, blockposition, iblockdata1, iblockdata)) {
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
@@ -1915,7 +1915,7 @@ index 1a57806714e347ab4efe12f5f7782c2167a439a2..5d67b0fb6e979133d80c852d0c8d9fe0
}
boolean flag3 = iblockdata1.hasBlockEntity();
@@ -1106,9 +1106,9 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
@@ -985,9 +985,9 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
if (LevelChunk.this.isTicking(blockposition)) {
try {
@@ -1927,7 +1927,7 @@ index 1a57806714e347ab4efe12f5f7782c2167a439a2..5d67b0fb6e979133d80c852d0c8d9fe0
//this.blockEntity.tickTimer.startTiming(); // Spigot // Purpur
BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
@@ -1125,7 +1125,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
@@ -1004,7 +1004,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
// Paper end - Remove the Block Entity if it's invalid
}