From b85ae017b801001aa71d666aade9a2f18f030716 Mon Sep 17 00:00:00 2001 From: "Kacper Kostka (aider)" Date: Sat, 5 Apr 2025 15:14:14 +0200 Subject: [PATCH] feat: Move stone layer generation from y = -1 to y = 1 --- js/world.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/world.js b/js/world.js index 288a0d4..23c76c6 100644 --- a/js/world.js +++ b/js/world.js @@ -33,8 +33,8 @@ function getOrCreateChunk(chunkX, chunkY) { // Create a new chunk with empty pixels const chunkData = new Array(CHUNK_SIZE * CHUNK_SIZE).fill(EMPTY); - // Fill the chunk below the floor (y = -1) completely with stone - if (chunkY === -1) { + // Fill chunk at y = 1 completely with stone instead of y = -1 + if (chunkY === 1) { for (let y = 0; y < CHUNK_SIZE; y++) { for (let x = 0; x < CHUNK_SIZE; x++) { chunkData[y * CHUNK_SIZE + x] = STONE;