package ethanjones.modularworld.world.generator;

import ethanjones.modularworld.block.factory.BlockFactories;
import ethanjones.modularworld.world.storage.Area;

public class BasicWorldGenerator extends WorldGenerator {

  @Override
  public void generate(Area area) {
    if (area.y == 0) {
      for (int x = 0; x < Area.SIZE_BLOCKS; x++) {
        for (int z = 0; z < Area.SIZE_BLOCKS; z++) {
          area.setBlock(BlockFactories.bedrock.getBlock(), x, 0, z);
          area.setBlock(BlockFactories.stone.getBlock(), x, 1, z);
          area.setBlock(BlockFactories.stone.getBlock(), x, 2, z);
          area.setBlock(BlockFactories.dirt.getBlock(), x, 3, z);
          area.setBlock(BlockFactories.grass.getBlock(), x, 4, z);
        }
      }
      if (area.x == 0 && area.z == 0) {
        area.setBlock(BlockFactories.bedrock.getBlock(), 0, 4, 0);
        area.setBlock(BlockFactories.bedrock.getBlock(), 0, 7, 0);
        area.setBlock(BlockFactories.stone.getBlock(), 2, 5, 0);
        area.setBlock(BlockFactories.grass.getBlock(), 0, 5, 2);
      }
    }
  }
}

package ethanjones.modularworld.world.generator;

import ethanjones.modularworld.block.factory.BlockFactories;
import ethanjones.modularworld.world.storage.Area;

public class BasicWorldGenerator extends WorldGenerator {

  @Override
  public void generate(Area area) {
    if (area.y == 0) {
      for (int x = 0; x < Area.SIZE_BLOCKS; x++) {
        for (int z = 0; z < Area.SIZE_BLOCKS; z++) {
          area.setBlock(BlockFactories.bedrock.getBlock(), x, 0, z);
          area.setBlock(BlockFactories.stone.getBlock(), x, 1, z);
          area.setBlock(BlockFactories.stone.getBlock(), x, 2, z);
          area.setBlock(BlockFactories.dirt.getBlock(), x, 3, z);
          area.setBlock(BlockFactories.grass.getBlock(), x, 4, z);
        }
      }
      if (area.x == 0 && area.z == 0) {
        area.setBlock(BlockFactories.bedrock.getBlock(), 0, 4, 0);
        area.setBlock(BlockFactories.bedrock.getBlock(), 0, 7, 0);
        area.setBlock(BlockFactories.stone.getBlock(), 5, 5, 3);
        area.setBlock(BlockFactories.grass.getBlock(), 3, 5, 5);
      }
    }
  }
}

Move blocks