mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 12:04:46 +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);
|
||||
}
|
||||
|
||||
|
@@ -39,6 +39,7 @@ use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties;
|
||||
use pocketmine\utils\Color;
|
||||
use pocketmine\world\particle\PotionSplashParticle;
|
||||
use pocketmine\world\sound\PotionSplashSound;
|
||||
use function count;
|
||||
use function round;
|
||||
use function sqrt;
|
||||
|
||||
@@ -75,7 +76,7 @@ class SplashPotion extends Throwable{
|
||||
$effects = $this->getPotionEffects();
|
||||
$hasEffects = true;
|
||||
|
||||
if(empty($effects)){
|
||||
if(count($effects) === 0){
|
||||
$particle = new PotionSplashParticle(PotionSplashParticle::DEFAULT_COLOR());
|
||||
$hasEffects = false;
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user