Closed Hycord closed 1 month ago
I pulled the whole world from our server and was able to load it fine in single player, but when I convert it using polar it is just a void world
The file is like 100kb
// In server init WorldManager.FromAnvil(Path.of("data/worlds/lobby"), "lobby"); // WorldManager public static Path FromAnvil(Path anvilPath, String worldName) { Path worldFile = worldFolder.resolve(worldName + ".polar"); try { if (!Files.exists(worldFile)) { LogManager.info("Converting world file to " + worldFile.toString()); PolarWorld polarWorld = AnvilPolar.anvilToPolar(anvilPath); byte[] polarWorldBytes = PolarWriter.write(polarWorld); Files.write(worldFile, polarWorldBytes, StandardOpenOption.CREATE); LogManager.info("Converted world file " + worldFile.toString()); } else { LogManager.info("World file already exists at " + worldFile.toString()); } return worldFile; } catch (IOException e) { throw new RuntimeException("Unable to create world file", e); } }
The problem was that I was doing worldLoader.loadInstance(instance); instead of instance.setChunkLoader(worldLoader);
worldLoader.loadInstance(instance);
instance.setChunkLoader(worldLoader);
I pulled the whole world from our server and was able to load it fine in single player, but when I convert it using polar it is just a void world
The file is like 100kb