mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
Fixed Anvil levels duplicating saved entities
This commit is contained in:
@@ -161,8 +161,7 @@ class Arrow extends Projectile{
|
||||
}
|
||||
|
||||
public function attack($damage, $source = EntityDamageEvent::CAUSE_MAGIC){
|
||||
$this->setLastDamageCause($source);
|
||||
$this->setHealth($this->getHealth() - $damage);
|
||||
|
||||
}
|
||||
|
||||
public function heal($amount){
|
||||
@@ -170,6 +169,7 @@ class Arrow extends Projectile{
|
||||
}
|
||||
|
||||
public function saveNBT(){
|
||||
parent::saveNBT();
|
||||
$this->namedtag->Age = new Short("Age", $this->age);
|
||||
}
|
||||
|
||||
|
@@ -114,6 +114,7 @@ class DroppedItem extends Entity{
|
||||
}
|
||||
|
||||
public function saveNBT(){
|
||||
parent::saveNBT();
|
||||
$this->namedtag->Item = new Compound("Item", [
|
||||
"id" => new Short("id", $this->item->getID()),
|
||||
"Damage" => new Short("Damage", $this->item->getDamage()),
|
||||
|
Reference in New Issue
Block a user