Archived
0

Location world reference

This commit is contained in:
Forwolk
2018-08-04 11:46:28 +03:00
parent f5057d5a92
commit d84e6ca749
4 changed files with 39 additions and 9 deletions

View File

@@ -85,6 +85,7 @@ public class ChunkImpl implements Chunk{
public void setBlock(int x, int y, int z, Block block) {
if (block.getBlockType() == BlockType.AIR) {
blocks[x][y][z] = null;
return;
}
blocks[x][y][z] = block;
}

View File

@@ -28,7 +28,7 @@ public class SeedBasedWorldGenerator implements WorldGenerator {
World world = new CubicWorld(UUID.fromString("00000000-0000-0000-C000-000000000046"), 2626949);
Region region = worldGenerator.generateRegion(0, 0, world);
region.save(new ChunkSerializer(), new RegionReaderWriter(new File("worlds", world.getWorldId().toString())));
new WorldReaderWriter(new File("worlds")).writeWorldInfo(world);
// new WorldReaderWriter(new File("worlds")).writeWorldInfo(world);
/*worldGenerator.generateRegion(1, 0, world);
worldGenerator.generateRegion(-1, 0, world);
worldGenerator.generateRegion(0, 1, world);