mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Attacking entities fixed
This commit is contained in:
parent
1f8987183b
commit
9a3f887f44
7 changed files with 44 additions and 101 deletions
|
|
@ -1039,8 +1039,8 @@ class Player{
|
|||
if($this->spawned === false){
|
||||
break;
|
||||
}
|
||||
if($this->gamemode !== VIEW and $this->blocked === false and isset($this->server->entities[$data["target"]]) and $this->entity->distance($this->server->entities[$data["target"]]) <= 8){
|
||||
$target = $this->server->api->entity->get($data["target"]);
|
||||
$target = $this->server->api->entity->get($data["target"]);
|
||||
if($this->gamemode !== VIEW and $this->blocked === false and ($target instanceof Entity) and $this->entity->distance($target) <= 8){
|
||||
$data["targetentity"] = $target;
|
||||
$data["entity"] = $this->entity;
|
||||
if(!($target instanceof Entity)){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue