MorbZ/J2Blocks

Misplaced blocks

Opened this issue · 0 comments

Blocks placed at certain coordinates appear in the wrong place.

For example, all the blocks placed at z=-512 or x=-512 will actually appear at z=-2048 or x=-2048, respectfully.
Tested with J2Blocks v1.1 and Minecraft 1.12.2.

Example to reproduce:

val layers = DefaultLayers()
layers.setLayers(0, 1, Material.BEDROCK)
layers.setLayers(2, 5, Material.GRASS)
val generator = FlatGenerator(layers)
val level = Level("ConsistencyTest", generator)
level.gameType = GameType.CREATIVE
level.setSpawnPoint(-512, 11, -512)
level.mapFeatures = false

val world = World(level, layers)

for (x in -2000..2000) {
    for (z in -2000 .. 2000) {
        for (y in 5..10) {
            world.setBlock(x, y, z, StoneBlock.STONE)
        }
    }
}

world.save()

2022-09-25_14 00 39
2022-09-25_14 00 56
2022-09-25_14 04 25