Hand crank and shafts

This commit is contained in:
2026-10-15 11:45:12 -03:00
parent cedc7725b5
commit a0596ed0ef
27 changed files with 1008 additions and 36 deletions
+5 -1
View File
@@ -77,6 +77,10 @@ function client_of(t: Game) {
mod: { id: "bworld", version: "test" },
side: "client",
tags: tag_api(),
blocks: {
exists: (id) => info(id) !== undefined,
components: (id) => structuredClone(info(id)!.components ?? {}),
},
world,
components: { register_block: (id, block_rules) => rules.register("bworld", id, block_rules) },
});
@@ -84,7 +88,7 @@ function client_of(t: Game) {
return {
// what game_mode does when this client places held against face of x y z, at hit
place(id: string, x: number, y: number, z: number, yaw: number, face: Face, hit: [number, number, number]) {
const value = rules.placement_value(info(id)!, yaw, { x, y, z, face, hit, sneaking: false });
const value = rules.placement_value(info(id)!, yaw, 0, { x, y, z, face, hit, sneaking: false });
copy.set(`${x} ${y} ${z}`, [id, value >>> 16]);
rules.notify_neighbors(world.get_block, x, y, z);
},