From aeea435a7e971576f4d371cbea564b5c6c82fc48 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 19 Dec 2022 06:24:06 -0800 Subject: [PATCH] Fix examples, but for real this time --- examples/conway.rs | 5 ++++- examples/inventory_piano.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/conway.rs b/examples/conway.rs index 47a8783..5a9e945 100644 --- a/examples/conway.rs +++ b/examples/conway.rs @@ -265,7 +265,10 @@ impl Config for Game { for chunk_x in 0..Integer::div_ceil(&SIZE_X, &16) { for chunk_z in 0..Integer::div_ceil(&SIZE_Z, &16) { - let chunk = world.chunks.get_mut([chunk_x, chunk_z]).unwrap(); + let chunk = world + .chunks + .get_mut([chunk_x as i32, chunk_z as i32]) + .unwrap(); for x in 0..16 { for z in 0..16 { let cell_x = chunk_x * 16 + x; diff --git a/examples/inventory_piano.rs b/examples/inventory_piano.rs index c77fe14..da09ed3 100644 --- a/examples/inventory_piano.rs +++ b/examples/inventory_piano.rs @@ -87,7 +87,10 @@ impl Config for Game { // initialize blocks in the chunks for chunk_x in 0..Integer::div_ceil(&SIZE_X, &16) { for chunk_z in 0..Integer::div_ceil(&SIZE_Z, &16) { - let chunk = world.chunks.get_mut([chunk_x, chunk_z]).unwrap(); + let chunk = world + .chunks + .get_mut([chunk_x as i32, chunk_z as i32]) + .unwrap(); for x in 0..16 { for z in 0..16 { let cell_x = chunk_x * 16 + x;