feat: World.SetBlock writes through to IChunkModificationStore
This commit is contained in:
@@ -6,6 +6,7 @@ using OpenTK.Windowing.GraphicsLibraryFramework;
|
||||
using VoxelEngine.Rendering;
|
||||
using VoxelEngine.World.Blocks;
|
||||
using VoxelEngine.World.Chunk;
|
||||
using VoxelEngine.World.Persistence;
|
||||
using VoxelEngine.World.WorldGen;
|
||||
|
||||
namespace VoxelEngine.Core;
|
||||
@@ -15,7 +16,7 @@ public sealed class Game : GameWindow
|
||||
private const float MoveSpeed = 8f; // units per second
|
||||
private const float Sensitivity = 0.15f; // degrees per pixel
|
||||
private const int Seed = 1337;
|
||||
private const bool UseSeed = false;
|
||||
private const bool UseSeed = false;
|
||||
|
||||
private readonly BlockRegistry _registry = new();
|
||||
private Shader _shader = null!;
|
||||
@@ -40,7 +41,7 @@ public sealed class Game : GameWindow
|
||||
this._shader = new Shader("Assets/shaders/chunk.vert", "Assets/shaders/chunk.frag");
|
||||
this._texture = new Texture("Assets/textures/VoxelShadeAtlas.png");
|
||||
|
||||
this._world = new World.World(this._registry);
|
||||
this._world = new World.World(this._registry, new InMemoryChunkModificationStore());
|
||||
|
||||
int seed = Game.UseSeed ? Game.Seed : new Random().Next();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user