diff --git a/Common/World/Generation/SimpleGenerator.cs b/Common/World/Generation/SimpleGenerator.cs index 7999a99..9e032c8 100644 --- a/Common/World/Generation/SimpleGenerator.cs +++ b/Common/World/Generation/SimpleGenerator.cs @@ -33,11 +33,11 @@ public static void GenerateChunk(Chunk target) { var density = noise[i]; if (density < 0) - storage[i] = Blocks.Stone; + storage.SetBlock(Blocks.Stone, i); else if (density < 0.2) - storage[i] = Blocks.Dirt; + storage.SetBlock(Blocks.Dirt, i); else if (density < 0.3) - storage[i] = Blocks.Grass; + storage.SetBlock(Blocks.Grass, i); } target.SetStorage(storage); diff --git a/Common/World/Storage/SimpleStorage.cs b/Common/World/Storage/SimpleStorage.cs index 5662567..b19332b 100644 --- a/Common/World/Storage/SimpleStorage.cs +++ b/Common/World/Storage/SimpleStorage.cs @@ -10,7 +10,7 @@ namespace Voxel.Common.World.Storage; /// /// TODO - Pack this somehow? Do we need to? /// -public class SimpleStorage : ChunkStorage { +public sealed class SimpleStorage : ChunkStorage { private static readonly Stack BlockDataCache = new(); private readonly uint[] BlockIds; diff --git a/Common/World/Storage/SingleStorage.cs b/Common/World/Storage/SingleStorage.cs index 8e81332..f02b15c 100644 --- a/Common/World/Storage/SingleStorage.cs +++ b/Common/World/Storage/SingleStorage.cs @@ -7,7 +7,7 @@ namespace Voxel.Common.World.Storage; /// /// When a new block is assigned to this storage, it automatically swaps itself out for a SimpleStorage with the appropriate data. /// -public class SingleStorage : ChunkStorage { +public sealed class SingleStorage : ChunkStorage { public readonly Chunk Chunk; public readonly Block Block;