mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@66cb880 Remove ThreadedWorldUpgrader patch PaperMC/Paper@980cff9 Fix compile
This commit is contained in:
@@ -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 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11046ffe39 100644
|
||||
index f91739d3de41c20b352e159c7f4e12e6fdcab794..9e9537007a156dfbd41e53a93312ccb8be061a08 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -344,13 +344,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -106,7 +106,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
this.random = RandomSource.create();
|
||||
this.port = -1;
|
||||
this.levels = Maps.newLinkedHashMap();
|
||||
@@ -972,9 +972,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -969,9 +969,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// Paper end
|
||||
// CraftBukkit end
|
||||
@@ -118,7 +118,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
|
||||
@@ -1240,20 +1240,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1237,20 +1237,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
boolean flag = i == 0L;
|
||||
|
||||
@@ -144,7 +144,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
this.mayHaveDelayedTasks = true;
|
||||
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
|
||||
// Purpur start
|
||||
@@ -1269,9 +1269,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1266,9 +1266,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.tickRateManager.endTickWork();
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
this.isReady = true;
|
||||
JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis);
|
||||
}
|
||||
@@ -1535,7 +1535,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1532,7 +1532,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
|
||||
@@ -166,7 +166,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
super.doRunTask(ticktask);
|
||||
}
|
||||
|
||||
@@ -1608,7 +1608,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1605,7 +1605,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (playerSaveInterval < 0) {
|
||||
playerSaveInterval = autosavePeriod;
|
||||
}
|
||||
@@ -175,7 +175,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
|
||||
try {
|
||||
this.isSaving = true;
|
||||
@@ -1623,7 +1623,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1620,7 +1620,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
} finally {
|
||||
this.isSaving = false;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
// Paper end - Incremental chunk and player saving
|
||||
io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||
// Paper start - move executeAll() into full server tick timing
|
||||
@@ -1636,7 +1636,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1633,7 +1633,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
|
||||
@@ -193,7 +193,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
long j = Util.getNanos() - i;
|
||||
int k = this.tickCount % 100;
|
||||
|
||||
@@ -1650,7 +1650,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1647,7 +1647,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.tickTimes60s.add(this.tickCount, j);
|
||||
// Paper end - Add tick times API and /mspt command
|
||||
this.logTickMethodTime(i);
|
||||
@@ -202,7 +202,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
//co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper // Purpur
|
||||
}
|
||||
@@ -1741,11 +1741,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1738,11 +1738,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
|
||||
@@ -216,7 +216,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1788,20 +1788,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1785,20 +1785,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worldserver.updateLagCompensationTick(); // Paper - lag compensation
|
||||
worldserver.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur
|
||||
|
||||
@@ -242,7 +242,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
|
||||
try {
|
||||
//worldserver.timings.doTick.startTiming(); // Spigot // Purpur
|
||||
@@ -1819,17 +1819,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1816,17 +1816,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
//MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper // Purpur
|
||||
this.playerList.tick();
|
||||
//MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
@@ -1837,7 +1837,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1834,7 +1834,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
GameTestTicker.SINGLETON.tick();
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
|
||||
//MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper // Purpur
|
||||
for (int i = 0; i < this.tickables.size(); ++i) {
|
||||
@@ -1845,7 +1845,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1842,7 +1842,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
//MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
|
||||
@@ -282,7 +282,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
iterator = this.playerList.getPlayers().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1855,7 +1855,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1852,7 +1852,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
entityplayer.connection.resumeFlushing();
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
}
|
||||
|
||||
private void synchronizeTime(ServerLevel world) {
|
||||
@@ -1863,7 +1863,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1860,7 +1860,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void forceTimeSynchronization() {
|
||||
@@ -300,7 +300,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
Iterator iterator = this.getAllLevels().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1872,7 +1872,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1869,7 +1869,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.synchronizeTime(worldserver);
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
}
|
||||
|
||||
public boolean isNetherEnabled() {
|
||||
@@ -2584,6 +2584,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2581,6 +2581,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
@@ -317,7 +317,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
return this.profiler;
|
||||
}
|
||||
|
||||
@@ -2830,7 +2831,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2827,7 +2828,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
|
||||
private void startMetricsRecordingTick() {
|
||||
@@ -326,7 +326,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
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"));
|
||||
@@ -2840,40 +2841,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2837,40 +2838,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.willStartRecordingMetrics = false;
|
||||
}
|
||||
|
||||
@@ -379,7 +379,7 @@ index 834428ee526db305c70cf0ec4015204b03348b43..72eee1f7f29578a1d20245e0e4d90e11
|
||||
}
|
||||
|
||||
public Path getWorldPath(LevelResource worldSavePath) {
|
||||
@@ -2926,15 +2927,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2923,15 +2924,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public boolean isTimeProfilerRunning() {
|
||||
@@ -1834,10 +1834,10 @@ index 082b804f4793f72e76361f5427f0358273454b3d..bd5fcb028d41b60de183b4d849f1ba10
|
||||
|
||||
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 4d00d72d66adfb282d354e22703552b333138694..eda2f8cc034cf46293be1be117a60cf8b663c303 100644
|
||||
index 90313f228944cc37f6af5ff5fcc679f423a26d14..487bb3e75afc5871a79506a54f0f4af806460b14 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1303,9 +1303,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1294,9 +1294,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
protected void tickBlockEntities() {
|
||||
@@ -1849,7 +1849,7 @@ index 4d00d72d66adfb282d354e22703552b333138694..eda2f8cc034cf46293be1be117a60cf8
|
||||
//this.timings.tileEntityPending.startTiming(); // Spigot // Purpur
|
||||
this.tickingBlockEntities = true;
|
||||
if (!this.pendingBlockEntityTickers.isEmpty()) {
|
||||
@@ -1346,7 +1346,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1337,7 +1337,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
|
||||
@@ -1858,7 +1858,7 @@ index 4d00d72d66adfb282d354e22703552b333138694..eda2f8cc034cf46293be1be117a60cf8
|
||||
this.spigotConfig.currentPrimedTnt = 0; // Spigot
|
||||
}
|
||||
|
||||
@@ -1561,7 +1561,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1552,7 +1552,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
@Override
|
||||
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
|
||||
@@ -1867,7 +1867,7 @@ index 4d00d72d66adfb282d354e22703552b333138694..eda2f8cc034cf46293be1be117a60cf8
|
||||
List<Entity> list = Lists.newArrayList();
|
||||
((ServerLevel)this).getEntityLookup().getEntities(except, box, list, predicate); // Paper - optimise this call
|
||||
return list;
|
||||
@@ -1580,7 +1580,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1571,7 +1571,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) {
|
||||
@@ -1876,7 +1876,7 @@ index 4d00d72d66adfb282d354e22703552b333138694..eda2f8cc034cf46293be1be117a60cf8
|
||||
// Paper start - optimise this call
|
||||
//TODO use limit
|
||||
if (filter instanceof net.minecraft.world.entity.EntityType entityTypeTest) {
|
||||
@@ -1835,6 +1835,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1826,6 +1826,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
|
||||
Reference in New Issue
Block a user