mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 750049fa2 Fix incorrect colors in some log messages (#5609) Tuinity Changes: 138247324 Null check chunk in block changes for Starlight
This commit is contained in:
@@ -3397,10 +3397,10 @@ index 0000000000000000000000000000000000000000..86a880d0f13f0fee70b09626c394c9e2
|
||||
+}
|
||||
diff --git a/src/main/java/com/tuinity/tuinity/chunk/light/StarLightEngine.java b/src/main/java/com/tuinity/tuinity/chunk/light/StarLightEngine.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e40cf190c945754bd8b5342f76cd7fe2efd127cb
|
||||
index 0000000000000000000000000000000000000000..2b0455b7475a75bba010fd71798eaa204bcf9562
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/tuinity/tuinity/chunk/light/StarLightEngine.java
|
||||
@@ -0,0 +1,1615 @@
|
||||
@@ -0,0 +1,1603 @@
|
||||
+package com.tuinity.tuinity.chunk.light;
|
||||
+
|
||||
+import com.tuinity.tuinity.util.CoordinateUtils;
|
||||
@@ -3847,7 +3847,7 @@ index 0000000000000000000000000000000000000000..e40cf190c945754bd8b5342f76cd7fe2
|
||||
+ try {
|
||||
+ this.changedBlocksSet = positions;
|
||||
+ final IChunkAccess chunk = this.getChunkInCache(chunkX, chunkZ);
|
||||
+ if (this.isClientSide && chunk == null) {
|
||||
+ if (chunk == null) {
|
||||
+ return;
|
||||
+ }
|
||||
+ if (changedSections != null) {
|
||||
@@ -4146,18 +4146,6 @@ index 0000000000000000000000000000000000000000..e40cf190c945754bd8b5342f76cd7fe2
|
||||
+ final Boolean[] emptinessChanges) {
|
||||
+ this.setupCaches(lightAccess, chunkX * 16 + 7, 128, chunkZ * 16 + 7, true, true);
|
||||
+ try {
|
||||
+ if (this.isClientSide) {
|
||||
+ // force current chunk into cache
|
||||
+ final IChunkAccess chunk = (IChunkAccess)lightAccess.getFeaturesReadyChunk(chunkX, chunkZ);
|
||||
+ if (chunk == null) {
|
||||
+ // unloaded this frame (or last), and we were still queued
|
||||
+ return;
|
||||
+ }
|
||||
+ this.setChunkInCache(chunkX, chunkZ, chunk);
|
||||
+ this.setBlocksForChunkInCache(chunkX, chunkZ, chunk.getSections());
|
||||
+ this.setNibblesForChunkInCache(chunkX, chunkZ, this.getNibblesOnChunk(chunk));
|
||||
+ this.setEmptinessMapCache(chunkX, chunkZ, this.getEmptinessMap(chunk));
|
||||
+ }
|
||||
+ final IChunkAccess chunk = this.getChunkInCache(chunkX, chunkZ);
|
||||
+ if (chunk == null) {
|
||||
+ return;
|
||||
@@ -10947,10 +10935,10 @@ index 1d72af9cace7aa8f1d20c7c1c5be621f533e2dad..b7399d17dd64ca8b1f1fab405cb0ac91
|
||||
worldData.addProperty("keep-spawn-loaded-range", world.paperConfig.keepLoadedRange);
|
||||
worldData.addProperty("visible-chunk-count", visibleChunks.size());
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc8270545535a 100644
|
||||
index 35bb4d0b9ed131e6570cce0b43ae78c5557a0bff..8adbb9a77ff304f14ad3defa0f4f7ec25b0d2a2a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -267,6 +267,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -268,6 +268,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
|
||||
//public ConsoleReader reader; // Paper
|
||||
public static int currentTick = 0; // Paper - Further improve tick loop
|
||||
@@ -10958,7 +10946,7 @@ index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
public boolean serverAutoSave = false; // Paper
|
||||
@@ -877,10 +878,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -878,10 +879,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||
if (!isMainThread()) {
|
||||
MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PAPER)");
|
||||
@@ -10971,7 +10959,7 @@ index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
} catch (InterruptedException e) {}
|
||||
}
|
||||
// We've just obliterated the main thread, this will prevent stop from dying when removing players
|
||||
@@ -1081,6 +1083,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1082,6 +1084,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// Paper end
|
||||
|
||||
PaperJvmChecker.checkJvm(); // Paper jvm version nag
|
||||
@@ -10979,7 +10967,7 @@ index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
org.spigotmc.WatchdogThread.tick(); // Paper
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
|
||||
Arrays.fill( recentTps, 20 );
|
||||
@@ -1098,6 +1101,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1099,6 +1102,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.lastOverloadTime = this.nextTick;
|
||||
}
|
||||
|
||||
@@ -10987,7 +10975,7 @@ index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
if ( ++MinecraftServer.currentTick % SAMPLE_INTERVAL == 0 )
|
||||
{
|
||||
final long diff = curTime - tickSection;
|
||||
@@ -1112,7 +1116,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1113,7 +1117,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// Paper end
|
||||
tickSection = curTime;
|
||||
}
|
||||
@@ -10996,7 +10984,7 @@ index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
// Spigot end
|
||||
|
||||
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
||||
@@ -1205,6 +1209,76 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1206,6 +1210,76 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -11073,7 +11061,7 @@ index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
private void executeModerately() {
|
||||
this.executeAll();
|
||||
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
||||
@@ -1218,22 +1292,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1219,22 +1293,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11097,7 +11085,7 @@ index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
|
||||
@Override
|
||||
public TickTask postToMainThread(Runnable runnable) {
|
||||
@@ -1260,6 +1319,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1261,6 +1320,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
private boolean bb() {
|
||||
if (super.executeNext()) {
|
||||
@@ -11105,7 +11093,7 @@ index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
return true;
|
||||
} else {
|
||||
if (this.canSleepForTick()) {
|
||||
@@ -1327,7 +1387,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1328,7 +1388,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// Paper start - move oversleep into full server tick
|
||||
isOversleep = true;MinecraftTimings.serverOversleep.startTiming();
|
||||
this.awaitTasks(() -> {
|
||||
@@ -11114,7 +11102,7 @@ index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
return !this.canOversleep();
|
||||
});
|
||||
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
|
||||
@@ -1392,6 +1452,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1393,6 +1453,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -11123,7 +11111,7 @@ index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
// Paper start
|
||||
long endTime = System.nanoTime();
|
||||
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
||||
@@ -1418,16 +1480,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1419,16 +1481,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
protected void b(BooleanSupplier booleansupplier) {
|
||||
@@ -11143,7 +11131,7 @@ index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
this.methodProfiler.exitEnter("levels");
|
||||
Iterator iterator = this.getWorlds().iterator();
|
||||
|
||||
@@ -1438,7 +1500,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1439,7 +1501,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
processQueue.remove().run();
|
||||
}
|
||||
MinecraftTimings.processQueueTimer.stopTiming(); // Spigot
|
||||
@@ -11152,7 +11140,7 @@ index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
// Paper start - optimize time updates
|
||||
@@ -1481,11 +1543,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1482,11 +1544,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.methodProfiler.enter("tick");
|
||||
|
||||
try {
|
||||
@@ -11171,7 +11159,7 @@ index 61712ae515b329a6b85dbe2e5960e4e864dc7731..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
} catch (Throwable throwable) {
|
||||
// Spigot Start
|
||||
CrashReport crashreport;
|
||||
@@ -1579,7 +1646,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1580,7 +1647,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
|
||||
Reference in New Issue
Block a user