chunk meshes
This commit is contained in:
5
World.cs
5
World.cs
@@ -22,7 +22,7 @@ namespace Voxel
|
||||
// Add a chunk
|
||||
public void AddChunk(Chunk chunk)
|
||||
{
|
||||
_chunks[(chunk.PositionX, chunk.PositionY)] = chunk;
|
||||
_chunks[(chunk.X, chunk.Y)] = chunk;
|
||||
}
|
||||
|
||||
// Remove a chunk
|
||||
@@ -63,9 +63,6 @@ namespace Voxel
|
||||
int localZ = worldZ % Chunk.Size;
|
||||
|
||||
chunk.SetBlock(localX, worldY, localZ, block);
|
||||
Renderer.ClearFaces();
|
||||
ChunkMesh chunkMesh = chunk.GetChunkMesh();
|
||||
Renderer.AddFaces(chunkMesh.Faces);
|
||||
}
|
||||
|
||||
public (Blocks block, int x, int y, int z) Raycast(float length)
|
||||
|
||||
Reference in New Issue
Block a user