Updated Upstream (Bukkit/CraftBukkit/Spigot)
Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: b850a822 SPIGOT-4526: Add conversion time API for Zombie & subclasses CraftBukkit Changes: 38cf676e SPIGOT-4534: CreatureSpawnEvent not being called for CHUNK_GEN b446cb5d SPIGOT-4527: Fix sponges with waterlogged blocks 6ec8ea5c SPIGOT-4526: Add conversion time API for Zombie & subclasses c64fe508 Mappings Update a3c2ec03 Fix missing ServerListPingEvent call for legacy pings Spigot Changes: 1dc156ce Rebuild patches 140f654d Mappings Update
This commit is contained in:
@@ -6,7 +6,7 @@ Subject: [PATCH] Lighting Queue
|
||||
This provides option to queue lighting updates to ensure they do not cause the server lag
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
index 145cb274b..eff9dcf54 100644
|
||||
--- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
@@ -0,0 +0,0 @@ public class WorldTimingsHandler {
|
||||
@@ -28,7 +28,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
|
||||
public static Timing getTickList(WorldServer worldserver, String timingsType) {
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
index fe148495b..cc69ff3a4 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperConfig {
|
||||
@@ -46,7 +46,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
boolean timings = getBoolean("timings.enabled", true);
|
||||
boolean verboseTimings = getBoolean("timings.verbose", true);
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
index 39d565db1..8f6f0288b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
@@ -63,7 +63,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
index da2548603..87ec4d1a2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -77,7 +77,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
private void g(boolean flag) {
|
||||
this.world.methodProfiler.a("recheckGaps");
|
||||
this.world.methodProfiler.enter("recheckGaps");
|
||||
- if (this.world.areChunksLoaded(new BlockPosition(this.locX * 16 + 8, 0, this.locZ * 16 + 8), 16)) {
|
||||
+ if (this.areNeighborsLoaded(1)) { // Paper
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
@@ -126,7 +126,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
|
||||
IMMEDIATE, QUEUED, CHECK;
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
index 60abc5f28..6a9b9fa2a 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
@@ -138,21 +138,21 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
// Update neighbor counts
|
||||
for (int x = -2; x < 3; x++) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
index 4acb908ec..194f8441e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
protected void a(BooleanSupplier booleansupplier) {
|
||||
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper
|
||||
this.slackActivityAccountant.tickStarted(); // Spigot
|
||||
- long i = SystemUtils.c();
|
||||
+ long i = SystemUtils.c(); long startTime = i; // Paper
|
||||
- long i = SystemUtils.getMonotonicNanos();
|
||||
+ long i = SystemUtils.getMonotonicNanos(); long startTime = i; // Paper
|
||||
|
||||
++this.ticks;
|
||||
if (this.S) {
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
this.methodProfiler.e();
|
||||
this.methodProfiler.e();
|
||||
this.methodProfiler.exit();
|
||||
this.methodProfiler.exit();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
+ PaperLightingQueue.processQueue(startTime); // Paper
|
||||
this.slackActivityAccountant.tickEnded(l); // Spigot
|
||||
@@ -160,7 +160,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PaperLightingQueue.java b/src/main/java/net/minecraft/server/PaperLightingQueue.java
|
||||
new file mode 100644
|
||||
index 7ac07ac07ac0..7ac07ac07ac0
|
||||
index 000000000..9783f3a0d
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/PaperLightingQueue.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -189,7 +189,7 @@ index 7ac07ac07ac0..7ac07ac07ac0
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ ObjectCollection<Chunk> loadedChunks = ((WorldServer) world).getChunkProviderServer().chunks.values();
|
||||
+ ObjectCollection<Chunk> loadedChunks = ((WorldServer) world).getChunkProvider().chunks.values();
|
||||
+ for (Chunk chunk : loadedChunks.toArray(new Chunk[0])) {
|
||||
+ if (chunk.lightingQueue.processQueue(startTime, maxTickTime)) {
|
||||
+ break START;
|
||||
@@ -263,16 +263,16 @@ index 7ac07ac07ac0..7ac07ac07ac0
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||
index 5d5a9f0bb..69f55d0dd 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
|
||||
if (iblockdata2.b(this, blockposition) != iblockdata1.b(this, blockposition) || iblockdata2.e() != iblockdata1.e()) {
|
||||
this.methodProfiler.a("checkLight");
|
||||
this.methodProfiler.enter("checkLight");
|
||||
- this.r(blockposition);
|
||||
+ chunk.runOrQueueLightUpdate(() -> this.r(blockposition)); // Paper - Queue light update
|
||||
this.methodProfiler.e();
|
||||
this.methodProfiler.exit();
|
||||
}
|
||||
|
||||
--
|
||||
Reference in New Issue
Block a user