rewrite chunk system checkpoint

This commit is contained in:
Spottedleaf
2023-06-07 22:21:04 -07:00
parent 977dc40767
commit 288a08c1af
46 changed files with 22423 additions and 111 deletions

View File

@@ -50,9 +50,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import org.slf4j.Logger;
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
private final IntBuffer timestamps;
@VisibleForTesting
protected final RegionBitmap usedSectors;
public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(true); // Paper
+ public final Path regionFile; // Paper
public RegionFile(Path file, Path directory, boolean dsync) throws IOException {
@@ -229,7 +229,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public CompoundTag read(ChunkPos pos) throws IOException {
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
// CraftBukkit end
try { // Paper
DataInputStream datainputstream = regionfile.getChunkDataInputStream(pos);
+ // Paper start