World shape for dimension
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import { assert, assertEquals } from "@std/assert";
|
||||
import { AIR, CHUNK_HEIGHT } from "@/common/constants.ts";
|
||||
import { AIR } from "@/common/constants.ts";
|
||||
import { BlockRegistry, EverythingRegistry, ItemRegistry } from "@/common/everything_registry.ts";
|
||||
import { block_from_json, block_to_json, item_from_json, item_to_json } from "@/common/mod_data.ts";
|
||||
import { generate_raw_chunk } from "@/common/generation.ts";
|
||||
@@ -97,7 +97,7 @@ Deno.test("a mod made from the template loads and runs", async () => {
|
||||
send(1, { type: "chat", text: "/give copper_tools:example_block" });
|
||||
const inventory = inventory_of(take(1));
|
||||
send(1, { type: "select_slot", slot: inventory.findIndex((i: Msg) => i?.id === "copper_tools:example_block") });
|
||||
let y = CHUNK_HEIGHT - 1;
|
||||
let y = game.world.shape.max_y - 1;
|
||||
while (game.world.get_block_nid(1, y, 1) === AIR) y--;
|
||||
// solid ground to build on: placing into water would replace it
|
||||
game.set_block(1, y, 1, "bworld:stone");
|
||||
@@ -154,6 +154,7 @@ Deno.test("the template's worldgen feature places boulders, the same way every t
|
||||
})),
|
||||
ores: worldgen.ores,
|
||||
generator: "bworld:overworld",
|
||||
shape: game.world.shape,
|
||||
});
|
||||
for (let cx = 0; cx < 20; cx++) {
|
||||
assertEquals(
|
||||
|
||||
Reference in New Issue
Block a user