From b393f5f17e116c745ceecc9f184104e4abb0fe32 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 23 Jun 2018 10:41:04 +0100 Subject: [PATCH] Projectile: ensure that damage multiplier gets saved and restored --- src/pocketmine/entity/projectile/Projectile.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pocketmine/entity/projectile/Projectile.php b/src/pocketmine/entity/projectile/Projectile.php index 0daf7039d..768334c05 100644 --- a/src/pocketmine/entity/projectile/Projectile.php +++ b/src/pocketmine/entity/projectile/Projectile.php @@ -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);