hollow-cube/polar

Inconsistent world height

Closed this issue · 3 comments

Polar: 1.1.2
Minestom: 9b15acf4fa

When i try convert 1.19.4 anvil world i have this error.

The console output https://pastebin.com/J3ffUqtU

        at Ext_myherolib//net.hollowcube.polar.AnvilPolar.readAnvilChunks(AnvilPolar.java:106)
        at Ext_myherolib//net.hollowcube.polar.AnvilPolar.anvilToPolar(AnvilPolar.java:52)
        at Ext_myherolib//net.hollowcube.polar.AnvilPolar.anvilToPolar(AnvilPolar.java:36)
        at Ext_myheroblockwars//com.windskull.mhblockwars.WorldManager.<init>(WorldManager.java:61)
        at Ext_myheroblockwars//com.windskull.mhblockwars.WorldManager.getWorldManager(WorldManager.java:97)
        at Ext_myheroblockwars//com.windskull.mhblockwars.MhBlockWarsCore.initialize(MhBlockWarsCore.java:12)
        at java.base/java.util.LinkedHashMap$LinkedValues.forEach(LinkedHashMap.java:647)
        at net.minestom.server.extensions.ExtensionManager.gotoInit(ExtensionManager.java:127)
        at net.minestom.server.ServerProcessImpl.start(ServerProcessImpl.java:216)
        at net.minestom.server.MinecraftServer.start(MinecraftServer.java:322)
        at net.minestom.server.MinecraftServer.start(MinecraftServer.java:327)
        at world.cepi.sabre.server.Sabre.boot(Sabre.kt:63)
        at world.cepi.sabre.SabreLoader.boot(SabreLoader.kt:10)
        at world.cepi.sabre.SabreLoader.main(SabreLoader.kt:14)```

Sabre is not maintained anymore and should not be used. You are actually using whatever minestom version that sabre was compiled with, not the one you wrote a dependency on.

Regarding the inconsistent world height exception, Polar worlds are required to be a uniform height. I assume your anvil world is not fully upgraded to the latest version (eg some chunks have 256 world height, some have 384). By default Polar converts all chunks in all regions in the world, either make sure all chunks are upgraded to the latest version (eg by loading them in a vanilla client/server) or use a ChunkSelector to only convert the relevant (and upgraded) chunks. For example, to convert only a 5 chunk radius around 0,0:

AnvilPolar.anvilToPolar(Path.of("/path/to/anvil/world/dir"), ChunkSelector.radius(5));

I compiled Saber myself on the version I specified, the world was created in World Painter with an export to version 1.19 and I did "Optimalize World" on it to version 1.19.4 just to be sure, I only loaded the area of 20 chunks and looks like everything is fine, but it seems a little strange to me that I get this error because the world was never run on a version lower than 1.19.

That is strange, maybe world painter does something odd in the chunks at the edge or something, I have not tried it.