add on_chunk_present and on_chunk_remove events

This commit is contained in:
MihailRis
2025-01-12 05:41:42 +03:00
parent cfa6b5e578
commit 22c7cb8398
9 changed files with 65 additions and 9 deletions
+5
View File
@@ -17,6 +17,7 @@ struct ContentPack;
class ContentIndices;
class Level;
class Block;
class Chunk;
class Player;
struct ItemDef;
class Inventory;
@@ -84,6 +85,10 @@ namespace scripting {
Player* player, const Block& block, const glm::ivec3& pos
);
bool on_block_interact(Player* player, const Block& block, const glm::ivec3& pos);
void on_chunk_present(const Chunk& chunk, bool loaded);
void on_chunk_remove(const Chunk& chunk);
void on_player_tick(Player* player, int tps);
/// @brief Called on RMB click with the item selected