Remove duplicate code

This commit is contained in:
2026-10-13 11:57:43 -03:00
parent dfc6a6d77b
commit 5165698fe3
50 changed files with 307 additions and 812 deletions
+2 -4
View File
@@ -10,7 +10,7 @@ import { collision_shape_at, covers_face, FULL_SHAPE, shape_at } from "$/common/
import { move_body } from "$/common/physics.ts";
import { get_state_value } from "$/common/utils.ts";
import { update_crafting_result } from "$/server/game/crafting.ts";
import { test_game } from "./helpers.ts";
import { stone_floor, test_game } from "./helpers.ts";
const Y = 100;
@@ -108,9 +108,7 @@ Deno.test("six planks and two sticks make three fences of that wood", async () =
Deno.test("clicking the ground beside a fence tells the client it's still joined, not a bare post", async () => {
const t = await test_game("mods");
t.join(1, "alice");
for (let x = -3; x <= 3; x++) {
for (let z = -3; z <= 3; z++) t.game.set_block(x, 99, z, "bworld:stone");
}
stone_floor(t.game);
t.send(1, { type: "move", x: 0.5, y: 100, z: 2.5, yaw: 0, pitch: 0 });
t.game.tick();
t.game.set_block(0, 100, 0, "bworld:oak_fence");