Remove collision from water
This commit is contained in:
@@ -114,3 +114,16 @@ Deno.test("q throws one of an item the way the player looks, ctrl throws the who
|
||||
send(1, { type: "drop_item", container: "crafting", index: 9, all: true });
|
||||
assertEquals(game.item_entities().length, 2);
|
||||
});
|
||||
|
||||
Deno.test("water has no collision, items sink through it to the floor", async () => {
|
||||
const { game, join } = await test_game("mods");
|
||||
join(1, "alice");
|
||||
build_floor(game);
|
||||
for (let y = 100; y <= 102; y++) {
|
||||
game.set_block(6, y, 0, "bworld:water");
|
||||
}
|
||||
const item = game.spawn_item(6.5, 104, 0.5, new ItemStack("bworld:dirt"));
|
||||
for (let i = 0; i < 40; i++) game.tick();
|
||||
assert(item.on_ground);
|
||||
assertEquals(item.y, 100, "on the stone under the water");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user