From 08ee7acacfc4df8d18e3638157951d8433be48dd Mon Sep 17 00:00:00 2001 From: SirJosh3917 Date: Mon, 5 Sep 2022 23:16:21 -0400 Subject: [PATCH] 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. --- examples/conway.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/conway.rs b/examples/conway.rs index 08720be..ba88a1e 100644 --- a/examples/conway.rs +++ b/examples/conway.rs @@ -107,8 +107,8 @@ impl Config for Game { let world = server.worlds.insert(DimensionId::default(), ()).1; 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_x in -2..Integer::div_ceil(&(SIZE_Z 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_X as i32), &16) + 2 { world.chunks.insert((chunk_x as i32, chunk_z as i32), ()); } }