Projectile: ensure that damage multiplier gets saved and restored

This commit is contained in:
Dylan K. Taylor 2018-06-23 10:41:04 +01:00
parent f1970492c1
commit b393f5f17e

View File

@ -75,6 +75,7 @@ abstract class Projectile extends Entity{
$this->setMaxHealth(1);
$this->setHealth(1);
$this->age = $this->namedtag->getShort("Age", $this->age);
$this->damage = $this->namedtag->getDouble("damage", $this->damage);
do{
$blockHit = null;
@ -144,6 +145,7 @@ abstract class Projectile extends Entity{
parent::saveNBT();
$this->namedtag->setShort("Age", $this->age);
$this->namedtag->setDouble("damage", $this->damage);
if($this->blockHit !== null){
$this->namedtag->setInt("tileX", $this->blockHit->x);