scripting: on_interact (right click on block) callback

This commit is contained in:
MihailRis
2023-12-29 00:31:21 +03:00
parent 2b4e6c1a14
commit 2c75a0bee4
5 changed files with 18 additions and 0 deletions
+4
View File
@@ -266,6 +266,10 @@ void PlayerController::updateInteraction(){
blocksController->breakBlock(player, block, x, y, z);
}
if (rclick){
if (block->rt.funcsset.oninteract) {
scripting::on_block_interact(player, block, x, y, z);
return;
}
if (block->model != BlockModel::xsprite){
x = (iend.x)+(norm.x);
y = (iend.y)+(norm.y);