mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
scripting: on_interact (right click on block) callback
This commit is contained in:
parent
2b4e6c1a14
commit
2c75a0bee4
5 changed files with 18 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue