Fix order of chunk creation in conway's example (#27)

This would typically go unnoticed, but upon expanding the and making meaningful use of both directions, this being an issue arises.
This commit is contained in:
SirJosh3917 2022-09-05 23:16:21 -04:00 committed by GitHub
parent 74a09df978
commit 08ee7acacf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -107,8 +107,8 @@ impl Config for Game {
let world = server.worlds.insert(DimensionId::default(), ()).1; let world = server.worlds.insert(DimensionId::default(), ()).1;
server.state.player_list = Some(server.player_lists.insert(()).0); server.state.player_list = Some(server.player_lists.insert(()).0);
for chunk_z in -2..Integer::div_ceil(&(SIZE_X as i32), &16) + 2 { for chunk_z in -2..Integer::div_ceil(&(SIZE_Z as i32), &16) + 2 {
for chunk_x in -2..Integer::div_ceil(&(SIZE_Z as i32), &16) + 2 { for chunk_x in -2..Integer::div_ceil(&(SIZE_X as i32), &16) + 2 {
world.chunks.insert((chunk_x as i32, chunk_z as i32), ()); world.chunks.insert((chunk_x as i32, chunk_z as i32), ());
} }
} }