Block visuals

This commit is contained in:
2026-10-13 23:52:30 -03:00
parent 55ad08266e
commit 6ad476ac18
19 changed files with 854 additions and 14 deletions
+2
View File
@@ -5,6 +5,7 @@
// with the block
import { assertEquals } from "@std/assert";
import { chunk_key, ClientLevel } from "$/client/level/client_level.ts";
import { Visuals } from "$/client/rendering/visuals.ts";
import { AIR_ID } from "$/common/protocol.ts";
import { copy_dir, stone_floor, test_game } from "./helpers.ts";
@@ -90,6 +91,7 @@ Deno.test("the client keeps the fields it's sent for each block until they're re
const level = Object.assign(Object.create(ClientLevel.prototype), {
chunks: new Map([[chunk_key(0, 0), {}]]),
block_data: new Map(),
visuals: new Visuals(() => undefined),
}) as ClientLevel;
level.set_block_data(1, 99, 1, { speed: 16, axis: "x" });
level.set_block_data(1, 99, 1, { speed: 32 });