Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@bd2fd61 [ci skip] Fixup a few bad comments
PaperMC/Paper@fe53b0e Updated Upstream (Bukkit/CraftBukkit/Spigot)
PaperMC/Paper@1ed50da Fix javadoc errors, remove unused classes
This commit is contained in:
granny
2024-01-26 21:39:07 -08:00
parent eab2140f5e
commit ce7eaa1763
30 changed files with 163 additions and 151 deletions

View File

@@ -89,7 +89,7 @@ index 821dc4aeaf48460000682604fba51b340b9738e7..3aa2ce6a2a3d3cdfc372a60419a09f49
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2ed2ab1b9e 100644
index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039691c3094 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -342,13 +342,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -124,7 +124,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
MinecraftServer.LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
@@ -1223,20 +1223,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1224,20 +1224,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
boolean flag = i == 0L;
@@ -150,7 +150,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
this.mayHaveDelayedTasks = true;
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
// Pufferfish start - tps catchup
@@ -1257,8 +1257,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1258,8 +1258,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.tickRateManager.endTickWork();
}
@@ -161,7 +161,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
this.isReady = true;
JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis);
}
@@ -1484,7 +1484,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1485,7 +1485,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
@@ -170,7 +170,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
super.doRunTask(ticktask);
}
@@ -1557,7 +1557,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1558,7 +1558,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (playerSaveInterval < 0) {
playerSaveInterval = autosavePeriod;
}
@@ -179,7 +179,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
try {
this.isSaving = true;
@@ -1572,7 +1572,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1573,7 +1573,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} finally {
this.isSaving = false;
}
@@ -188,7 +188,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
// Paper end - Incremental chunk and player saving
io.papermc.paper.util.CachedLists.reset(); // Paper
// Paper start - move executeAll() into full server tick timing
@@ -1585,7 +1585,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1586,7 +1586,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
// Paper end - Server Tick Events
@@ -197,7 +197,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
long j = Util.getNanos() - i;
int k = this.tickCount % 100;
@@ -1601,7 +1601,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1602,7 +1602,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
tickTimes60s.add(this.tickCount, j);
// Paper end - Add tick times API and /mspt command
this.logTickTime(l - i);
@@ -206,7 +206,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
org.spigotmc.WatchdogThread.tick(); // Spigot
//co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper // Purpur
}
@@ -1683,11 +1683,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1684,11 +1684,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
});
// Paper end - Folia scheduler API
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
@@ -220,7 +220,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
// CraftBukkit start
@@ -1730,18 +1730,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1731,18 +1731,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
worldserver.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur
@@ -244,7 +244,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
try {
//worldserver.timings.doTick.startTiming(); // Spigot // Purpur
@@ -1759,17 +1759,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1760,17 +1760,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
throw new ReportedException(crashreport);
}
@@ -266,7 +266,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
//MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper // Purpur
this.playerList.tick();
//MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper // Purpur
@@ -1777,7 +1777,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1778,7 +1778,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
GameTestTicker.SINGLETON.tick();
}
@@ -275,7 +275,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
//MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper // Purpur
for (int i = 0; i < this.tickables.size(); ++i) {
@@ -1785,7 +1785,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1786,7 +1786,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
//MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper // Purpur
@@ -284,7 +284,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
iterator = this.playerList.getPlayers().iterator();
while (iterator.hasNext()) {
@@ -1795,7 +1795,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1796,7 +1796,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
entityplayer.connection.resumeFlushing();
}
@@ -293,7 +293,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
}
private void synchronizeTime(ServerLevel world) {
@@ -1803,7 +1803,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1804,7 +1804,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void forceTimeSynchronization() {
@@ -302,7 +302,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
Iterator iterator = this.getAllLevels().iterator();
while (iterator.hasNext()) {
@@ -1812,7 +1812,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1813,7 +1813,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.synchronizeTime(worldserver);
}
@@ -311,7 +311,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
}
public boolean isNetherEnabled() {
@@ -2476,7 +2476,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2477,7 +2477,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public ProfilerFiller getProfiler() {
@@ -320,7 +320,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
return this.profiler;
}
@@ -2716,7 +2716,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2717,7 +2717,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit end
private void startMetricsRecordingTick() {
@@ -329,7 +329,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
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"));
@@ -2726,40 +2726,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2727,40 +2727,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.willStartRecordingMetrics = false;
}
@@ -382,7 +382,7 @@ index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2e
}
public Path getWorldPath(LevelResource worldSavePath) {
@@ -2808,15 +2808,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2809,15 +2809,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public boolean isTimeProfilerRunning() {
@@ -1821,10 +1821,10 @@ index 28ef910885dbd48965fba6f08cec412697b1b7f0..02dae407069a0200e271cc9c6f3ec6ff
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 ef8b596a02970c514fc6e5e0fb7ded76d82240ac..4779fd92a88c3d485ab3282ab63158f0894f7896 100644
index 2ab6a1bedcdbdb6adc6030ea863bde85ec297e89..0510ab6d164eacb8cede544b98713a132f83002d 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1314,9 +1314,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1310,9 +1310,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
}
protected void tickBlockEntities() {
@@ -1836,7 +1836,7 @@ index ef8b596a02970c514fc6e5e0fb7ded76d82240ac..4779fd92a88c3d485ab3282ab63158f0
//this.timings.tileEntityPending.startTiming(); // Spigot // Purpur
this.tickingBlockEntities = true;
if (!this.pendingBlockEntityTickers.isEmpty()) {
@@ -1357,7 +1357,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1353,7 +1353,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
//this.timings.tileEntityTick.stopTiming(); // Spigot // Purpur
this.tickingBlockEntities = false;
co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper
@@ -1845,7 +1845,7 @@ index ef8b596a02970c514fc6e5e0fb7ded76d82240ac..4779fd92a88c3d485ab3282ab63158f0
this.spigotConfig.currentPrimedTnt = 0; // Spigot
}
@@ -1567,7 +1567,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1563,7 +1563,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@Override
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
@@ -1854,7 +1854,7 @@ index ef8b596a02970c514fc6e5e0fb7ded76d82240ac..4779fd92a88c3d485ab3282ab63158f0
List<Entity> list = Lists.newArrayList();
((ServerLevel)this).getEntityLookup().getEntities(except, box, list, predicate); // Paper - optimise this call
return list;
@@ -1586,7 +1586,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1582,7 +1582,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
}
public <T extends Entity> void getEntities(EntityTypeTest<Entity, T> filter, AABB box, Predicate<? super T> predicate, List<? super T> result, int limit) {
@@ -1863,7 +1863,7 @@ index ef8b596a02970c514fc6e5e0fb7ded76d82240ac..4779fd92a88c3d485ab3282ab63158f0
// Paper start - optimise this call
//TODO use limit
if (filter instanceof net.minecraft.world.entity.EntityType entityTypeTest) {
@@ -1845,7 +1845,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1841,7 +1841,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
}
public ProfilerFiller getProfiler() {