mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
refactor
This commit is contained in:
parent
9eea7243d5
commit
0a7ab154d4
2 changed files with 34 additions and 27 deletions
|
|
@ -110,8 +110,8 @@ void WorldGenerator::generate(
|
|||
generate_pole(groundLayers, height, 0, seaLevel, voxels, x, z);
|
||||
|
||||
if (height+1 > seaLevel) {
|
||||
// TODO: add underwater plants support
|
||||
float rand = (plantsRand.randU32() % RAND_MAX) / static_cast<float>(RAND_MAX);
|
||||
float rand = (plantsRand.randU32() % RAND_MAX) /
|
||||
static_cast<float>(RAND_MAX);
|
||||
blockid_t plant = biome->plants.choose(rand);
|
||||
if (plant) {
|
||||
voxels[vox_index(x, height+1, z)].id = plant;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue