Fixed Anvil levels duplicating saved entities

This commit is contained in:
Shoghi Cervantes
2014-09-29 13:08:49 +02:00
parent 61d84c73d0
commit 25f8e8318b
3 changed files with 5 additions and 45 deletions

View File

@@ -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);
}

View File

@@ -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()),