Server actually ticks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user