diff --git a/src/pocketmine/entity/Living.php b/src/pocketmine/entity/Living.php index 829df4a58..b2e1dbed6 100644 --- a/src/pocketmine/entity/Living.php +++ b/src/pocketmine/entity/Living.php @@ -644,6 +644,10 @@ abstract class Living extends Entity implements Damageable{ foreach($ev->getDrops() as $item){ $this->getLevel()->dropItem($this, $item); } + + //TODO: check death conditions (must have been damaged by player < 5 seconds from death) + //TODO: allow this number to be manipulated during EntityDeathEvent + $this->level->dropExperience($this, $this->getXpDropAmount()); } protected function onDeathUpdate(int $tickDiff) : bool{ @@ -651,9 +655,6 @@ abstract class Living extends Entity implements Damageable{ $this->deadTicks += $tickDiff; if($this->deadTicks >= $this->maxDeadTicks){ $this->endDeathAnimation(); - - //TODO: check death conditions (must have been damaged by player < 5 seconds from death) - $this->level->dropExperience($this, $this->getXpDropAmount()); } }