mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Merge branch 'next-minor' into next-major
This commit is contained in:
@ -439,7 +439,9 @@ abstract class Living extends Entity{
|
||||
*/
|
||||
protected function applyPostDamageEffects(EntityDamageEvent $source) : void{
|
||||
$this->setAbsorption(max(0, $this->getAbsorption() + $source->getModifier(EntityDamageEvent::MODIFIER_ABSORPTION)));
|
||||
$this->damageArmor($source->getBaseDamage());
|
||||
if($source->canBeReducedByArmor()){
|
||||
$this->damageArmor($source->getBaseDamage());
|
||||
}
|
||||
|
||||
if($source instanceof EntityDamageByEntityEvent && ($attacker = $source->getDamager()) !== null){
|
||||
$damage = 0;
|
||||
|
Reference in New Issue
Block a user