Updated Upstream (Paper)

Upstream has released updates that appears to apply and compile correctly

Paper Changes:
3cf2c52d9 Improve Light Optimizations more
This commit is contained in:
William Blake Galbreath
2020-07-30 21:09:00 -05:00
parent f148002ffb
commit e486798b7d
3 changed files with 14 additions and 14 deletions

View File

@@ -4022,7 +4022,7 @@ index c14cdb6024..8ec21eb955 100644
if (chunk != null) {
playerchunkmap.callbackExecutor.execute(() -> {
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index ad8a00e0fb..78e7f6bc31 100644
index 0c70689f52..5fecf514ee 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -119,31 +119,28 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -4122,7 +4122,7 @@ index ad8a00e0fb..78e7f6bc31 100644
public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, IAsyncTaskHandler<Runnable> iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, Supplier<WorldPersistentData> supplier, int i, boolean flag) {
super(new File(convertable_conversionsession.a(worldserver.getDimensionKey()), "region"), datafixer, flag);
//this.visibleChunks = this.updatingChunks.clone(); // Paper - no more cloning
@@ -433,6 +456,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -441,6 +464,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
PlayerChunkMap.this.sendChunk(player, new ChunkCoordIntPair(rangeX, rangeZ), null, true, false); // unloaded, loaded
});
// Paper end - no-tick view distance
@@ -4132,7 +4132,7 @@ index ad8a00e0fb..78e7f6bc31 100644
}
// Paper start - Chunk Prioritization
public void queueHolderUpdate(PlayerChunk playerchunk) {
@@ -746,6 +772,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -754,6 +780,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@Nullable
private PlayerChunk a(long i, int j, @Nullable PlayerChunk playerchunk, int k) {
@@ -4140,7 +4140,7 @@ index ad8a00e0fb..78e7f6bc31 100644
if (k > PlayerChunkMap.GOLDEN_TICKET && j > PlayerChunkMap.GOLDEN_TICKET) {
return playerchunk;
} else {
@@ -768,6 +795,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -776,6 +803,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
playerchunk.a(j);
} else {
playerchunk = new PlayerChunk(new ChunkCoordIntPair(i), j, this.lightEngine, this.p, this);
@@ -4148,7 +4148,7 @@ index ad8a00e0fb..78e7f6bc31 100644
}
this.updatingChunks.put(i, playerchunk);
@@ -959,7 +987,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -967,7 +995,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
com.destroystokyo.paper.io.PaperFileIOThread.Holder.INSTANCE.scheduleSave(this.world, chunkPos.x, chunkPos.z,
@@ -4157,7 +4157,7 @@ index ad8a00e0fb..78e7f6bc31 100644
if (!chunk.isNeedsSaving()) {
return;
@@ -993,7 +1021,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1001,7 +1029,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
asyncSaveData = ChunkRegionLoader.getAsyncSaveData(this.world, chunk);
}
@@ -4166,7 +4166,7 @@ index ad8a00e0fb..78e7f6bc31 100644
asyncSaveData, chunk);
chunk.setLastSaved(this.world.getTime());
@@ -1032,6 +1060,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1040,6 +1068,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.lightEngine.a(ichunkaccess.getPos());
this.lightEngine.queueUpdate();
this.worldLoadListener.a(ichunkaccess.getPos(), (ChunkStatus) null);
@@ -4174,7 +4174,7 @@ index ad8a00e0fb..78e7f6bc31 100644
}
}
@@ -1048,6 +1077,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1056,6 +1085,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
protected boolean b() {
@@ -4182,7 +4182,7 @@ index ad8a00e0fb..78e7f6bc31 100644
if (!this.updatingChunksModified) {
return false;
} else {
@@ -1235,7 +1265,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1243,7 +1273,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
// Paper end
this.mailboxWorldGen.a(ChunkTaskQueueSorter.a(playerchunk, runnable));
@@ -4194,7 +4194,7 @@ index ad8a00e0fb..78e7f6bc31 100644
}
protected void c(ChunkCoordIntPair chunkcoordintpair) {
@@ -1487,6 +1520,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1495,6 +1528,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
public void setViewDistance(int i) { // Paper - public
@@ -4202,7 +4202,7 @@ index ad8a00e0fb..78e7f6bc31 100644
int j = MathHelper.clamp(i + 1, 3, 33); // Paper - diff on change, these make the lower view distance limit 2 and the upper 32
if (j != this.viewDistance) {
@@ -1500,6 +1534,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1508,6 +1542,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
// Paper start - no-tick view distance
public final void setNoTickViewDistance(int viewDistance) {
@@ -4210,7 +4210,7 @@ index ad8a00e0fb..78e7f6bc31 100644
viewDistance = viewDistance == -1 ? -1 : MathHelper.clamp(viewDistance, 2, 32);
this.noTickViewDistance = viewDistance;
@@ -2026,23 +2061,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -2034,23 +2069,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private final void processTrackQueue() {
this.world.timings.tracker1.startTiming();
try {