Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@dcbd99d Fix Owen's typos (#11179)
PaperMC/Paper@f82bea6 Add argument for FinePosition to brig API (#11094)
PaperMC/Paper@694b120 Remove Entity tracker field
PaperMC/Paper@f774787 Copy missed changes to chunk system from Folia
PaperMC/Paper@50bdfc3 Null check tracker in Entity#resendPossiblyDesyncedEntityData
PaperMC/Paper@3234b20 Do not allow chunk unloading outside of the regular tick loop
PaperMC/Paper@0246a9d Add mob bucket items to item id to entity map in DataConverter
PaperMC/Paper@438863c Shutdown L4J cordially if the server stops before it's even started (#11172)
PaperMC/Paper@100d75a Don't entirely die just because a plugin jar was bad
PaperMC/Paper@227544c Move TickThread changes from Moonrise patch to MCUtils
PaperMC/Paper@67d414a Allow plugin aliases to override vanilla commands (#11186)
PaperMC/Paper@58c7ea3 Preserve command node when re-registering modern commands through old API (#11184)
This commit is contained in:
granny
2024-07-30 15:53:18 -07:00
parent 72ccfbd343
commit 0bd557933c
20 changed files with 108 additions and 106 deletions

View File

@@ -42,10 +42,10 @@ index e2c24813f59c2fd075c740ac1842a38f20ed8554..01efbc507b3d58f13f78ee286f93df40
} catch (Exception exception) {
if (exception instanceof ReportedException) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2de2fa1f515eac62ff5a8a789f3a86c83221cd31..5e1004ccd735a0889dbdfbfcebb921422ac992a4 100644
index f613f127fd31812012fd1f83ad0bfdf6692bc136..771c81e505974d8e3a21886eb0f0b07c87601bb0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1605,15 +1605,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1606,15 +1606,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void tickServer(BooleanSupplier shouldKeepTicking) {
@@ -64,7 +64,7 @@ index 2de2fa1f515eac62ff5a8a789f3a86c83221cd31..5e1004ccd735a0889dbdfbfcebb92142
// Paper end
this.server.spark.tickStart(); // Paper - spark
new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper - Server Tick Events
@@ -1650,9 +1650,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1651,9 +1651,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.pop();
// Paper end - Incremental chunk and player saving
// Paper start - move executeAll() into full server tick timing
@@ -76,7 +76,7 @@ index 2de2fa1f515eac62ff5a8a789f3a86c83221cd31..5e1004ccd735a0889dbdfbfcebb92142
// Paper end
// Paper start - Server Tick Events
long endTime = System.nanoTime();
@@ -1676,7 +1676,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1677,7 +1677,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.logTickMethodTime(i);
this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot
@@ -85,7 +85,7 @@ index 2de2fa1f515eac62ff5a8a789f3a86c83221cd31..5e1004ccd735a0889dbdfbfcebb92142
}
private void logTickMethodTime(long tickStartTime) {
@@ -1747,9 +1747,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1748,9 +1748,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
entityplayer.connection.suspendFlushing();
});
@@ -97,7 +97,7 @@ index 2de2fa1f515eac62ff5a8a789f3a86c83221cd31..5e1004ccd735a0889dbdfbfcebb92142
// Paper start - Folia scheduler API
((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick();
getAllLevels().forEach(level -> {
@@ -1766,21 +1766,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1767,21 +1767,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper end - Folia scheduler API
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
this.profiler.push("commandFunctions");
@@ -124,7 +124,7 @@ index 2de2fa1f515eac62ff5a8a789f3a86c83221cd31..5e1004ccd735a0889dbdfbfcebb92142
// Send time updates to everyone, it will get the right time from the world the player is in.
// Paper start - Perf: Optimize time updates
for (final ServerLevel level : this.getAllLevels()) {
@@ -1800,7 +1800,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1801,7 +1801,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
// Paper end - Perf: Optimize time updates
@@ -133,7 +133,7 @@ index 2de2fa1f515eac62ff5a8a789f3a86c83221cd31..5e1004ccd735a0889dbdfbfcebb92142
this.isIteratingOverLevels = true; // Paper - Throw exception on world create while being ticked
Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; move down
@@ -1828,9 +1828,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1829,9 +1829,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.push("tick");
try {
@@ -145,7 +145,7 @@ index 2de2fa1f515eac62ff5a8a789f3a86c83221cd31..5e1004ccd735a0889dbdfbfcebb92142
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
@@ -1845,24 +1845,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1846,24 +1846,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
this.profiler.popPush("connection");
@@ -199,10 +199,10 @@ index f0eccec916c7c49e626ba86accd9b1718d42d699..9b8e989600eedbbba20ec41737a3c8f9
@Override
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index d85cbcc06b35d5a3467d7d1c81c9f09c1a8db175..1b68b54c264483f20bb46921d5603ec9eec2a21e 100644
index 1e0a6e5a3c907ab55ee6f2780a7d43bd455f2b7b..1249b81a603c09934fe8f1c91a16694ca1d787ed 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -959,7 +959,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -958,7 +958,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
List<ServerPlayer> list = Lists.newArrayList();
List<ServerPlayer> list1 = this.level.players();
ObjectIterator objectiterator = this.entityMap.values().iterator();
@@ -211,7 +211,7 @@ index d85cbcc06b35d5a3467d7d1c81c9f09c1a8db175..1b68b54c264483f20bb46921d5603ec9
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
@@ -984,17 +984,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -983,17 +983,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
playerchunkmap_entitytracker.serverEntity.sendChanges();
}
}
@@ -233,7 +233,7 @@ index d85cbcc06b35d5a3467d7d1c81c9f09c1a8db175..1b68b54c264483f20bb46921d5603ec9
}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 8a0b00d645e4cf2ca96ec7e8ebc6ef726a0ab8b0..84a66167e0e8e933c2c0051aae4c68d698b57738 100644
index dcb5651d1d9b10b40430fb2f713beedf68336704..4aa9fbdf1eda91a5c54ff53709d94f30e9b2e62b 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -356,9 +356,9 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -248,7 +248,7 @@ index 8a0b00d645e4cf2ca96ec7e8ebc6ef726a0ab8b0..84a66167e0e8e933c2c0051aae4c68d6
}
@Override
@@ -393,26 +393,25 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -394,26 +394,25 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@Override
public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) {
this.level.getProfiler().push("purge");
@@ -281,7 +281,7 @@ index 8a0b00d645e4cf2ca96ec7e8ebc6ef726a0ab8b0..84a66167e0e8e933c2c0051aae4c68d6
this.level.getProfiler().pop();
this.clearCache();
}
@@ -448,13 +447,13 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -449,13 +448,13 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
// Paper end - chunk tick iteration optimisations
Iterator iterator = null; // Paper - chunk tick iteration optimisations
@@ -297,7 +297,7 @@ index 8a0b00d645e4cf2ca96ec7e8ebc6ef726a0ab8b0..84a66167e0e8e933c2c0051aae4c68d6
int k = this.distanceManager.getNaturalSpawnChunkCount();
// Paper start - Optional per player mob spawns
int naturalSpawnChunkCount = k;
@@ -479,7 +478,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -480,7 +479,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
spawnercreature_d = NaturalSpawner.createState(naturalSpawnChunkCount, this.level.getAllEntities(), this::getFullChunk, !this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new LocalMobCapCalculator(this.chunkMap) : null, false);
}
// Paper end - Optional per player mob spawns
@@ -306,7 +306,7 @@ index 8a0b00d645e4cf2ca96ec7e8ebc6ef726a0ab8b0..84a66167e0e8e933c2c0051aae4c68d6
this.lastSpawnState = spawnercreature_d;
gameprofilerfiller.popPush("spawnAndTick");
@@ -520,19 +519,19 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -521,19 +520,19 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
}
}
@@ -330,7 +330,7 @@ index 8a0b00d645e4cf2ca96ec7e8ebc6ef726a0ab8b0..84a66167e0e8e933c2c0051aae4c68d6
{
final it.unimi.dsi.fastutil.objects.ObjectArrayList<net.minecraft.server.level.ServerChunkCache.ChunkAndHolder> chunks = (it.unimi.dsi.fastutil.objects.ObjectArrayList<net.minecraft.server.level.ServerChunkCache.ChunkAndHolder>)list;
final ServerChunkCache.ChunkAndHolder[] raw = chunks.elements();
@@ -546,7 +545,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -547,7 +546,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
holder.holder().broadcastChanges(holder.chunk());
}
}