mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-24 01:01:43 +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}={}) {
|
function generation({seed,worldHeight=80,waterline=20}={}) {
|
||||||
// Selected empirically
|
// Selected empirically
|
||||||
var size = 10000000;
|
var size = 10000000;
|
||||||
var space = new DiamondSquare(size, size / 1000, seed);
|
var space = new DiamondSquare(size, size / 1000, seed);
|
||||||
|
|
||||||
|
|
@ -112,8 +112,9 @@ function generation({seed,worldHeight=80}={}) {
|
||||||
|
|
||||||
if (y == 0) block = 7;
|
if (y == 0) block = 7;
|
||||||
else if (y < level) block = 3;
|
else if (y < level) block = 3;
|
||||||
|
else if (y == level && y < waterline) block = 3;
|
||||||
else if (y == level) block = 2;
|
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);
|
if (block) chunk.setBlockType(new Vec3(x, y, z), block);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue