move getVoxels from ChunksStorage to Chunks

This commit is contained in:
MihailRis
2024-11-11 22:30:42 +03:00
parent 79693580e0
commit c5ca9128e9
8 changed files with 107 additions and 107 deletions
+5 -2
View File
@@ -21,6 +21,7 @@ class WorldFiles;
class LevelEvents;
class Block;
class Level;
class VoxelsVolume;
/// Player-centred chunks matrix
class Chunks {
@@ -55,8 +56,8 @@ public:
bool putChunk(const std::shared_ptr<Chunk>& chunk);
Chunk* getChunk(int32_t x, int32_t z);
Chunk* getChunkByVoxel(int32_t x, int32_t y, int32_t z);
Chunk* getChunk(int32_t x, int32_t z) const;
Chunk* getChunkByVoxel(int32_t x, int32_t y, int32_t z) const;
voxel* get(int32_t x, int32_t y, int32_t z) const;
voxel& require(int32_t x, int32_t y, int32_t z) const;
@@ -119,6 +120,8 @@ public:
bool isReplaceableBlock(int32_t x, int32_t y, int32_t z);
bool isObstacleBlock(int32_t x, int32_t y, int32_t z);
void getVoxels(VoxelsVolume* volume, bool backlight = false) const;
void setCenter(int32_t x, int32_t z);
void resize(uint32_t newW, uint32_t newD);