diff --git a/src/entity/Entity.php b/src/entity/Entity.php index 9d7c2d6d5..f3c8a7b0b 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -1687,6 +1687,9 @@ abstract class Entity{ $this->networkProperties->setGenericFlag(EntityMetadataFlags::WALLCLIMBING, $this->canClimbWalls); } + /** + * @param Player[]|null $players + */ public function broadcastEntityEvent(int $eventId, ?int $eventData = null, ?array $players = null) : void{ $this->server->broadcastPackets($players ?? $this->getViewers(), [ActorEventPacket::create($this->id, $eventId, $eventData ?? 0)]); } diff --git a/src/entity/Living.php b/src/entity/Living.php index 9dc43442b..c8f0f72fb 100644 --- a/src/entity/Living.php +++ b/src/entity/Living.php @@ -631,6 +631,8 @@ abstract class Living extends Entity{ } /** + * @param true[] $transparent + * * @return Block[] */ public function getLineOfSight(int $maxDistance, int $maxLength = 0, array $transparent = []) : array{ @@ -670,6 +672,9 @@ abstract class Living extends Entity{ return $blocks; } + /** + * @param true[] $transparent + */ public function getTargetBlock(int $maxDistance, array $transparent = []) : ?Block{ $line = $this->getLineOfSight($maxDistance, 1, $transparent); if(count($line) > 0){