Liquid: split canFlowInto() over multiple lines

the original version is very hard to read.
This commit is contained in:
Dylan K. Taylor 2021-09-18 15:53:54 +01:00
parent b047100719
commit 34e1b244fa
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -493,6 +493,9 @@ abstract class Liquid extends Transparent{
}
protected function canFlowInto(Block $block) : bool{
return $this->position->getWorld()->isInWorld($block->position->x, $block->position->y, $block->position->z) and $block->canBeFlowedInto() and !($block instanceof Liquid and $block->isSource()); //TODO: I think this should only be liquids of the same type
return
$this->position->getWorld()->isInWorld($block->position->x, $block->position->y, $block->position->z) and
$block->canBeFlowedInto() and
!($block instanceof Liquid and $block->isSource()); //TODO: I think this should only be liquids of the same type
}
}