mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-13 19:41:24 +00:00
commit
dd4e56ab1d
1 changed files with 4 additions and 3 deletions
|
|
@ -93,8 +93,8 @@ function DiamondSquare(size, roughness, seed) {
|
|||
}
|
||||
}
|
||||
|
||||
function generation({seed,worldHeight=80}={}) {
|
||||
// Selected empirically
|
||||
function generation({seed,worldHeight=80,waterline=20}={}) {
|
||||
// Selected empirically
|
||||
var size = 10000000;
|
||||
var space = new DiamondSquare(size, size / 1000, seed);
|
||||
|
||||
|
|
@ -112,8 +112,9 @@ function generation({seed,worldHeight=80}={}) {
|
|||
|
||||
if (y == 0) block = 7;
|
||||
else if (y < level) block = 3;
|
||||
else if (y == level && y < waterline) block = 3;
|
||||
else if (y == level) block = 2;
|
||||
else if (y < 20) block = 9;
|
||||
else if (y < waterline) block = 9;
|
||||
|
||||
if (block) chunk.setBlockType(new Vec3(x, y, z), block);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue