mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 03:16:35 +00:00
populate missing array value types in entity namespace
This commit is contained in:
parent
e61c3e8bf6
commit
839a789180
@ -176,6 +176,8 @@ class DataPropertyManager{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all properties.
|
* Returns all properties.
|
||||||
|
*
|
||||||
|
* @return mixed[][]
|
||||||
*/
|
*/
|
||||||
public function getAll() : array{
|
public function getAll() : array{
|
||||||
return $this->properties;
|
return $this->properties;
|
||||||
@ -183,6 +185,8 @@ class DataPropertyManager{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns properties that have changed and need to be broadcasted.
|
* Returns properties that have changed and need to be broadcasted.
|
||||||
|
*
|
||||||
|
* @return mixed[][]
|
||||||
*/
|
*/
|
||||||
public function getDirty() : array{
|
public function getDirty() : array{
|
||||||
return $this->dirtyProperties;
|
return $this->dirtyProperties;
|
||||||
|
@ -2055,7 +2055,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Player[]|Player $player
|
* @param Player[]|Player $player
|
||||||
* @param array $data Properly formatted entity data, defaults to everything
|
* @param mixed[][] $data Properly formatted entity data, defaults to everything
|
||||||
*/
|
*/
|
||||||
public function sendData($player, ?array $data = null) : void{
|
public function sendData($player, ?array $data = null) : void{
|
||||||
if(!is_array($player)){
|
if(!is_array($player)){
|
||||||
@ -2078,6 +2078,9 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Player[]|null $players
|
||||||
|
*/
|
||||||
public function broadcastEntityEvent(int $eventId, ?int $eventData = null, ?array $players = null) : void{
|
public function broadcastEntityEvent(int $eventId, ?int $eventData = null, ?array $players = null) : void{
|
||||||
$pk = new ActorEventPacket();
|
$pk = new ActorEventPacket();
|
||||||
$pk->entityRuntimeId = $this->id;
|
$pk->entityRuntimeId = $this->id;
|
||||||
|
@ -792,6 +792,8 @@ abstract class Living extends Entity implements Damageable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param true[] $transparent
|
||||||
|
*
|
||||||
* @return Block[]
|
* @return Block[]
|
||||||
*/
|
*/
|
||||||
public function getLineOfSight(int $maxDistance, int $maxLength = 0, array $transparent = []) : array{
|
public function getLineOfSight(int $maxDistance, int $maxLength = 0, array $transparent = []) : array{
|
||||||
@ -831,6 +833,9 @@ abstract class Living extends Entity implements Damageable{
|
|||||||
return $blocks;
|
return $blocks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param true[] $transparent
|
||||||
|
*/
|
||||||
public function getTargetBlock(int $maxDistance, array $transparent = []) : ?Block{
|
public function getTargetBlock(int $maxDistance, array $transparent = []) : ?Block{
|
||||||
$line = $this->getLineOfSight($maxDistance, 1, $transparent);
|
$line = $this->getLineOfSight($maxDistance, 1, $transparent);
|
||||||
if(count($line) > 0){
|
if(count($line) > 0){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user