World sections
This commit is contained in:
@@ -13,10 +13,10 @@ Deno.test("the overworld generates the same way every time, with water only belo
|
||||
|
||||
for (let cx = -4; cx < 4; cx++) {
|
||||
for (let cz = -4; cz < 4; cz++) {
|
||||
const { blocks } = generate_raw_chunk(cx, cz, "worldgen-test", ids, game.world.worldgen);
|
||||
const blocks = generate_raw_chunk(cx, cz, "worldgen-test", ids, game.world.worldgen).column.to_flat();
|
||||
assertEquals(
|
||||
blocks,
|
||||
generate_raw_chunk(cx, cz, "worldgen-test", ids, game.world.worldgen).blocks,
|
||||
generate_raw_chunk(cx, cz, "worldgen-test", ids, game.world.worldgen).column.to_flat(),
|
||||
"same chunk, same blocks",
|
||||
);
|
||||
|
||||
@@ -63,7 +63,8 @@ Deno.test("trees grow on the ground, never closer than 4 blocks, even across chu
|
||||
let spilled_leaves = 0;
|
||||
for (let cx = -6; cx < 6; cx++) {
|
||||
for (let cz = -6; cz < 6; cz++) {
|
||||
const { blocks, spills } = generate_raw_chunk(cx, cz, game.world.seed, ids, game.world.worldgen);
|
||||
const { column, spills } = generate_raw_chunk(cx, cz, game.world.seed, ids, game.world.worldgen);
|
||||
const blocks = column.to_flat();
|
||||
blocks.forEach((block, i) => {
|
||||
if (logs.has(block) && ground.has(blocks[i - CHUNK_AREA])) {
|
||||
const x = cx * 16 + (i % 16);
|
||||
|
||||
Reference in New Issue
Block a user