Unnecessary "?:"

This commit is contained in:
Sunch 2024-08-17 20:01:40 +08:00
parent 4630481d54
commit 4eb6bd14a2
6 changed files with 9 additions and 9 deletions

View file

@ -133,8 +133,8 @@ class MobSpawner{
$b1 = $this->level->level->getBlockID($x, $y - 1, $z);
if(
!StaticBlock::getIsSolid($b) && !StaticBlock::getIsLiquid($b) &&
(StaticBlock::getIsSolid($b1) && ($grassOnly ? $b1 === GRASS : true) &&
($highMob ? !StaticBlock::getIsSolid($b2) && !StaticBlock::getIsLiquid($b2) : true))
(StaticBlock::getIsSolid($b1) && (!$grassOnly || $b1 === GRASS) &&
(!$highMob || !StaticBlock::getIsSolid($b2) && !StaticBlock::getIsLiquid($b2)))
){
$allowed[] = $y;
}