diff --git a/.docs/faq.md b/.docs/faq.md index 54521fc..c5f542b 100644 --- a/.docs/faq.md +++ b/.docs/faq.md @@ -13,6 +13,10 @@ Yes, you can! However, that requires doing some extra steps. Take a look at the Multiverse-Core detects SWM worlds as unloaded, as it cannot find the world directory, and then just ignores them. Although there should be no issues, MV commands won't work with SWM worlds. +* It appears that my reflections aren't working after installing, what happened? + +Follow the instructions found on this Spigot post in regards to relocation; https://www.spigotmc.org/threads/issue-with-reflections-library-and-multiple-plugins.397903/ + * What's the world size limit? The Slime Region Format can handle up a 46340x4630 chunk area. That's the maximum size that SWM can _theoretically_ handle, given enough memory. However, having a world so big is not recommended at all. diff --git a/swoftyworldmanager-plugin/src/main/java/net/swofty/swm/plugin/world/importer/LevelData.java b/swoftyworldmanager-plugin/src/main/java/net/swofty/swm/plugin/world/importer/LevelData.java index 0031a73..a4d8ec5 100644 --- a/swoftyworldmanager-plugin/src/main/java/net/swofty/swm/plugin/world/importer/LevelData.java +++ b/swoftyworldmanager-plugin/src/main/java/net/swofty/swm/plugin/world/importer/LevelData.java @@ -8,7 +8,6 @@ @Getter @RequiredArgsConstructor public class LevelData { - private final Map gameRules; private final int spawnX; diff --git a/swoftyworldmanager-plugin/src/main/java/net/swofty/swm/plugin/world/importer/WorldImporter.java b/swoftyworldmanager-plugin/src/main/java/net/swofty/swm/plugin/world/importer/WorldImporter.java index 9fc6c90..789b5e1 100644 --- a/swoftyworldmanager-plugin/src/main/java/net/swofty/swm/plugin/world/importer/WorldImporter.java +++ b/swoftyworldmanager-plugin/src/main/java/net/swofty/swm/plugin/world/importer/WorldImporter.java @@ -115,9 +115,6 @@ private static LevelData readLevelData(File file) throws IOException, InvalidWor Optional dataTag = tag.get().getAsCompoundTag("Data"); if (dataTag.isPresent()) { - // Data version - int dataVersion = dataTag.get().getIntValue("DataVersion").orElse(-1); - // Game rules Map gameRules = new HashMap<>(); Optional rulesList = dataTag.get().getAsCompoundTag("GameRules"); @@ -154,7 +151,6 @@ private static List loadChunks(File file) throws IOException { } List loadedChunks = chunks.stream().map((entry) -> { - try { DataInputStream headerStream = new DataInputStream(new ByteArrayInputStream(regionByteArray, entry.getOffset(), entry.getPaddedSize())); @@ -205,13 +201,8 @@ private static SlimeChunk readChunk(CompoundTag compound) { biomes = null; } - Optional optionalHeightMaps = compound.getAsCompoundTag("Heightmaps"); - CompoundTag heightMapsCompound; - - // Pre 1.13 world - + CompoundTag heightMapsCompound = new CompoundTag("", new CompoundMap()); int[] heightMap = compound.getIntArrayValue("HeightMap").orElse(new int[256]); - heightMapsCompound = new CompoundTag("", new CompoundMap()); heightMapsCompound.getValue().put("heightMap", new IntArrayTag("heightMap", heightMap)); List tileEntities = ((ListTag) compound.getAsListTag("TileEntities") @@ -224,11 +215,6 @@ private static SlimeChunk readChunk(CompoundTag compound) { for (CompoundTag sectionTag : sectionsTag.getValue()) { int index = sectionTag.getByteValue("Y").get(); - if (index < 0) { - // For some reason MC 1.14 worlds contain an empty section with Y = -1. - continue; - } - byte[] blocks = sectionTag.getByteArrayValue("Blocks").orElse(null); NibbleArray dataArray; ListTag paletteTag; @@ -278,16 +264,6 @@ private static boolean isEmpty(byte[] array) { return true; } - private static boolean isEmpty(long[] array) { - for (long b : array) { - if (b != 0L) { - return false; - } - } - - return true; - } - @Getter @RequiredArgsConstructor private static class ChunkEntry {