mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-10 15:59:39 +00:00
Merge commit '8c5a81cf5'
# Conflicts: # resources/vanilla
This commit is contained in:
commit
2bf73c7a4a
@ -467,12 +467,14 @@ abstract class Living extends Entity{
|
||||
|
||||
$this->attackTime = $source->getAttackCooldown();
|
||||
|
||||
if($source instanceof EntityDamageByEntityEvent){
|
||||
$e = $source->getDamager();
|
||||
if($source instanceof EntityDamageByChildEntityEvent){
|
||||
$e = $source->getChild();
|
||||
if($source instanceof EntityDamageByChildEntityEvent){
|
||||
$e = $source->getChild();
|
||||
if($e !== null){
|
||||
$motion = $e->getMotion();
|
||||
$this->knockBack($motion->x, $motion->z, $source->getKnockBack());
|
||||
}
|
||||
|
||||
}elseif($source instanceof EntityDamageByEntityEvent){
|
||||
$e = $source->getDamager();
|
||||
if($e !== null){
|
||||
$deltaX = $this->location->x - $e->location->x;
|
||||
$deltaZ = $this->location->z - $e->location->z;
|
||||
|
Loading…
x
Reference in New Issue
Block a user