feat: Move stone layer generation from y = -1 to y = 1

This commit is contained in:
Kacper Kostka (aider) 2025-04-05 15:14:14 +02:00
parent eab3a9b790
commit b85ae017b8

View File

@ -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;