using Godot; namespace IslaApocalypse.Core { public class ChunkData { public Vector2I ChunkPosition; // The X/Z coordinate of this chunk (e.g., 0,0 or 1,0) // We need Width+1 and Depth+1 so the Marching Cubes mesh connects seamlessly to the neighbor chunks! // public float[,,] Densities = new float[Constants.CHUNK_SIZE_X + 1, Constants.CHUNK_HEIGHT, Constants.CHUNK_SIZE_Z + 1]; // public byte[,,] BlockIDs = new byte[Constants.CHUNK_SIZE_X + 1, Constants.CHUNK_HEIGHT, Constants.CHUNK_SIZE_Z + 1]; // OLD: // Densities = new float[Constants.CHUNK_SIZE_X, Constants.CHUNK_HEIGHT, Constants.CHUNK_SIZE_Z]; // BlockIDs = new int[Constants.CHUNK_SIZE_X, Constants.CHUNK_HEIGHT, Constants.CHUNK_SIZE_Z]; // NEW (Fix 3): We expand by 1 to sample the neighbor's border perfectly without seams! public float[,,] Densities = new float[Constants.CHUNK_SIZE_X + 1, Constants.CHUNK_HEIGHT + 1, Constants.CHUNK_SIZE_Z + 1]; public byte[,,] BlockIDs = new byte[Constants.CHUNK_SIZE_X + 1, Constants.CHUNK_HEIGHT + 1, Constants.CHUNK_SIZE_Z + 1]; // For our future delta-save system public bool IsPlayerProtected = false; public bool NeedsSaving = false; public ChunkData(Vector2I position) { ChunkPosition = position; } } }