Client side chunk sections
This commit is contained in:
@@ -139,9 +139,9 @@ Deno.test("a dimension's blocks go from its min_y to max_y - 1, and are sent and
|
||||
|
||||
// what clients get: every block from the bottom up
|
||||
const chunk = decode_level_chunk(world.level_chunk(2, 0));
|
||||
assertEquals(chunk.blocks.length, CHUNK_AREA * 384);
|
||||
assertEquals(chunk.blocks[8], world.get_block_value(GROUND_X, -64, 0));
|
||||
assertEquals(chunk.blocks[383 * CHUNK_AREA + 8], world.get_block_value(GROUND_X, 319, 0));
|
||||
assertEquals(chunk.sections.length, 384 / 16);
|
||||
assertEquals(chunk.sections[0].get(8), world.get_block_value(GROUND_X, -64, 0));
|
||||
assertEquals(chunk.sections[23].get(15 * CHUNK_AREA + 8), world.get_block_value(GROUND_X, 319, 0));
|
||||
|
||||
// a column of ground: glass up to 69 and air above, all one block in every section but the one with the ground's
|
||||
// top in it
|
||||
|
||||
Reference in New Issue
Block a user