mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12:39:43 +00:00
Update Entity.php
This commit is contained in:
parent
7e1fdc1a21
commit
fef41b5f1d
1 changed files with 11 additions and 1 deletions
|
|
@ -266,11 +266,12 @@ class Entity extends Position{
|
||||||
$this->close(); //Despawn timer
|
$this->close(); //Despawn timer
|
||||||
return false;
|
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){
|
if(($time - $this->spawntime) >= 60){
|
||||||
$this->close(); //Despawn timer
|
$this->close(); //Despawn timer
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->class === ENTITY_MOB){
|
if($this->class === ENTITY_MOB){
|
||||||
|
|
@ -737,6 +738,15 @@ class Entity extends Position{
|
||||||
"z" => $this->z,
|
"z" => $this->z,
|
||||||
"did" => 0,
|
"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){
|
}elseif($this->type === OBJECT_ARROW){
|
||||||
$player->dataPacket(MC_ADD_ENTITY, array(
|
$player->dataPacket(MC_ADD_ENTITY, array(
|
||||||
"eid" => $this->eid,
|
"eid" => $this->eid,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue