This commit is contained in:
2026-10-11 18:37:12 -03:00
parent 2cc5d4e013
commit 870235442b
9 changed files with 123 additions and 0 deletions
+15
View File
@@ -310,3 +310,18 @@ Deno.test("a bucket picks up a water source but not flowing water, and a water b
assertEquals(t.game.world.get_block_id(-2, 100, 0), "bworld:water");
assertEquals(t.game.world.get_block_value(-2, 100, 0) >>> 16, 0);
});
Deno.test("a bucket picks up a lava source too, and a lava bucket puts one back", async () => {
const t = await setup([["bworld:bucket", 1]]);
const held = () => t.game.players()[0].held_item?.type_id;
t.game.set_block(1, 100, 0, "bworld:lava");
t.send(1, { type: "use_block", x: 1, y: 100, z: 0, face: "top" });
assertEquals(held(), "bworld:lava_bucket");
assertEquals(t.game.world.get_block_id(1, 100, 0), "bworld:air");
t.send(1, { type: "use_block", x: -2, y: 99, z: 0, face: "top" });
assertEquals(held(), "bworld:bucket");
assertEquals(t.game.world.get_block_id(-2, 100, 0), "bworld:lava");
assertEquals(t.game.world.get_block_value(-2, 100, 0) >>> 16, 0);
});