Cleanup Entity age handling, fixed arrows despawning too quickly after long flight

This commit is contained in:
Dylan K. Taylor
2018-09-08 14:23:06 +01:00
parent a3b78236eb
commit c7d58db7eb
9 changed files with 39 additions and 35 deletions

View File

@ -73,7 +73,6 @@ abstract class Projectile extends Entity{
$this->setMaxHealth(1);
$this->setHealth(1);
$this->age = $this->namedtag->getShort("Age", $this->age);
do{
$blockHit = null;
@ -123,8 +122,6 @@ abstract class Projectile extends Entity{
public function saveNBT() : void{
parent::saveNBT();
$this->namedtag->setShort("Age", $this->age);
if($this->blockHit !== null){
$this->namedtag->setInt("tileX", $this->blockHit->x);
$this->namedtag->setInt("tileY", $this->blockHit->y);