Update Entity.php

This commit is contained in:
ArkQuark 2021-12-24 14:15:28 +03:00
parent 7e1fdc1a21
commit fef41b5f1d

View file

@ -266,11 +266,12 @@ class Entity extends Position{
$this->close(); //Despawn timer
return false;
}
}elseif($this->class === ENTITY_OBJECT and $this->type === OBJECT_ARROW){
}elseif($this->class === ENTITY_OBJECT and ($this->type === OBJECT_ARROW) or ($this->type === OBJECT_SNOWBALL)){
if(($time - $this->spawntime) >= 60){
$this->close(); //Despawn timer
return false;
}
}
if($this->class === ENTITY_MOB){
@ -737,6 +738,15 @@ class Entity extends Position{
"z" => $this->z,
"did" => 0,
));
}elseif($this->type === OBJECT_SNOWBALL){
$player->dataPacket(MC_ADD_ENTITY, array(
"eid" => $this->eid,
"type" => $this->type,
"x" => $this->x,
"y" => $this->y,
"z" => $this->z,
"did" => 0,
));
}elseif($this->type === OBJECT_ARROW){
$player->dataPacket(MC_ADD_ENTITY, array(
"eid" => $this->eid,