mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Merge commit '8726604899d1a371567141e0831ed570d3233356'
This commit is contained in:
@ -717,7 +717,7 @@ abstract class Living extends Entity{
|
||||
*/
|
||||
public function getTargetBlock(int $maxDistance, array $transparent = []) : ?Block{
|
||||
$line = $this->getLineOfSight($maxDistance, 1, $transparent);
|
||||
if(!empty($line)){
|
||||
if(count($line) > 0){
|
||||
return array_shift($line);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user