mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29: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;
|
break;
|
||||||
case MC_USE_ITEM:
|
case MC_USE_ITEM:
|
||||||
$data["eid"] = $this->eid;
|
$data["eid"] = $this->eid;
|
||||||
|
if(Utils::distance($this->entity->position, $data) > 8){
|
||||||
|
break;
|
||||||
|
}
|
||||||
$this->server->handle("player.block.action", $data);
|
$this->server->handle("player.block.action", $data);
|
||||||
break;
|
break;
|
||||||
case MC_PLACE_BLOCK:
|
case MC_PLACE_BLOCK:
|
||||||
|
|
@ -337,6 +340,9 @@ class Player{
|
||||||
break;
|
break;
|
||||||
case MC_REMOVE_BLOCK:
|
case MC_REMOVE_BLOCK:
|
||||||
$data["eid"] = $this->eid;
|
$data["eid"] = $this->eid;
|
||||||
|
if(Utils::distance($this->entity->position, $data) > 8){
|
||||||
|
break;
|
||||||
|
}
|
||||||
$this->server->handle("player.block.break", $data);
|
$this->server->handle("player.block.break", $data);
|
||||||
break;
|
break;
|
||||||
case MC_INTERACT:
|
case MC_INTERACT:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue