add 'on_block_tick' event

This commit is contained in:
MihailRis 2025-09-14 23:57:45 +03:00
parent bb35fc665f
commit b863d47d7f
8 changed files with 165 additions and 1 deletions

View file

@ -24,6 +24,21 @@ struct AABB;
namespace blocks_agent {
struct BlockRegisterEvent {
enum class Type : uint16_t {
REGISTER_UPDATING,
UNREGISTER_UPDATING,
};
Type type;
blockid_t id;
glm::ivec3 coord;
};
std::vector<BlockRegisterEvent> pull_register_events();
void on_chunk_present(const ContentIndices& indices, const Chunk& chunk);
void on_chunk_remove(const ContentIndices& indices, const Chunk& chunk);
/// @brief Get specified chunk.
/// @tparam Storage
/// @param chunks