World sections
This commit is contained in:
@@ -113,7 +113,7 @@ Deno.test("every chunk generated is saved whole, and saved again only when it ch
|
||||
const [id, state] = untouched.palette[block];
|
||||
return id === AIR_ID ? 0 : game.world.block_ids[id] | (state << 16);
|
||||
}),
|
||||
game.world.generated_blocks(5, 5),
|
||||
game.world.generated_blocks(5, 5).to_flat(),
|
||||
);
|
||||
|
||||
assertEquals(game.save().chunks, []);
|
||||
@@ -152,7 +152,7 @@ Deno.test("saved chunks stay as they were saved, whatever generation makes there
|
||||
const { saved } = await saved_with_old_terrain();
|
||||
const { game } = await test_game("mods", saved);
|
||||
assertEquals(game.world.get_block_id(3, 121, 5), "bworld:stone");
|
||||
assertEquals(game.world.generated_blocks(0, 0)[index(3, 121, 5)], 0);
|
||||
assertEquals(game.world.generated_blocks(0, 0).get(3, 121, 5), 0);
|
||||
assertEquals(game.save().chunks.filter((c) => c.x === 0 && c.z === 0), []);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user