Rename engine to cubi
This commit is contained in:
+6
-6
@@ -19,7 +19,7 @@ async function setup() {
|
||||
for (let x = -3; x <= 3; x++) {
|
||||
for (let z = -3; z <= 3; z++) {
|
||||
t.game.set_block(x, 99, z, "bworld:stone");
|
||||
for (let y = 100; y < 103; y++) t.game.set_block(x, y, z, "bworld:air");
|
||||
for (let y = 100; y < 103; y++) t.game.set_block(x, y, z, "cubi:air");
|
||||
}
|
||||
}
|
||||
t.send(1, { type: "move", x: 0.5, y: 100, z: 3.5, yaw: 0, pitch: 0 });
|
||||
@@ -57,7 +57,7 @@ Deno.test("a door isn't placed without room for its upper half", async () => {
|
||||
const { t, held } = await setup();
|
||||
t.game.set_block(0, 101, 0, "bworld:stone");
|
||||
t.send(1, { type: "use_block", x: 0, y: 99, z: 0, face: "top", hit: [0.5, 1, 0.5] });
|
||||
assertEquals(t.game.world.get_block_id(0, 100, 0), "bworld:air");
|
||||
assertEquals(t.game.world.get_block_id(0, 100, 0), "cubi:air");
|
||||
assertEquals(held(), 64);
|
||||
});
|
||||
|
||||
@@ -74,7 +74,7 @@ Deno.test("right clicking either half opens and closes both, and the door turns
|
||||
// swung against the west side, its hinge on alice's left
|
||||
assertEquals(shape(), [[0, 0, 0, 3 / 16, 1, 1]]);
|
||||
// nothing placed in the doorway
|
||||
assertEquals(t.game.world.get_block_id(0, 102, 0), "bworld:air");
|
||||
assertEquals(t.game.world.get_block_id(0, 102, 0), "cubi:air");
|
||||
|
||||
t.send(1, { type: "use_block", x: 0, y: 100, z: 0, face: "west", hit: [0, 0.5, 0.5] });
|
||||
assertEquals([states(0, 100, 0).open, states(0, 101, 0).open], [0, 0]);
|
||||
@@ -84,13 +84,13 @@ Deno.test("breaking either half breaks the whole door, which drops one door", as
|
||||
const { t, dropped } = await setup();
|
||||
t.send(1, { type: "use_block", x: 0, y: 99, z: 0, face: "top", hit: [0.5, 1, 0.5] });
|
||||
t.send(1, { type: "break_block", x: 0, y: 101, z: 0 });
|
||||
assertEquals(t.game.world.get_block_id(0, 100, 0), "bworld:air");
|
||||
assertEquals(t.game.world.get_block_id(0, 101, 0), "bworld:air");
|
||||
assertEquals(t.game.world.get_block_id(0, 100, 0), "cubi:air");
|
||||
assertEquals(t.game.world.get_block_id(0, 101, 0), "cubi:air");
|
||||
assertEquals(dropped(), ["bworld:oak_door 1"]);
|
||||
|
||||
t.send(1, { type: "use_block", x: 1, y: 99, z: 0, face: "top", hit: [0.5, 1, 0.5] });
|
||||
t.send(1, { type: "break_block", x: 1, y: 100, z: 0 });
|
||||
assertEquals(t.game.world.get_block_id(1, 101, 0), "bworld:air");
|
||||
assertEquals(t.game.world.get_block_id(1, 101, 0), "cubi:air");
|
||||
assertEquals(dropped(), ["bworld:oak_door 1", "bworld:oak_door 1"]);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user