|
|
|
|
@@ -76,10 +76,10 @@ index 0000000000000000000000000000000000000000..249303116d3cfadd078ebf0ae6e44bf9
|
|
|
|
|
+}
|
|
|
|
|
diff --git a/src/main/java/dev/kaiijumc/kaiiju/region/AbstractRegionFileFactory.java b/src/main/java/dev/kaiijumc/kaiiju/region/AbstractRegionFileFactory.java
|
|
|
|
|
new file mode 100644
|
|
|
|
|
index 0000000000000000000000000000000000000000..dcfbabf54b19a4c29d5c95830242c5c26bf2f4aa
|
|
|
|
|
index 0000000000000000000000000000000000000000..67991815a0ff9235a846ca8db817c90f094c4a58
|
|
|
|
|
--- /dev/null
|
|
|
|
|
+++ b/src/main/java/dev/kaiijumc/kaiiju/region/AbstractRegionFileFactory.java
|
|
|
|
|
@@ -0,0 +1,29 @@
|
|
|
|
|
@@ -0,0 +1,30 @@
|
|
|
|
|
+package dev.kaiijumc.kaiiju.region;
|
|
|
|
|
+
|
|
|
|
|
+import net.minecraft.world.level.chunk.storage.RegionFile;
|
|
|
|
|
@@ -89,21 +89,22 @@ index 0000000000000000000000000000000000000000..dcfbabf54b19a4c29d5c95830242c5c2
|
|
|
|
|
+import java.nio.file.Path;
|
|
|
|
|
+
|
|
|
|
|
+public class AbstractRegionFileFactory {
|
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(int linearCompression, Path file, Path directory, boolean dsync) throws IOException {
|
|
|
|
|
+ return getAbstractRegionFile(linearCompression, file, directory, RegionFileVersion.VERSION_DEFLATE, dsync);
|
|
|
|
|
+
|
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(int linearCompression, int linearInternalCompression, Path file, Path directory, boolean dsync) throws IOException {
|
|
|
|
|
+ return getAbstractRegionFile(linearCompression, linearInternalCompression, file, directory, RegionFileVersion.VERSION_DEFLATE, dsync);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(int linearCompression, Path file, Path directory, boolean dsync, boolean canRecalcHeader) throws IOException {
|
|
|
|
|
+ return getAbstractRegionFile(linearCompression, file, directory, RegionFileVersion.VERSION_DEFLATE, dsync, canRecalcHeader);
|
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(int linearCompression, int linearInternalCompression, Path file, Path directory, boolean dsync, boolean canRecalcHeader) throws IOException {
|
|
|
|
|
+ return getAbstractRegionFile(linearCompression, linearInternalCompression, file, directory, RegionFileVersion.VERSION_DEFLATE, dsync, canRecalcHeader);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(int linearCompression, Path file, Path directory, RegionFileVersion outputChunkStreamVersion, boolean dsync) throws IOException {
|
|
|
|
|
+ return getAbstractRegionFile(linearCompression, file, directory, outputChunkStreamVersion, dsync, false);
|
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(int linearCompression, int linearInternalCompression, Path file, Path directory, RegionFileVersion outputChunkStreamVersion, boolean dsync) throws IOException {
|
|
|
|
|
+ return getAbstractRegionFile(linearCompression, linearInternalCompression, file, directory, outputChunkStreamVersion, dsync, false);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(int linearCompression, Path file, Path directory, RegionFileVersion outputChunkStreamVersion, boolean dsync, boolean canRecalcHeader) throws IOException {
|
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(int linearCompression, int linearInternalCompression, Path file, Path directory, RegionFileVersion outputChunkStreamVersion, boolean dsync, boolean canRecalcHeader) throws IOException {
|
|
|
|
|
+ if (file.toString().endsWith(".linear")) {
|
|
|
|
|
+ return new LinearRegionFile(file, linearCompression);
|
|
|
|
|
+ return new LinearRegionFile(file, linearCompression, linearInternalCompression);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return new RegionFile(file, directory, outputChunkStreamVersion, dsync, canRecalcHeader);
|
|
|
|
|
+ }
|
|
|
|
|
@@ -111,18 +112,15 @@ index 0000000000000000000000000000000000000000..dcfbabf54b19a4c29d5c95830242c5c2
|
|
|
|
|
+}
|
|
|
|
|
diff --git a/src/main/java/dev/kaiijumc/kaiiju/region/LinearRegionFile.java b/src/main/java/dev/kaiijumc/kaiiju/region/LinearRegionFile.java
|
|
|
|
|
new file mode 100644
|
|
|
|
|
index 0000000000000000000000000000000000000000..f05d6313012560c32a3ec574b7169ec8e8930282
|
|
|
|
|
index 0000000000000000000000000000000000000000..df2edc187480aef6af1cbeb82824984e31672068
|
|
|
|
|
--- /dev/null
|
|
|
|
|
+++ b/src/main/java/dev/kaiijumc/kaiiju/region/LinearRegionFile.java
|
|
|
|
|
@@ -0,0 +1,334 @@
|
|
|
|
|
@@ -0,0 +1,325 @@
|
|
|
|
|
+package dev.kaiijumc.kaiiju.region;
|
|
|
|
|
+
|
|
|
|
|
+import com.github.luben.zstd.ZstdInputStream;
|
|
|
|
|
+import com.github.luben.zstd.Zstd;import com.github.luben.zstd.ZstdInputStream;
|
|
|
|
|
+import com.github.luben.zstd.ZstdOutputStream;
|
|
|
|
|
+import com.mojang.logging.LogUtils;
|
|
|
|
|
+import net.jpountz.lz4.LZ4Compressor;
|
|
|
|
|
+import net.jpountz.lz4.LZ4Factory;
|
|
|
|
|
+import net.jpountz.lz4.LZ4FastDecompressor;
|
|
|
|
|
+import net.jpountz.xxhash.XXHashFactory;
|
|
|
|
|
+import net.minecraft.nbt.CompoundTag;
|
|
|
|
|
+import net.minecraft.world.level.ChunkPos;
|
|
|
|
|
@@ -136,6 +134,7 @@ index 0000000000000000000000000000000000000000..f05d6313012560c32a3ec574b7169ec8
|
|
|
|
|
+import java.nio.file.Path;
|
|
|
|
|
+import java.nio.file.StandardCopyOption;
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
|
+import java.util.Arrays;
|
|
|
|
|
+import java.util.concurrent.locks.ReentrantLock;
|
|
|
|
|
+
|
|
|
|
|
+public class LinearRegionFile extends Thread implements AbstractRegionFile {
|
|
|
|
|
@@ -153,6 +152,7 @@ index 0000000000000000000000000000000000000000..f05d6313012560c32a3ec574b7169ec8
|
|
|
|
|
+ public Path regionFile;
|
|
|
|
|
+
|
|
|
|
|
+ private final int compressionLevel;
|
|
|
|
|
+ private final int internalCompressionLevel;
|
|
|
|
|
+
|
|
|
|
|
+ public Path getRegionFile() {
|
|
|
|
|
+ return this.regionFile;
|
|
|
|
|
@@ -162,13 +162,12 @@ index 0000000000000000000000000000000000000000..f05d6313012560c32a3ec574b7169ec8
|
|
|
|
|
+ return this.fileLock;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public LinearRegionFile(Path file, int compression) throws IOException {
|
|
|
|
|
+ public LinearRegionFile(Path file, int compression, int internalCompression) throws IOException {
|
|
|
|
|
+ this.regionFile = file;
|
|
|
|
|
+ this.compressionLevel = compression;
|
|
|
|
|
+ this.internalCompressionLevel = internalCompression;
|
|
|
|
|
+ File regionFile = new File(this.regionFile.toString());
|
|
|
|
|
+
|
|
|
|
|
+ LZ4Compressor compressor = LZ4Factory.fastestInstance().fastCompressor();
|
|
|
|
|
+
|
|
|
|
|
+ for (int i = 0; i < 32 * 32; i++)
|
|
|
|
|
+ this.bufferUncompressedSize[i] = 0;
|
|
|
|
|
+
|
|
|
|
|
@@ -184,21 +183,24 @@ index 0000000000000000000000000000000000000000..f05d6313012560c32a3ec574b7169ec8
|
|
|
|
|
+
|
|
|
|
|
+ long superBlock = rawDataStream.readLong();
|
|
|
|
|
+
|
|
|
|
|
+ if (superBlock != SUPERBLOCK)
|
|
|
|
|
+ throw new RuntimeException("Superblock invalid: " + superBlock + " file " + file);
|
|
|
|
|
+ if (superBlock != SUPERBLOCK) {
|
|
|
|
|
+ throw new IOException("SUPERBLOCK VERSION! " + file);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ byte version = rawDataStream.readByte();
|
|
|
|
|
+
|
|
|
|
|
+ if (version != VERSION)
|
|
|
|
|
+ throw new RuntimeException("Version invalid: " + version + " file " + file);
|
|
|
|
|
+ if (version != VERSION) {
|
|
|
|
|
+ throw new IOException("INVALID VERSION! " + file);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ rawDataStream.readLong(); // newestTimestamp
|
|
|
|
|
+ rawDataStream.readByte(); // Compression level
|
|
|
|
|
+ rawDataStream.readShort(); // Chunk count
|
|
|
|
|
+ int dataCount = rawDataStream.readInt();
|
|
|
|
|
+
|
|
|
|
|
+ if (fileLength != HEADER_SIZE + dataCount + FOOTER_SIZE)
|
|
|
|
|
+ if (fileLength != HEADER_SIZE + dataCount + FOOTER_SIZE) {
|
|
|
|
|
+ throw new IOException("File length invalid " + this.regionFile + " " + fileLength + " " + (HEADER_SIZE + dataCount + FOOTER_SIZE));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ rawDataStream.readLong(); // Data Hash
|
|
|
|
|
+ byte[] rawCompressed = new byte[dataCount];
|
|
|
|
|
@@ -225,11 +227,10 @@ index 0000000000000000000000000000000000000000..f05d6313012560c32a3ec574b7169ec8
|
|
|
|
|
+ byte[] b = new byte[size];
|
|
|
|
|
+ dataStream.readFully(b, 0, size);
|
|
|
|
|
+
|
|
|
|
|
+ int maxCompressedLength = compressor.maxCompressedLength(size);
|
|
|
|
|
+ int maxCompressedLength = (int)Zstd.compressBound(size);
|
|
|
|
|
+ byte[] compressed = new byte[maxCompressedLength];
|
|
|
|
|
+ int compressedLength = compressor.compress(b, 0, size, compressed, 0, maxCompressedLength);
|
|
|
|
|
+ b = new byte[compressedLength];
|
|
|
|
|
+ System.arraycopy(compressed, 0, b, 0, compressedLength);
|
|
|
|
|
+ long compressedLength = Zstd.compress(compressed, b, this.internalCompressionLevel);
|
|
|
|
|
+ b = Arrays.copyOfRange(compressed, 0, (int) compressedLength);
|
|
|
|
|
+
|
|
|
|
|
+ this.buffer[i] = b;
|
|
|
|
|
+ this.bufferUncompressedSize[i] = size;
|
|
|
|
|
@@ -262,7 +263,7 @@ index 0000000000000000000000000000000000000000..f05d6313012560c32a3ec574b7169ec8
|
|
|
|
|
+ try {
|
|
|
|
|
+ flush();
|
|
|
|
|
+ } catch(IOException ex) {
|
|
|
|
|
+ LOGGER.error("Region file " + this.regionFile.toAbsolutePath() + " flush failed");
|
|
|
|
|
+ LOGGER.error("Region file " + this.regionFile.toAbsolutePath() + " flush failed", ex);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ for(int i = 0 ; i < 100 ; i++) {
|
|
|
|
|
@@ -302,14 +303,12 @@ index 0000000000000000000000000000000000000000..f05d6313012560c32a3ec574b7169ec8
|
|
|
|
|
+ dataStream.writeLong(timestamp);
|
|
|
|
|
+ dataStream.writeByte(this.compressionLevel);
|
|
|
|
|
+
|
|
|
|
|
+ LZ4FastDecompressor decompressor = LZ4Factory.fastestInstance().fastDecompressor();
|
|
|
|
|
+
|
|
|
|
|
+ ArrayList<byte[]> byteBuffers = new ArrayList<>();
|
|
|
|
|
+ for(int i = 0 ; i < 32 * 32 ; i++) {
|
|
|
|
|
+ if(this.bufferUncompressedSize[i] != 0) {
|
|
|
|
|
+ chunkCount += 1;
|
|
|
|
|
+ byte[] content = new byte[bufferUncompressedSize[i]];
|
|
|
|
|
+ decompressor.decompress(buffer[i], 0, content, 0, bufferUncompressedSize[i]);
|
|
|
|
|
+ Zstd.decompress(content, buffer[i]);
|
|
|
|
|
+
|
|
|
|
|
+ byteBuffers.add(content);
|
|
|
|
|
+ } else byteBuffers.add(null);
|
|
|
|
|
@@ -345,18 +344,11 @@ index 0000000000000000000000000000000000000000..f05d6313012560c32a3ec574b7169ec8
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public synchronized void write(ChunkPos pos, ByteBuffer buffer) {
|
|
|
|
|
+ LZ4Compressor compressor = LZ4Factory.fastestInstance().fastCompressor();
|
|
|
|
|
+ try {
|
|
|
|
|
+ byte[] b = toByteArray(new ByteArrayInputStream(buffer.array()));
|
|
|
|
|
+ int uncompressedSize = b.length;
|
|
|
|
|
+
|
|
|
|
|
+ int maxCompressedLength = compressor.maxCompressedLength(b.length);
|
|
|
|
|
+ byte[] compressed = new byte[maxCompressedLength];
|
|
|
|
|
+ int compressedLength = compressor.compress(b, 0, b.length, compressed, 0, maxCompressedLength);
|
|
|
|
|
+ b = new byte[compressedLength];
|
|
|
|
|
+ System.arraycopy(compressed, 0, b, 0, compressedLength);
|
|
|
|
|
+
|
|
|
|
|
+ this.buffer[getChunkIndex(pos.x, pos.z)] = b;
|
|
|
|
|
+ byte[] compressed = Zstd.compress(b, this.internalCompressionLevel);
|
|
|
|
|
+ this.buffer[getChunkIndex(pos.x, pos.z)] = compressed;
|
|
|
|
|
+ this.bufferUncompressedSize[getChunkIndex(pos.x, pos.z)] = uncompressedSize;
|
|
|
|
|
+ } catch (IOException e) {
|
|
|
|
|
+ LOGGER.error("Chunk write IOException " + e + " " + this.regionFile);
|
|
|
|
|
@@ -398,10 +390,10 @@ index 0000000000000000000000000000000000000000..f05d6313012560c32a3ec574b7169ec8
|
|
|
|
|
+
|
|
|
|
|
+ @Nullable
|
|
|
|
|
+ public synchronized DataInputStream getChunkDataInputStream(ChunkPos pos) {
|
|
|
|
|
+ if(this.bufferUncompressedSize[getChunkIndex(pos.x, pos.z)] != 0) {
|
|
|
|
|
+ LZ4FastDecompressor decompressor = LZ4Factory.fastestInstance().fastDecompressor();
|
|
|
|
|
+ if (this.bufferUncompressedSize[getChunkIndex(pos.x, pos.z)] != 0) {
|
|
|
|
|
+ byte[] compressedData = this.buffer[getChunkIndex(pos.x, pos.z)];
|
|
|
|
|
+ byte[] content = new byte[bufferUncompressedSize[getChunkIndex(pos.x, pos.z)]];
|
|
|
|
|
+ decompressor.decompress(this.buffer[getChunkIndex(pos.x, pos.z)], 0, content, 0, bufferUncompressedSize[getChunkIndex(pos.x, pos.z)]);
|
|
|
|
|
+ Zstd.decompress(content, compressedData);
|
|
|
|
|
+ return new DataInputStream(new ByteArrayInputStream(content));
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
|
|
@@ -517,27 +509,29 @@ index a08cde4eefe879adcee7c4118bc38f98c5097ed0..1cfc20b7496f93aff1d6c2387dc5bb8b
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
diff --git a/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java b/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java
|
|
|
|
|
index 95cac7edae8ac64811fc6a2f6b97dd4a0fceb0b0..d21077fdcdeb14860ef6f05b7586650051f6d44b 100644
|
|
|
|
|
index 95cac7edae8ac64811fc6a2f6b97dd4a0fceb0b0..e340878efb93499acd7fdf83a66ead9b53210a76 100644
|
|
|
|
|
--- a/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java
|
|
|
|
|
+++ b/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java
|
|
|
|
|
@@ -83,9 +83,13 @@ public class ThreadedWorldUpgrader {
|
|
|
|
|
@@ -83,9 +83,15 @@ public class ThreadedWorldUpgrader {
|
|
|
|
|
}
|
|
|
|
|
LOGGER.info("Found " + regionFiles.length + " regionfiles to convert");
|
|
|
|
|
LOGGER.info("Starting conversion now for world " + this.worldName);
|
|
|
|
|
-
|
|
|
|
|
+ // Kaiiju start
|
|
|
|
|
+ String formatName = ((org.bukkit.craftbukkit.CraftWorld) org.bukkit.Bukkit.getWorld(worldName)).getHandle().kaiijuConfig.regionFormatName;
|
|
|
|
|
+ int linearCompression = ((org.bukkit.craftbukkit.CraftWorld) org.bukkit.Bukkit.getWorld(worldName)).getHandle().kaiijuConfig.regionFormatLinearCompressionLevel;
|
|
|
|
|
+ net.minecraft.server.level.ServerLevel level = ((org.bukkit.craftbukkit.CraftWorld) org.bukkit.Bukkit.getWorld(worldName)).getHandle();
|
|
|
|
|
+ String formatName = level.kaiijuConfig.regionFormatName;
|
|
|
|
|
+ int linearCompression = level.kaiijuConfig.regionFormatLinearCompressionLevel;
|
|
|
|
|
+ int internalLinearCompression = level.kaiijuConfig.regionFormatLinearInternalCompressionLevel;
|
|
|
|
|
+ LOGGER.info("Using format " + formatName + " (" + linearCompression + ")");
|
|
|
|
|
+ // Kaiiju end
|
|
|
|
|
final WorldInfo info = new WorldInfo(() -> worldPersistentData,
|
|
|
|
|
- new ChunkStorage(regionFolder.toPath(), this.dataFixer, false), this.removeCaches, this.dimensionType, this.generatorKey);
|
|
|
|
|
+ new ChunkStorage(formatName, linearCompression, regionFolder.toPath(), this.dataFixer, false), this.removeCaches, this.dimensionType, this.generatorKey); // Kaiiju
|
|
|
|
|
+ new ChunkStorage(formatName, linearCompression, internalLinearCompression, regionFolder.toPath(), this.dataFixer, false), this.removeCaches, this.dimensionType, this.generatorKey); // Kaiiju
|
|
|
|
|
|
|
|
|
|
long expectedChunks = (long)regionFiles.length * (32L * 32L);
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
|
|
|
index 75965afd7b4bed23a5ecf618c7f91ff5e7ffd92f..4f4a94f60c60eb8bf4214bfcfe6f963e16b39c98 100644
|
|
|
|
|
index 75965afd7b4bed23a5ecf618c7f91ff5e7ffd92f..3dd88803c5897ac856c107e7f54c3b73cba5adf8 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
|
|
|
@@ -291,7 +291,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
|
|
|
|
@@ -545,7 +539,7 @@ index 75965afd7b4bed23a5ecf618c7f91ff5e7ffd92f..4f4a94f60c60eb8bf4214bfcfe6f963e
|
|
|
|
|
|
|
|
|
|
public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
|
|
|
|
|
- super(session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync);
|
|
|
|
|
+ super(world.getLevel().kaiijuConfig.regionFormatName, world.getLevel().kaiijuConfig.regionFormatLinearCompressionLevel, session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync); // Kaiiju
|
|
|
|
|
+ super(world.getLevel().kaiijuConfig.regionFormatName, world.getLevel().kaiijuConfig.regionFormatLinearCompressionLevel, world.getLevel().kaiijuConfig.regionFormatLinearInternalCompressionLevel, session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync); // Kaiiju
|
|
|
|
|
// Paper - rewrite chunk system
|
|
|
|
|
this.tickingGenerated = new AtomicInteger();
|
|
|
|
|
this.playerMap = new PlayerMap();
|
|
|
|
|
@@ -554,7 +548,7 @@ index 75965afd7b4bed23a5ecf618c7f91ff5e7ffd92f..4f4a94f60c60eb8bf4214bfcfe6f963e
|
|
|
|
|
this.distanceManager = new ChunkMap.ChunkDistanceManager(executor, mainThreadExecutor);
|
|
|
|
|
this.overworldDataStorage = persistentStateManagerFactory;
|
|
|
|
|
- this.poiManager = new PoiManager(path.resolve("poi"), dataFixer, dsync, iregistrycustom, world);
|
|
|
|
|
+ this.poiManager = new PoiManager(this.level.kaiijuConfig.regionFormatName, this.level.kaiijuConfig.regionFormatLinearCompressionLevel, path.resolve("poi"), dataFixer, dsync, iregistrycustom, world); // Kaiiju
|
|
|
|
|
+ this.poiManager = new PoiManager(this.level.kaiijuConfig.regionFormatName, this.level.kaiijuConfig.regionFormatLinearCompressionLevel, this.level.kaiijuConfig.regionFormatLinearInternalCompressionLevel, path.resolve("poi"), dataFixer, dsync, iregistrycustom, world); // Kaiiju
|
|
|
|
|
this.setViewDistance(viewDistance);
|
|
|
|
|
// Paper start
|
|
|
|
|
this.dataRegionManager = new io.papermc.paper.chunk.SingleThreadChunkRegionManager(this.level, 2, (1.0 / 3.0), 1, 6, "Data", DataRegionData::new, DataRegionSectionData::new);
|
|
|
|
|
@@ -584,7 +578,7 @@ index 75965afd7b4bed23a5ecf618c7f91ff5e7ffd92f..4f4a94f60c60eb8bf4214bfcfe6f963e
|
|
|
|
|
regionFile.setStatus(chunkPos.x, chunkPos.z, ChunkSerializer.getStatus(compound));
|
|
|
|
|
}
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
|
|
|
index a5655ebb233f1e1e1dd7f79fdd948020478928fc..9510de3b100f217e3d24e93a9f2aef601ea03fac 100644
|
|
|
|
|
index a5655ebb233f1e1e1dd7f79fdd948020478928fc..92430e71f64d88352838ee9cf0f4d22c050e7acc 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
|
|
|
@@ -390,9 +390,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
|
|
|
|
@@ -594,8 +588,8 @@ index a5655ebb233f1e1e1dd7f79fdd948020478928fc..9510de3b100f217e3d24e93a9f2aef60
|
|
|
|
|
-
|
|
|
|
|
- public EntityRegionFileStorage(Path directory, boolean dsync) {
|
|
|
|
|
- super(directory, dsync);
|
|
|
|
|
+ public EntityRegionFileStorage(String format, int linearCompression, Path directory, boolean dsync) { // Kaiiju
|
|
|
|
|
+ super(format, linearCompression, directory, dsync); // Kaiiju
|
|
|
|
|
+ public EntityRegionFileStorage(String format, int linearCompression, int linearInternalCompression, Path directory, boolean dsync) { // Kaiiju
|
|
|
|
|
+ super(format, linearCompression, linearInternalCompression, directory, dsync); // Kaiiju
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void write(ChunkPos pos, net.minecraft.nbt.CompoundTag nbt) throws IOException {
|
|
|
|
|
@@ -604,12 +598,12 @@ index a5655ebb233f1e1e1dd7f79fdd948020478928fc..9510de3b100f217e3d24e93a9f2aef60
|
|
|
|
|
boolean flag2 = minecraftserver.forceSynchronousWrites();
|
|
|
|
|
DataFixer datafixer = minecraftserver.getFixerUpper();
|
|
|
|
|
- this.entityStorage = new EntityRegionFileStorage(convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), flag2); // Paper - rewrite chunk system //EntityPersistentStorage<Entity> entitypersistentstorage = new EntityStorage(this, convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), datafixer, flag2, minecraftserver);
|
|
|
|
|
+ this.entityStorage = new EntityRegionFileStorage(this.getLevel().kaiijuConfig.regionFormatName, this.getLevel().kaiijuConfig.regionFormatLinearCompressionLevel, convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), flag2); // Paper - rewrite chunk system //EntityPersistentStorage<Entity> entitypersistentstorage = new EntityStorage(this, convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), datafixer, flag2, minecraftserver); // Kaiiju
|
|
|
|
|
+ this.entityStorage = new EntityRegionFileStorage(this.getLevel().kaiijuConfig.regionFormatName, this.getLevel().kaiijuConfig.regionFormatLinearCompressionLevel, this.getLevel().kaiijuConfig.regionFormatLinearInternalCompressionLevel, convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), flag2); // Paper - rewrite chunk system //EntityPersistentStorage<Entity> entitypersistentstorage = new EntityStorage(this, convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), datafixer, flag2, minecraftserver); // Kaiiju
|
|
|
|
|
|
|
|
|
|
// this.entityManager = new PersistentEntitySectionManager<>(Entity.class, new ServerLevel.EntityCallbacks(), entitypersistentstorage, this.entitySliceManager); // Paper // Paper - rewrite chunk system
|
|
|
|
|
StructureTemplateManager structuretemplatemanager = minecraftserver.getStructureManager();
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
|
|
|
|
index 759b125cc1251b9b4f1f443c9f70c482ef5b32f8..728198d0584ab8d6ae80853850cf67ac262ef93a 100644
|
|
|
|
|
index 759b125cc1251b9b4f1f443c9f70c482ef5b32f8..761293b17cf12e28487034508906702bae2a3feb 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
|
|
|
|
@@ -61,7 +61,7 @@ public class WorldUpgrader {
|
|
|
|
|
@@ -621,7 +615,7 @@ index 759b125cc1251b9b4f1f443c9f70c482ef5b32f8..728198d0584ab8d6ae80853850cf67ac
|
|
|
|
|
private final DimensionDataStorage overworldDataStorage;
|
|
|
|
|
|
|
|
|
|
public WorldUpgrader(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, Registry<LevelStem> dimensionOptionsRegistry, boolean eraseCache) {
|
|
|
|
|
@@ -115,8 +115,12 @@ public class WorldUpgrader {
|
|
|
|
|
@@ -115,8 +115,14 @@ public class WorldUpgrader {
|
|
|
|
|
while (iterator1.hasNext()) {
|
|
|
|
|
ResourceKey<LevelStem> resourcekey1 = (ResourceKey) iterator1.next(); // CraftBukkit
|
|
|
|
|
Path path = this.levelStorage.getDimensionPath((ResourceKey) null); // CraftBukkit
|
|
|
|
|
@@ -629,14 +623,16 @@ index 759b125cc1251b9b4f1f443c9f70c482ef5b32f8..728198d0584ab8d6ae80853850cf67ac
|
|
|
|
|
- builder1.put(resourcekey1, new ChunkStorage(path.resolve("region"), this.dataFixer, true));
|
|
|
|
|
+ // Kaiiju start
|
|
|
|
|
+ String worldName = this.levelStorage.getLevelId();
|
|
|
|
|
+ String formatName = ((org.bukkit.craftbukkit.CraftWorld) org.bukkit.Bukkit.getWorld(worldName)).getHandle().kaiijuConfig.regionFormatName;
|
|
|
|
|
+ int linearCompression = ((org.bukkit.craftbukkit.CraftWorld) org.bukkit.Bukkit.getWorld(worldName)).getHandle().kaiijuConfig.regionFormatLinearCompressionLevel;
|
|
|
|
|
+ builder1.put(resourcekey1, new ChunkStorage(formatName, linearCompression, path.resolve("region"), this.dataFixer, true));
|
|
|
|
|
+ net.minecraft.server.level.ServerLevel level = ((org.bukkit.craftbukkit.CraftWorld) org.bukkit.Bukkit.getWorld(worldName)).getHandle();
|
|
|
|
|
+ String formatName = level.kaiijuConfig.regionFormatName;
|
|
|
|
|
+ int linearCompression = level.kaiijuConfig.regionFormatLinearCompressionLevel;
|
|
|
|
|
+ int linearInternalCompression = level.kaiijuConfig.regionFormatLinearInternalCompressionLevel;
|
|
|
|
|
+ builder1.put(resourcekey1, new ChunkStorage(formatName, linearCompression, linearInternalCompression, path.resolve("region"), this.dataFixer, true));
|
|
|
|
|
+ // Kaiiju end
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ImmutableMap<ResourceKey<LevelStem>, ChunkStorage> immutablemap1 = builder1.build(); // CraftBukkit
|
|
|
|
|
@@ -235,7 +239,7 @@ public class WorldUpgrader {
|
|
|
|
|
@@ -235,7 +241,7 @@ public class WorldUpgrader {
|
|
|
|
|
File file = this.levelStorage.getDimensionPath((ResourceKey) null).toFile(); // CraftBukkit
|
|
|
|
|
File file1 = new File(file, "region");
|
|
|
|
|
File[] afile = file1.listFiles((file2, s) -> {
|
|
|
|
|
@@ -645,21 +641,23 @@ index 759b125cc1251b9b4f1f443c9f70c482ef5b32f8..728198d0584ab8d6ae80853850cf67ac
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (afile == null) {
|
|
|
|
|
@@ -254,7 +258,11 @@ public class WorldUpgrader {
|
|
|
|
|
@@ -254,7 +260,13 @@ public class WorldUpgrader {
|
|
|
|
|
int l = Integer.parseInt(matcher.group(2)) << 5;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
- RegionFile regionfile = new RegionFile(file2.toPath(), file1.toPath(), true);
|
|
|
|
|
+ // Kaiiju start
|
|
|
|
|
+ String worldName = this.levelStorage.getLevelId();
|
|
|
|
|
+ int linearCompression = ((org.bukkit.craftbukkit.CraftWorld) org.bukkit.Bukkit.getWorld(worldName)).getHandle().kaiijuConfig.regionFormatLinearCompressionLevel;
|
|
|
|
|
+ dev.kaiijumc.kaiiju.region.AbstractRegionFile regionfile = dev.kaiijumc.kaiiju.region.AbstractRegionFileFactory.getAbstractRegionFile(linearCompression, file2.toPath(), file1.toPath(), true);
|
|
|
|
|
+ net.minecraft.server.level.ServerLevel level = ((org.bukkit.craftbukkit.CraftWorld) org.bukkit.Bukkit.getWorld(worldName)).getHandle();
|
|
|
|
|
+ int linearCompression = level.kaiijuConfig.regionFormatLinearCompressionLevel;
|
|
|
|
|
+ int linearInternalCompression = level.kaiijuConfig.regionFormatLinearInternalCompressionLevel;
|
|
|
|
|
+ dev.kaiijumc.kaiiju.region.AbstractRegionFile regionfile = dev.kaiijumc.kaiiju.region.AbstractRegionFileFactory.getAbstractRegionFile(linearCompression, linearInternalCompression, file2.toPath(), file1.toPath(), true);
|
|
|
|
|
+ // Kaiiju end
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
for (int i1 = 0; i1 < 32; ++i1) {
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java
|
|
|
|
|
index 8950b220b9a3512cd4667beb7bdec0e82e07edc6..71b38521fd2039bb2ddfdc5dc89341282869ce30 100644
|
|
|
|
|
index 8950b220b9a3512cd4667beb7bdec0e82e07edc6..ca93af37207a78e41b6d20333638bec32c11c416 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java
|
|
|
|
|
@@ -57,8 +57,8 @@ public class PoiManager extends SectionStorage<PoiSection> {
|
|
|
|
|
@@ -668,13 +666,13 @@ index 8950b220b9a3512cd4667beb7bdec0e82e07edc6..71b38521fd2039bb2ddfdc5dc8934128
|
|
|
|
|
|
|
|
|
|
- public PoiManager(Path path, DataFixer dataFixer, boolean dsync, RegistryAccess registryManager, LevelHeightAccessor world) {
|
|
|
|
|
- super(path, PoiSection::codec, PoiSection::new, dataFixer, DataFixTypes.POI_CHUNK, dsync, registryManager, world);
|
|
|
|
|
+ public PoiManager(String formatName, int linearCompression, Path path, DataFixer dataFixer, boolean dsync, RegistryAccess registryManager, LevelHeightAccessor world) { // Kaiiju
|
|
|
|
|
+ super(formatName, linearCompression, path, PoiSection::codec, PoiSection::new, dataFixer, DataFixTypes.POI_CHUNK, dsync, registryManager, world); // Kaiiju
|
|
|
|
|
+ public PoiManager(String formatName, int linearCompression, int linearInternalCompression, Path path, DataFixer dataFixer, boolean dsync, RegistryAccess registryManager, LevelHeightAccessor world) { // Kaiiju
|
|
|
|
|
+ super(formatName, linearCompression, linearInternalCompression, path, PoiSection::codec, PoiSection::new, dataFixer, DataFixTypes.POI_CHUNK, dsync, registryManager, world); // Kaiiju
|
|
|
|
|
this.world = (net.minecraft.server.level.ServerLevel)world; // Paper - rewrite chunk system
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
|
|
|
|
index 5a425be023d77f0370d102dfb52427147849ac1a..5396d6944cee6c3075fcfd030510254461569120 100644
|
|
|
|
|
index 5a425be023d77f0370d102dfb52427147849ac1a..527384a43f5c512273cce0d16a3bc887e24357c2 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
|
|
|
|
@@ -37,11 +37,12 @@ public class ChunkStorage implements AutoCloseable {
|
|
|
|
|
@@ -682,13 +680,13 @@ index 5a425be023d77f0370d102dfb52427147849ac1a..5396d6944cee6c3075fcfd0305102544
|
|
|
|
|
// Paper end - async chunk loading
|
|
|
|
|
|
|
|
|
|
- public ChunkStorage(Path directory, DataFixer dataFixer, boolean dsync) {
|
|
|
|
|
+ public ChunkStorage(String format, int linearCompression, Path directory, DataFixer dataFixer, boolean dsync) { // Kaiiju
|
|
|
|
|
+ public ChunkStorage(String format, int linearCompression, int linearInternalCompression, Path directory, DataFixer dataFixer, boolean dsync) { // Kaiiju
|
|
|
|
|
this.fixerUpper = dataFixer;
|
|
|
|
|
+
|
|
|
|
|
// Paper start - async chunk io
|
|
|
|
|
// remove IO worker
|
|
|
|
|
- this.regionFileCache = new RegionFileStorage(directory, dsync, true); // Paper - nuke IOWorker // Paper
|
|
|
|
|
+ this.regionFileCache = new RegionFileStorage(format, linearCompression, directory, dsync, true); // Paper - nuke IOWorker // Paper
|
|
|
|
|
+ this.regionFileCache = new RegionFileStorage(format, linearCompression, linearInternalCompression, directory, dsync, true); // Paper - nuke IOWorker // Paper // Kaiiju
|
|
|
|
|
// Paper end - async chunk io
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -754,10 +752,10 @@ index dcfe090c269d4cbcc2eb1b6f85392848bb34656c..d42c320179ae055b8675d1ce6ce1788e
|
|
|
|
|
try (DataInputStream out = new DataInputStream(new java.io.BufferedInputStream(new InflaterInputStream(Files.newInputStream(file))))) {
|
|
|
|
|
return NbtIo.read((java.io.DataInput) out);
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
|
|
|
|
index bd502ca721de0cab438d995efa00ad0554c0d2fe..04420204eef868d35491b61e95c04d6d2ce3cbad 100644
|
|
|
|
|
index bd502ca721de0cab438d995efa00ad0554c0d2fe..ad784bc53d5c9a4abb944ce21e5bb81b939ecbea 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
|
|
|
|
@@ -22,17 +22,25 @@ public class RegionFileStorage implements AutoCloseable {
|
|
|
|
|
@@ -22,17 +22,27 @@ public class RegionFileStorage implements AutoCloseable {
|
|
|
|
|
|
|
|
|
|
public static final String ANVIL_EXTENSION = ".mca";
|
|
|
|
|
private static final int MAX_CACHE_SIZE = 256;
|
|
|
|
|
@@ -768,26 +766,28 @@ index bd502ca721de0cab438d995efa00ad0554c0d2fe..04420204eef868d35491b61e95c04d6d
|
|
|
|
|
+ // Kaiiju start - Per world chunk format
|
|
|
|
|
+ public final String format;
|
|
|
|
|
+ public final int linearCompression;
|
|
|
|
|
+ public final int linearInternalCompression;
|
|
|
|
|
+ // Kaiiju end
|
|
|
|
|
|
|
|
|
|
private final boolean isChunkData; // Paper
|
|
|
|
|
|
|
|
|
|
- protected RegionFileStorage(Path directory, boolean dsync) { // Paper - protected constructor
|
|
|
|
|
+ protected RegionFileStorage(String format, int linearCompression, Path directory, boolean dsync) { // Paper - protected constructor
|
|
|
|
|
+ protected RegionFileStorage(String format, int linearCompression, int linearInternalCompression, Path directory, boolean dsync) { // Paper - protected constructor
|
|
|
|
|
// Paper start - add isChunkData param
|
|
|
|
|
- this(directory, dsync, false);
|
|
|
|
|
+ this(format, linearCompression, directory, dsync, false);
|
|
|
|
|
+ this(format, linearCompression, linearInternalCompression, directory, dsync, false);
|
|
|
|
|
}
|
|
|
|
|
- RegionFileStorage(Path directory, boolean dsync, boolean isChunkData) {
|
|
|
|
|
+ RegionFileStorage(String format, int linearCompression, Path directory, boolean dsync, boolean isChunkData) { // Kaiiju
|
|
|
|
|
+ RegionFileStorage(String format, int linearCompression, int linearInternalCompression, Path directory, boolean dsync, boolean isChunkData) { // Kaiiju
|
|
|
|
|
+ // Kaiiju start
|
|
|
|
|
+ this.format = format;
|
|
|
|
|
+ this.linearCompression = linearCompression;
|
|
|
|
|
+ this.linearInternalCompression = linearInternalCompression;
|
|
|
|
|
+ // Kaiiju end
|
|
|
|
|
this.isChunkData = isChunkData;
|
|
|
|
|
// Paper end - add isChunkData param
|
|
|
|
|
this.folder = directory;
|
|
|
|
|
@@ -42,7 +50,7 @@ public class RegionFileStorage implements AutoCloseable {
|
|
|
|
|
@@ -42,7 +52,7 @@ public class RegionFileStorage implements AutoCloseable {
|
|
|
|
|
// Paper start
|
|
|
|
|
public static @Nullable ChunkPos getRegionFileCoordinates(Path file) {
|
|
|
|
|
String fileName = file.getFileName().toString();
|
|
|
|
|
@@ -796,7 +796,7 @@ index bd502ca721de0cab438d995efa00ad0554c0d2fe..04420204eef868d35491b61e95c04d6d
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -62,49 +70,68 @@ public class RegionFileStorage implements AutoCloseable {
|
|
|
|
|
@@ -62,49 +72,66 @@ public class RegionFileStorage implements AutoCloseable {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -860,12 +860,10 @@ index bd502ca721de0cab438d995efa00ad0554c0d2fe..04420204eef868d35491b61e95c04d6d
|
|
|
|
|
+ };
|
|
|
|
|
+ path1 = path.resolve("r." + j + "." + chunkcoordintpair.getRegionZ() + "." + extension);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (dev.kaiijumc.kaiiju.KaiijuConfig.regionFormatDebug)
|
|
|
|
|
+ org.bukkit.Bukkit.getLogger().info("[Region File Storage] Opening file " + path1 + " with format " + this.format + " (existingOnly = " + existingOnly + " )");
|
|
|
|
|
+ //if (existingOnly && !java.nio.file.Files.exists(path1)) return null; // CraftBukkit
|
|
|
|
|
+ // Kaiiju end
|
|
|
|
|
+
|
|
|
|
|
+ dev.kaiijumc.kaiiju.region.AbstractRegionFile regionfile1 = dev.kaiijumc.kaiiju.region.AbstractRegionFileFactory.getAbstractRegionFile(this.linearCompression, path1, this.folder, this.sync, this.isChunkData); // Paper - allow for chunk regionfiles to regen header // Kaiiju
|
|
|
|
|
+ dev.kaiijumc.kaiiju.region.AbstractRegionFile regionfile1 = dev.kaiijumc.kaiiju.region.AbstractRegionFileFactory.getAbstractRegionFile(this.linearCompression, this.linearInternalCompression, path1, this.folder, this.sync, this.isChunkData); // Paper - allow for chunk regionfiles to regen header // Kaiiju
|
|
|
|
|
|
|
|
|
|
this.regionCache.putAndMoveToFirst(i, regionfile1);
|
|
|
|
|
// Paper start
|
|
|
|
|
@@ -980,7 +978,7 @@ index bd502ca721de0cab438d995efa00ad0554c0d2fe..04420204eef868d35491b61e95c04d6d
|
|
|
|
|
regionfile.flush();
|
|
|
|
|
}
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
|
|
|
|
index d783072bc964e45c308197e6f79874eb4a09f871..261613054a4ba0e78ad1aec819d743eaaae01cf2 100644
|
|
|
|
|
index d783072bc964e45c308197e6f79874eb4a09f871..f335bb86031c4efbc88f44d542eefcc6815cd2b7 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
|
|
|
|
@@ -47,8 +47,8 @@ public class SectionStorage<R> extends RegionFileStorage implements AutoCloseabl
|
|
|
|
|
@@ -989,8 +987,8 @@ index d783072bc964e45c308197e6f79874eb4a09f871..261613054a4ba0e78ad1aec819d743ea
|
|
|
|
|
|
|
|
|
|
- public SectionStorage(Path path, Function<Runnable, Codec<R>> codecFactory, Function<Runnable, R> factory, DataFixer dataFixer, DataFixTypes dataFixTypes, boolean dsync, RegistryAccess dynamicRegistryManager, LevelHeightAccessor world) {
|
|
|
|
|
- super(path, dsync); // Paper - remove mojang I/O thread
|
|
|
|
|
+ public SectionStorage(String format, int linearCompression, Path path, Function<Runnable, Codec<R>> codecFactory, Function<Runnable, R> factory, DataFixer dataFixer, DataFixTypes dataFixTypes, boolean dsync, RegistryAccess dynamicRegistryManager, LevelHeightAccessor world) { // Kaiiju
|
|
|
|
|
+ super(format, linearCompression, path, dsync); // Paper - remove mojang I/O thread // Kaiiju
|
|
|
|
|
+ public SectionStorage(String format, int linearCompression, int linearInternalCompression, Path path, Function<Runnable, Codec<R>> codecFactory, Function<Runnable, R> factory, DataFixer dataFixer, DataFixTypes dataFixTypes, boolean dsync, RegistryAccess dynamicRegistryManager, LevelHeightAccessor world) { // Kaiiju
|
|
|
|
|
+ super(format, linearCompression, linearInternalCompression, path, dsync); // Paper - remove mojang I/O thread // Kaiiju
|
|
|
|
|
this.codec = codecFactory;
|
|
|
|
|
this.factory = factory;
|
|
|
|
|
this.fixerUpper = dataFixer;
|
|
|
|
|
|