Fix examples, but for real this time

This commit is contained in:
Ryan 2022-12-19 06:24:06 -08:00
parent 4e302ca09f
commit aeea435a7e
2 changed files with 8 additions and 2 deletions

View file

@ -265,7 +265,10 @@ impl Config for Game {
for chunk_x in 0..Integer::div_ceil(&SIZE_X, &16) { for chunk_x in 0..Integer::div_ceil(&SIZE_X, &16) {
for chunk_z in 0..Integer::div_ceil(&SIZE_Z, &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 x in 0..16 {
for z in 0..16 { for z in 0..16 {
let cell_x = chunk_x * 16 + x; let cell_x = chunk_x * 16 + x;

View file

@ -87,7 +87,10 @@ impl Config for Game {
// initialize blocks in the chunks // initialize blocks in the chunks
for chunk_x in 0..Integer::div_ceil(&SIZE_X, &16) { for chunk_x in 0..Integer::div_ceil(&SIZE_X, &16) {
for chunk_z in 0..Integer::div_ceil(&SIZE_Z, &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 x in 0..16 {
for z in 0..16 { for z in 0..16 {
let cell_x = chunk_x * 16 + x; let cell_x = chunk_x * 16 + x;