childEntityEid = $childEntity->getId(); parent::__construct($damager, $entity, $cause, $damage, $modifiers); } /** * Returns the entity which caused the damage, or null if the entity has been killed or closed. */ public function getChild() : ?Entity{ return $this->getEntity()->getLevelNonNull()->getServer()->findEntity($this->childEntityEid); } }