mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Added player hand distance check
This commit is contained in:
parent
a501020198
commit
96bac5aaec
1 changed files with 6 additions and 0 deletions
|
|
@ -330,6 +330,9 @@ class Player{
|
|||
break;
|
||||
case MC_USE_ITEM:
|
||||
$data["eid"] = $this->eid;
|
||||
if(Utils::distance($this->entity->position, $data) > 8){
|
||||
break;
|
||||
}
|
||||
$this->server->handle("player.block.action", $data);
|
||||
break;
|
||||
case MC_PLACE_BLOCK:
|
||||
|
|
@ -337,6 +340,9 @@ class Player{
|
|||
break;
|
||||
case MC_REMOVE_BLOCK:
|
||||
$data["eid"] = $this->eid;
|
||||
if(Utils::distance($this->entity->position, $data) > 8){
|
||||
break;
|
||||
}
|
||||
$this->server->handle("player.block.break", $data);
|
||||
break;
|
||||
case MC_INTERACT:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue