add on_block_interact world event

This commit is contained in:
MihailRis
2024-11-05 13:55:07 +03:00
parent f686749ae8
commit f6f82644d4
6 changed files with 63 additions and 37 deletions
+5 -5
View File
@@ -64,15 +64,15 @@ namespace scripting {
void on_world_quit();
void cleanup();
void on_blocks_tick(const Block& block, int tps);
void update_block(const Block& block, int x, int y, int z);
void random_update_block(const Block& block, int x, int y, int z);
void update_block(const Block& block, const glm::ivec3& pos);
void random_update_block(const Block& block, const glm::ivec3& pos);
void on_block_placed(
Player* player, const Block& block, int x, int y, int z
Player* player, const Block& block, const glm::ivec3& pos
);
void on_block_broken(
Player* player, const Block& block, int x, int y, int z
Player* player, const Block& block, const glm::ivec3& pos
);
bool on_block_interact(Player* player, const Block& block, glm::ivec3 pos);
bool on_block_interact(Player* player, const Block& block, const glm::ivec3& pos);
/// @brief Called on RMB click with the item selected
/// @return true if prevents default action