Some blocks and entity fixes

This commit is contained in:
ArkQuark 2021-12-24 19:32:52 +03:00
parent 3ad75fc9b6
commit 406ab32504
5 changed files with 33 additions and 5 deletions

View file

@ -136,7 +136,7 @@ class Entity extends Position{
$this->setHealth(10000000, "generic");
$this->server->schedule(5, array($this, "updateFuse"), array(), true);
$this->update();
}elseif($this->type === OBJECT_ARROW){
}elseif($this->type === (OBJECT_ARROW or OBJECT_SNOWBALL)){
$this->server->schedule(1210, array($this, "update")); //Despawn
$this->update();
}
@ -266,7 +266,7 @@ class Entity extends Position{
$this->close(); //Despawn timer
return false;
}
}elseif($this->class === ENTITY_OBJECT and ($this->type === OBJECT_ARROW) or ($this->type === OBJECT_SNOWBALL)){
}elseif($this->class === ENTITY_OBJECT and ($this->type === OBJECT_ARROW or OBJECT_SNOWBALL)){
if(($time - $this->spawntime) >= 60){
$this->close(); //Despawn timer
return false;
@ -750,6 +750,15 @@ class Entity extends Position{
"z" => $this->z,
"did" => 0,
));
}elseif($this->type === OBJECT_MINECART){
$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,