minor controllers refactor

This commit is contained in:
MihailRis
2024-11-20 18:03:39 +03:00
parent 9e02f1122f
commit 005bcfb436
5 changed files with 56 additions and 58 deletions
+4 -4
View File
@@ -24,9 +24,9 @@ using on_block_interaction = std::function<
/// BlocksController manages block updates and data (inventories, metadata)
class BlocksController {
Level* level;
Chunks* chunks;
Lighting* lighting;
const Level& level;
Chunks& chunks;
Lighting& lighting;
util::Clock randTickClock;
util::Clock blocksTickClock;
util::Clock worldTickClock;
@@ -34,7 +34,7 @@ class BlocksController {
FastRandom random {};
std::vector<on_block_interaction> blockInteractionCallbacks;
public:
BlocksController(Level* level, uint padding);
BlocksController(const Level& level, uint padding);
void updateSides(int x, int y, int z);
void updateSides(int x, int y, int z, int w, int h, int d);