mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
add 'on_block_tick' event
This commit is contained in:
parent
bb35fc665f
commit
b863d47d7f
8 changed files with 165 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue