Add a bunch of crops and farmer's delight crops
This commit is contained in:
@@ -23,9 +23,10 @@ const inventory_of = (messages: Msg[]) =>
|
||||
|
||||
Deno.test("the base game loads from mods/bworld", async () => {
|
||||
const { game } = await test_game("mods");
|
||||
assertEquals(EverythingRegistry.entries("blocks").length, 21);
|
||||
const bworld = (entries: [string, unknown][]) => entries.filter(([id]) => id.startsWith("bworld:")).length;
|
||||
assertEquals(bworld(EverythingRegistry.entries("blocks")), 23);
|
||||
// 17 items plus the item forms of the 18 blocks that have one
|
||||
assertEquals(EverythingRegistry.entries("items").length, 35);
|
||||
assertEquals(bworld(EverythingRegistry.entries("items")), 35);
|
||||
assertEquals(game.recipes.shaped.length, 5);
|
||||
assertEquals(game.recipes.furnace.size, 6);
|
||||
assertEquals(game.recipes.fuel.size, 2);
|
||||
@@ -77,6 +78,8 @@ Deno.test("a mod made from the template loads and runs", async () => {
|
||||
send(1, { type: "select_slot", slot: inventory.findIndex((i: Msg) => i?.id === "copper_tools:example_block") });
|
||||
let y = CHUNK_HEIGHT - 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");
|
||||
send(1, { type: "move", x: 2.5, y: y + 1, z: 2.5, yaw: 0, pitch: 0 });
|
||||
send(1, { type: "use_block", x: 1, y, z: 1, face: "top" });
|
||||
assertEquals(game.world.get_block_id(1, y + 1, 1), "copper_tools:example_block");
|
||||
|
||||
Reference in New Issue
Block a user