eliminate remaining empty() usages

This commit is contained in:
Dylan K. Taylor
2020-02-07 21:46:16 +00:00
parent 1ffabbb567
commit aac7da6c96
22 changed files with 40 additions and 30 deletions

View File

@ -25,6 +25,7 @@ namespace pocketmine\block;
use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Facing;
use function count;
class Fence extends Transparent{
/** @var bool[] facing => dummy */
@ -80,7 +81,7 @@ class Fence extends Transparent{
->trim(Facing::SOUTH, $connectSouth ? 0 : $inset);
}
if(empty($bbs)){
if(count($bbs) === 0){
//centre post AABB (only needed if not connected on any axis - other BBs overlapping will do this if any connections are made)
return [
AxisAlignedBB::one()