mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-08 04:38:35 +00:00
Projectile: ensure that damage multiplier gets saved and restored
This commit is contained in:
parent
f1970492c1
commit
b393f5f17e
@ -75,6 +75,7 @@ abstract class Projectile extends Entity{
|
|||||||
$this->setMaxHealth(1);
|
$this->setMaxHealth(1);
|
||||||
$this->setHealth(1);
|
$this->setHealth(1);
|
||||||
$this->age = $this->namedtag->getShort("Age", $this->age);
|
$this->age = $this->namedtag->getShort("Age", $this->age);
|
||||||
|
$this->damage = $this->namedtag->getDouble("damage", $this->damage);
|
||||||
|
|
||||||
do{
|
do{
|
||||||
$blockHit = null;
|
$blockHit = null;
|
||||||
@ -144,6 +145,7 @@ abstract class Projectile extends Entity{
|
|||||||
parent::saveNBT();
|
parent::saveNBT();
|
||||||
|
|
||||||
$this->namedtag->setShort("Age", $this->age);
|
$this->namedtag->setShort("Age", $this->age);
|
||||||
|
$this->namedtag->setDouble("damage", $this->damage);
|
||||||
|
|
||||||
if($this->blockHit !== null){
|
if($this->blockHit !== null){
|
||||||
$this->namedtag->setInt("tileX", $this->blockHit->x);
|
$this->namedtag->setInt("tileX", $this->blockHit->x);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user