13
0
geforkt von Mirrors/Paper

Don't read neighbour chunk data off disk when converting chunks

Lighting is purged on update anyways, so let's not add more
into the conversion process
Dieser Commit ist enthalten in:
Spottedleaf 2021-04-11 02:58:48 -07:00
Ursprung ebaf017f9c
Commit 698c758855

Datei anzeigen

@ -18,7 +18,7 @@
import net.minecraft.world.level.levelgen.structure.LegacyStructureDataHandler;
import net.minecraft.world.level.storage.DimensionDataStorage;
@@ -39,27 +45,85 @@
@@ -39,27 +45,86 @@
return this.worker.isOldChunkAround(chunkPos, checkRadius);
}
@ -26,6 +26,7 @@
- int i = ChunkStorage.getVersion(nbt);
+ // CraftBukkit start
+ private boolean check(ServerChunkCache cps, int x, int z) {
+ if (true) return true; // Paper - Perf: this isn't even needed anymore, light is purged updating to 1.14+, why are we holding up the conversion process reading chunk data off disk - return true, we need to set light populated to true so the converter recognizes the chunk as being "full"
+ ChunkPos pos = new ChunkPos(x, z);
+ if (cps != null) {
+ com.google.common.base.Preconditions.checkState(org.bukkit.Bukkit.isPrimaryThread(), "primary thread");
@ -116,7 +117,7 @@
} catch (Exception exception) {
CrashReport crashreport = CrashReport.forThrowable(exception, "Updated chunk");
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Updated chunk details");
@@ -70,7 +134,7 @@
@@ -70,7 +135,7 @@
}
}
@ -125,7 +126,7 @@
LegacyStructureDataHandler persistentstructurelegacy = this.legacyStructureHandler;
if (persistentstructurelegacy == null) {
@@ -85,7 +149,7 @@
@@ -85,7 +150,7 @@
return persistentstructurelegacy;
}
@ -134,7 +135,7 @@
CompoundTag nbttagcompound1 = new CompoundTag();
nbttagcompound1.putString("dimension", worldKey.location().toString());
@@ -108,8 +172,19 @@
@@ -108,8 +173,19 @@
}
public CompletableFuture<Void> write(ChunkPos chunkPos, Supplier<CompoundTag> nbtSupplier) {