Server actually ticks

This commit is contained in:
2026-09-25 13:25:25 -03:00
parent 2a2ccae9ce
commit dfabe40e7a
18 changed files with 763 additions and 79 deletions
+5 -1
View File
@@ -83,7 +83,11 @@ Deno.test("a mod made from the template loads and runs", async () => {
take(1);
send(1, { type: "use_block", x: 1, y: y + 1, z: 1, face: "top" });
const messages = take(1);
assert(messages.some((m) => m.type === "chat" && m.text === "You found the example block!"));
assert(messages.some((m) => m.type === "chat" && m.text.startsWith("You found the example block!")));
// it counts its age with on_second
for (let i = 0; i < 3 * 20; i++) game.tick();
send(1, { type: "use_block", x: 1, y: y + 1, z: 1, face: "top" });
assert(take(1).some((m) => m.text === "You found the example block! It's been here for 3 seconds."));
assertEquals(game.world.get_block_id(1, y + 2, 1), "bworld:air");
// the shaped recipe: 4 example items in a square