Implemented End Crystal (#4715)

Co-authored-by: Dylan T. <dktapps@pmmp.io>
This commit is contained in:
ipad54
2024-11-16 20:57:57 +03:00
committed by GitHub
parent e8e441f739
commit e77f2c5198
8 changed files with 212 additions and 2 deletions

View File

@ -28,6 +28,7 @@ use pocketmine\data\SavedDataLoadingException;
use pocketmine\entity\Entity;
use pocketmine\entity\Living;
use pocketmine\entity\Location;
use pocketmine\entity\object\EndCrystal;
use pocketmine\event\entity\EntityCombustByEntityEvent;
use pocketmine\event\entity\EntityDamageByChildEntityEvent;
use pocketmine\event\entity\EntityDamageByEntityEvent;
@ -96,7 +97,7 @@ abstract class Projectile extends Entity{
}
public function canCollideWith(Entity $entity) : bool{
return $entity instanceof Living && !$this->onGround;
return ($entity instanceof Living || $entity instanceof EndCrystal) && !$this->onGround;
}
public function canBeCollidedWith() : bool{