move Chunks from Level to Player
This commit is contained in:
@@ -14,19 +14,20 @@ class Level;
|
||||
class Chunk;
|
||||
class Chunks;
|
||||
class Lighting;
|
||||
class GlobalChunks;
|
||||
class ContentIndices;
|
||||
|
||||
enum class BlockInteraction { step, destruction, placing };
|
||||
|
||||
/// @brief Player argument is nullable
|
||||
using on_block_interaction = std::function<
|
||||
void(Player*, const glm::ivec3&, const Block&, BlockInteraction type)>;
|
||||
void(Player*, const glm::ivec3&, const Block&, BlockInteraction)>;
|
||||
|
||||
/// BlocksController manages block updates and data (inventories, metadata)
|
||||
class BlocksController {
|
||||
const Level& level;
|
||||
Chunks& chunks;
|
||||
Lighting& lighting;
|
||||
GlobalChunks& chunks;
|
||||
Lighting* lighting;
|
||||
util::Clock randTickClock;
|
||||
util::Clock blocksTickClock;
|
||||
util::Clock worldTickClock;
|
||||
@@ -34,7 +35,7 @@ class BlocksController {
|
||||
FastRandom random {};
|
||||
std::vector<on_block_interaction> blockInteractionCallbacks;
|
||||
public:
|
||||
BlocksController(const Level& level, Lighting& lighting, uint padding);
|
||||
BlocksController(const Level& level, Lighting* lighting, uint padding);
|
||||
|
||||
void updateSides(int x, int y, int z);
|
||||
void updateSides(int x, int y, int z, int w, int h, int d);
|
||||
|
||||
Reference in New Issue
Block a user