|
|
|
@@ -8,7 +8,7 @@ Copyright xymb@endcrystal.me
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
|
|
index 7f1f4988a25a5ebac36c25c045c51eefecab6862..09f9a12da1807dd72a95378b4824d9a09f7ccbfe 100644
|
|
|
|
index abfd4d5faf23511284b4efac771ef79da0ef72da..0a6549d0f545e81ae95527797333f2e2da85e1f1 100644
|
|
|
|
--- a/build.gradle.kts
|
|
|
|
--- a/build.gradle.kts
|
|
|
|
+++ b/build.gradle.kts
|
|
|
|
+++ b/build.gradle.kts
|
|
|
|
@@ -13,6 +13,10 @@ dependencies {
|
|
|
|
@@ -13,6 +13,10 @@ dependencies {
|
|
|
|
@@ -76,36 +76,19 @@ 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
|
|
|
|
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
|
|
|
|
new file mode 100644
|
|
|
|
index 0000000000000000000000000000000000000000..a470609b107f46ffc3bb7b121525ca8b803b4322
|
|
|
|
index 0000000000000000000000000000000000000000..dcfbabf54b19a4c29d5c95830242c5c26bf2f4aa
|
|
|
|
--- /dev/null
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/src/main/java/dev/kaiijumc/kaiiju/region/AbstractRegionFileFactory.java
|
|
|
|
+++ b/src/main/java/dev/kaiijumc/kaiiju/region/AbstractRegionFileFactory.java
|
|
|
|
@@ -0,0 +1,46 @@
|
|
|
|
@@ -0,0 +1,29 @@
|
|
|
|
+package dev.kaiijumc.kaiiju.region;
|
|
|
|
+package dev.kaiijumc.kaiiju.region;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+import net.minecraft.world.level.chunk.storage.RegionFile;
|
|
|
|
+import net.minecraft.world.level.chunk.storage.RegionFile;
|
|
|
|
+import net.minecraft.world.level.chunk.storage.RegionFileVersion;
|
|
|
|
+import net.minecraft.world.level.chunk.storage.RegionFileVersion;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+import java.io.File;
|
|
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
|
+import java.io.IOException;
|
|
|
|
+import java.nio.file.Path;
|
|
|
|
+import java.nio.file.Path;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+public class AbstractRegionFileFactory {
|
|
|
|
+public class AbstractRegionFileFactory {
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(Path file, Path directory, boolean dsync) throws IOException {
|
|
|
|
|
|
|
|
+ return getAbstractRegionFile(file, directory, RegionFileVersion.VERSION_DEFLATE, dsync);
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(Path file, Path directory, boolean dsync, boolean canRecalcHeader) throws IOException {
|
|
|
|
|
|
|
|
+ return getAbstractRegionFile(file, directory, RegionFileVersion.VERSION_DEFLATE, dsync, canRecalcHeader);
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(Path file, Path directory, RegionFileVersion outputChunkStreamVersion, boolean dsync) throws IOException {
|
|
|
|
|
|
|
|
+ return getAbstractRegionFile(file, directory, outputChunkStreamVersion, dsync, false);
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(Path file, Path directory, RegionFileVersion outputChunkStreamVersion, boolean dsync, boolean canRecalcHeader) throws IOException {
|
|
|
|
|
|
|
|
+ return getAbstractRegionFile(1, file, directory, outputChunkStreamVersion, dsync, canRecalcHeader);
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(int linearCompression, Path file, Path directory, boolean dsync) throws IOException {
|
|
|
|
+ public static AbstractRegionFile getAbstractRegionFile(int linearCompression, Path file, Path directory, boolean dsync) throws IOException {
|
|
|
|
+ return getAbstractRegionFile(linearCompression, file, directory, RegionFileVersion.VERSION_DEFLATE, dsync);
|
|
|
|
+ return getAbstractRegionFile(linearCompression, file, directory, RegionFileVersion.VERSION_DEFLATE, dsync);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
@@ -128,16 +111,15 @@ index 0000000000000000000000000000000000000000..a470609b107f46ffc3bb7b121525ca8b
|
|
|
|
+}
|
|
|
|
+}
|
|
|
|
diff --git a/src/main/java/dev/kaiijumc/kaiiju/region/LinearRegionFile.java b/src/main/java/dev/kaiijumc/kaiiju/region/LinearRegionFile.java
|
|
|
|
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
|
|
|
|
new file mode 100644
|
|
|
|
index 0000000000000000000000000000000000000000..2e0d10ded886e82c09700a1c6602cd1bb9d1967e
|
|
|
|
index 0000000000000000000000000000000000000000..f05d6313012560c32a3ec574b7169ec8e8930282
|
|
|
|
--- /dev/null
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/src/main/java/dev/kaiijumc/kaiiju/region/LinearRegionFile.java
|
|
|
|
+++ b/src/main/java/dev/kaiijumc/kaiiju/region/LinearRegionFile.java
|
|
|
|
@@ -0,0 +1,342 @@
|
|
|
|
@@ -0,0 +1,334 @@
|
|
|
|
+package dev.kaiijumc.kaiiju.region;
|
|
|
|
+package dev.kaiijumc.kaiiju.region;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+import com.github.luben.zstd.ZstdInputStream;
|
|
|
|
+import com.github.luben.zstd.ZstdInputStream;
|
|
|
|
+import com.github.luben.zstd.ZstdOutputStream;
|
|
|
|
+import com.github.luben.zstd.ZstdOutputStream;
|
|
|
|
+import com.mojang.logging.LogUtils;
|
|
|
|
+import com.mojang.logging.LogUtils;
|
|
|
|
+import dev.kaiijumc.kaiiju.KaiijuConfig;
|
|
|
|
|
|
|
|
+import net.jpountz.lz4.LZ4Compressor;
|
|
|
|
+import net.jpountz.lz4.LZ4Compressor;
|
|
|
|
+import net.jpountz.lz4.LZ4Factory;
|
|
|
|
+import net.jpountz.lz4.LZ4Factory;
|
|
|
|
+import net.jpountz.lz4.LZ4FastDecompressor;
|
|
|
|
+import net.jpountz.lz4.LZ4FastDecompressor;
|
|
|
|
@@ -202,28 +184,21 @@ index 0000000000000000000000000000000000000000..2e0d10ded886e82c09700a1c6602cd1b
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ long superBlock = rawDataStream.readLong();
|
|
|
|
+ long superBlock = rawDataStream.readLong();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (superBlock != SUPERBLOCK) {
|
|
|
|
+ if (superBlock != SUPERBLOCK)
|
|
|
|
+ System.out.println(file);
|
|
|
|
+ throw new RuntimeException("Superblock invalid: " + superBlock + " file " + file);
|
|
|
|
+ System.out.println("SUPERBLOCK INVALID!");
|
|
|
|
|
|
|
|
+ return;
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ byte version = rawDataStream.readByte();
|
|
|
|
+ byte version = rawDataStream.readByte();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (version != VERSION) {
|
|
|
|
+ if (version != VERSION)
|
|
|
|
+ System.out.println(file);
|
|
|
|
+ throw new RuntimeException("Version invalid: " + version + " file " + file);
|
|
|
|
+ System.out.println("VERSION INVALID!");
|
|
|
|
|
|
|
|
+ return;
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ rawDataStream.readLong(); // newestTimestamp
|
|
|
|
+ rawDataStream.readLong(); // newestTimestamp
|
|
|
|
+ rawDataStream.readByte(); // Compression level
|
|
|
|
+ rawDataStream.readByte(); // Compression level
|
|
|
|
+ rawDataStream.readShort(); // Chunk count
|
|
|
|
+ rawDataStream.readShort(); // Chunk count
|
|
|
|
+ int dataCount = rawDataStream.readInt();
|
|
|
|
+ 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));
|
|
|
|
+ throw new IOException("File length invalid " + this.regionFile + " " + fileLength + " " + (HEADER_SIZE + dataCount + FOOTER_SIZE));
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ rawDataStream.readLong(); // Data Hash
|
|
|
|
+ rawDataStream.readLong(); // Data Hash
|
|
|
|
+ byte[] rawCompressed = new byte[dataCount];
|
|
|
|
+ byte[] rawCompressed = new byte[dataCount];
|
|
|
|
@@ -609,7 +584,7 @@ index 75965afd7b4bed23a5ecf618c7f91ff5e7ffd92f..4f4a94f60c60eb8bf4214bfcfe6f963e
|
|
|
|
regionFile.setStatus(chunkPos.x, chunkPos.z, ChunkSerializer.getStatus(compound));
|
|
|
|
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
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
|
|
index b396a329e753f42b3878736b6b14bafda02d3744..906d394bbb80b9069645d01a319a9fab24c42288 100644
|
|
|
|
index a5655ebb233f1e1e1dd7f79fdd948020478928fc..9510de3b100f217e3d24e93a9f2aef601ea03fac 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
|
|
+++ b/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 {
|
|
|
|
@@ -390,9 +390,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
|
|
|
@@ -634,18 +609,9 @@ index b396a329e753f42b3878736b6b14bafda02d3744..906d394bbb80b9069645d01a319a9fab
|
|
|
|
// this.entityManager = new PersistentEntitySectionManager<>(Entity.class, new ServerLevel.EntityCallbacks(), entitypersistentstorage, this.entitySliceManager); // Paper // Paper - rewrite chunk system
|
|
|
|
// this.entityManager = new PersistentEntitySectionManager<>(Entity.class, new ServerLevel.EntityCallbacks(), entitypersistentstorage, this.entitySliceManager); // Paper // Paper - rewrite chunk system
|
|
|
|
StructureTemplateManager structuretemplatemanager = minecraftserver.getStructureManager();
|
|
|
|
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
|
|
|
|
diff --git a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
|
|
|
index 759b125cc1251b9b4f1f443c9f70c482ef5b32f8..74bc03e43096c865bba36b15aa248b9dc3481828 100644
|
|
|
|
index 759b125cc1251b9b4f1f443c9f70c482ef5b32f8..728198d0584ab8d6ae80853850cf67ac262ef93a 100644
|
|
|
|
--- a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
|
|
|
--- a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
|
|
|
+++ b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
|
|
|
+++ b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
|
|
|
@@ -41,7 +41,7 @@ import net.minecraft.world.level.chunk.storage.RegionFile;
|
|
|
|
|
|
|
|
import net.minecraft.world.level.dimension.LevelStem;
|
|
|
|
|
|
|
|
import net.minecraft.world.level.storage.DimensionDataStorage;
|
|
|
|
|
|
|
|
import net.minecraft.world.level.storage.LevelStorageSource;
|
|
|
|
|
|
|
|
-import org.slf4j.Logger;
|
|
|
|
|
|
|
|
+import org.bukkit.Bukkit;import org.bukkit.craftbukkit.CraftWorld;import org.slf4j.Logger;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class WorldUpgrader {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -61,7 +61,7 @@ public class WorldUpgrader {
|
|
|
|
@@ -61,7 +61,7 @@ public class WorldUpgrader {
|
|
|
|
private volatile int skipped;
|
|
|
|
private volatile int skipped;
|
|
|
|
private final Object2FloatMap<ResourceKey<LevelStem>> progressMap = Object2FloatMaps.synchronize(new Object2FloatOpenCustomHashMap(Util.identityStrategy())); // CraftBukkit
|
|
|
|
private final Object2FloatMap<ResourceKey<LevelStem>> progressMap = Object2FloatMaps.synchronize(new Object2FloatOpenCustomHashMap(Util.identityStrategy())); // CraftBukkit
|
|
|
|
@@ -655,7 +621,7 @@ index 759b125cc1251b9b4f1f443c9f70c482ef5b32f8..74bc03e43096c865bba36b15aa248b9d
|
|
|
|
private final DimensionDataStorage overworldDataStorage;
|
|
|
|
private final DimensionDataStorage overworldDataStorage;
|
|
|
|
|
|
|
|
|
|
|
|
public WorldUpgrader(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, Registry<LevelStem> dimensionOptionsRegistry, boolean eraseCache) {
|
|
|
|
public WorldUpgrader(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, Registry<LevelStem> dimensionOptionsRegistry, boolean eraseCache) {
|
|
|
|
@@ -115,8 +115,11 @@ public class WorldUpgrader {
|
|
|
|
@@ -115,8 +115,12 @@ public class WorldUpgrader {
|
|
|
|
while (iterator1.hasNext()) {
|
|
|
|
while (iterator1.hasNext()) {
|
|
|
|
ResourceKey<LevelStem> resourcekey1 = (ResourceKey) iterator1.next(); // CraftBukkit
|
|
|
|
ResourceKey<LevelStem> resourcekey1 = (ResourceKey) iterator1.next(); // CraftBukkit
|
|
|
|
Path path = this.levelStorage.getDimensionPath((ResourceKey) null); // CraftBukkit
|
|
|
|
Path path = this.levelStorage.getDimensionPath((ResourceKey) null); // CraftBukkit
|
|
|
|
@@ -663,13 +629,14 @@ index 759b125cc1251b9b4f1f443c9f70c482ef5b32f8..74bc03e43096c865bba36b15aa248b9d
|
|
|
|
- builder1.put(resourcekey1, new ChunkStorage(path.resolve("region"), this.dataFixer, true));
|
|
|
|
- builder1.put(resourcekey1, new ChunkStorage(path.resolve("region"), this.dataFixer, true));
|
|
|
|
+ // Kaiiju start
|
|
|
|
+ // Kaiiju start
|
|
|
|
+ String worldName = this.levelStorage.getLevelId();
|
|
|
|
+ String worldName = this.levelStorage.getLevelId();
|
|
|
|
+ String formatName = ((CraftWorld) Bukkit.getWorld(worldName)).getHandle().kaiijuConfig.regionFormatName;
|
|
|
|
+ String formatName = ((org.bukkit.craftbukkit.CraftWorld) org.bukkit.Bukkit.getWorld(worldName)).getHandle().kaiijuConfig.regionFormatName;
|
|
|
|
+ builder1.put(resourcekey1, new ChunkStorage(formatName, 6, path.resolve("region"), this.dataFixer, true));
|
|
|
|
+ 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));
|
|
|
|
+ // Kaiiju end
|
|
|
|
+ // Kaiiju end
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ImmutableMap<ResourceKey<LevelStem>, ChunkStorage> immutablemap1 = builder1.build(); // CraftBukkit
|
|
|
|
ImmutableMap<ResourceKey<LevelStem>, ChunkStorage> immutablemap1 = builder1.build(); // CraftBukkit
|
|
|
|
@@ -235,7 +238,7 @@ public class WorldUpgrader {
|
|
|
|
@@ -235,7 +239,7 @@ public class WorldUpgrader {
|
|
|
|
File file = this.levelStorage.getDimensionPath((ResourceKey) null).toFile(); // CraftBukkit
|
|
|
|
File file = this.levelStorage.getDimensionPath((ResourceKey) null).toFile(); // CraftBukkit
|
|
|
|
File file1 = new File(file, "region");
|
|
|
|
File file1 = new File(file, "region");
|
|
|
|
File[] afile = file1.listFiles((file2, s) -> {
|
|
|
|
File[] afile = file1.listFiles((file2, s) -> {
|
|
|
|
@@ -678,12 +645,16 @@ index 759b125cc1251b9b4f1f443c9f70c482ef5b32f8..74bc03e43096c865bba36b15aa248b9d
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (afile == null) {
|
|
|
|
if (afile == null) {
|
|
|
|
@@ -254,7 +257,7 @@ public class WorldUpgrader {
|
|
|
|
@@ -254,7 +258,11 @@ public class WorldUpgrader {
|
|
|
|
int l = Integer.parseInt(matcher.group(2)) << 5;
|
|
|
|
int l = Integer.parseInt(matcher.group(2)) << 5;
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
- RegionFile regionfile = new RegionFile(file2.toPath(), file1.toPath(), true);
|
|
|
|
- RegionFile regionfile = new RegionFile(file2.toPath(), file1.toPath(), true);
|
|
|
|
+ dev.kaiijumc.kaiiju.region.AbstractRegionFile regionfile = dev.kaiijumc.kaiiju.region.AbstractRegionFileFactory.getAbstractRegionFile(file2.toPath(), file1.toPath(), true); // Kaiiju
|
|
|
|
+ // 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);
|
|
|
|
|
|
|
|
+ // Kaiiju end
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
for (int i1 = 0; i1 < 32; ++i1) {
|
|
|
|
for (int i1 = 0; i1 < 32; ++i1) {
|
|
|
|
@@ -1022,7 +993,7 @@ index d783072bc964e45c308197e6f79874eb4a09f871..261613054a4ba0e78ad1aec819d743ea
|
|
|
|
this.factory = factory;
|
|
|
|
this.factory = factory;
|
|
|
|
this.fixerUpper = dataFixer;
|
|
|
|
this.fixerUpper = dataFixer;
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
|
|
index 9b5323edd99848b73ea0e34230e7bec8dc23be8c..619c7713d573e8f438ea23a3fcb185a98abf5100 100644
|
|
|
|
index 6a327616cd590b70170f8441c003a2109640201d..2ef0a41fd9ee60bc0866cf5c678498c68250689c 100644
|
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
|
|
@@ -552,7 +552,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
|
|
|
@@ -552,7 +552,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
|
|
|
|