Merge commit '8c5a81cf5'

# Conflicts:
#	resources/vanilla
This commit is contained in:
Dylan K. Taylor 2020-06-03 12:50:09 +01:00
commit 2bf73c7a4a

View File

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