Move farmers delight to bworld
This commit is contained in:
+13
-13
@@ -14,10 +14,10 @@ async function setup(yaw = 0) {
|
||||
t.join(1, "alice");
|
||||
stone_floor(t.game);
|
||||
t.send(1, { type: "move", x: 2.5, y: 100, z: 2.5, yaw, pitch: 0 });
|
||||
t.send(1, { type: "chat", text: "/give farmersdelight:cutting_board" });
|
||||
t.send(1, { type: "chat", text: "/give bworld:cutting_board" });
|
||||
t.send(1, { type: "select_slot", slot: 0 });
|
||||
t.send(1, { type: "use_block", x: BOARD[0], y: BOARD[1] - 1, z: BOARD[2], face: "top" });
|
||||
assertEquals(t.game.world.get_block_id(...BOARD), "farmersdelight:cutting_board");
|
||||
assertEquals(t.game.world.get_block_id(...BOARD), "bworld:cutting_board");
|
||||
|
||||
const use = (slot: number) => {
|
||||
t.send(1, { type: "select_slot", slot });
|
||||
@@ -58,15 +58,15 @@ Deno.test("so does any block with a facing state, like the furnace, keeping its
|
||||
Deno.test("a stack goes on the board, and a knife cuts one at a time by its recipe", async () => {
|
||||
const t = await setup();
|
||||
t.send(1, { type: "chat", text: "/give bworld:cod 3" });
|
||||
t.send(1, { type: "chat", text: "/give farmersdelight:iron_knife" });
|
||||
t.send(1, { type: "chat", text: "/give bworld:iron_knife" });
|
||||
|
||||
t.use(0);
|
||||
assertEquals(t.on_board(), "bworld:cod 3");
|
||||
assertEquals(t.inventory(), ["farmersdelight:iron_knife 1"]);
|
||||
assertEquals(t.inventory(), ["bworld:iron_knife 1"]);
|
||||
|
||||
t.use(1);
|
||||
assertEquals(t.on_board(), "bworld:cod 2");
|
||||
assertEquals(t.dropped(), ["bworld:bone_meal 1", "farmersdelight:cod_slice 2"]);
|
||||
assertEquals(t.dropped(), ["bworld:bone_meal 1", "bworld:cod_slice 2"]);
|
||||
t.use(1);
|
||||
t.use(1);
|
||||
assertEquals(t.on_board(), "");
|
||||
@@ -74,25 +74,25 @@ Deno.test("a stack goes on the board, and a knife cuts one at a time by its reci
|
||||
|
||||
// on an empty board the knife goes on it, like the java mod, and cutting nothing does nothing
|
||||
t.use(1);
|
||||
assertEquals(t.on_board(), "farmersdelight:iron_knife 1");
|
||||
t.send(1, { type: "chat", text: "/give farmersdelight:stone_knife" });
|
||||
assertEquals(t.on_board(), "bworld:iron_knife 1");
|
||||
t.send(1, { type: "chat", text: "/give bworld:stone_knife" });
|
||||
t.use(0);
|
||||
assertEquals(t.on_board(), "farmersdelight:iron_knife 1");
|
||||
assertEquals(t.inventory(), ["farmersdelight:stone_knife 1"]);
|
||||
assertEquals(t.on_board(), "bworld:iron_knife 1");
|
||||
assertEquals(t.inventory(), ["bworld:stone_knife 1"]);
|
||||
});
|
||||
|
||||
Deno.test("an empty hand takes it all back, and breaking the board drops it", async () => {
|
||||
const t = await setup();
|
||||
t.send(1, { type: "chat", text: "/give farmersdelight:cabbage 5" });
|
||||
t.send(1, { type: "chat", text: "/give bworld:cabbage 5" });
|
||||
t.use(0);
|
||||
assertEquals(t.on_board(), "farmersdelight:cabbage 5");
|
||||
assertEquals(t.on_board(), "bworld:cabbage 5");
|
||||
t.use(1);
|
||||
assertEquals(t.on_board(), "");
|
||||
assertEquals(t.inventory(), ["farmersdelight:cabbage 5"]);
|
||||
assertEquals(t.inventory(), ["bworld:cabbage 5"]);
|
||||
|
||||
t.use(0);
|
||||
t.game.destroy_block(...BOARD);
|
||||
assertEquals(t.dropped(), ["farmersdelight:cabbage 5", "farmersdelight:cutting_board 1"]);
|
||||
assertEquals(t.dropped(), ["bworld:cabbage 5", "bworld:cutting_board 1"]);
|
||||
assertEquals(t.game.world.get_tile(...BOARD), undefined);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user