Merge branch '3.5'

This commit is contained in:
Dylan K. Taylor
2019-01-23 16:48:12 +00:00
3 changed files with 15 additions and 11 deletions

View File

@ -649,6 +649,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{
@ -656,9 +660,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());
}
}