#include "server/world/WorldGenerator.h" #include "common/world/HighMap.h" void WorldGenerator::generate(World& w) { HighMap map(w.getSize(), w.getHeight()); for(int x = 0; x < w.getSize(); x++) { for(int z = 0; z < w.getSize(); z++) { int height = map.getHeight(x, z); for(int y = 0; y < height; y++) { w.setBlock(x, y, z, 1); } } } }