Add and make use of Block->isSameType()

This commit is contained in:
Dylan K. Taylor
2018-09-27 17:59:06 +01:00
parent 8910c93de1
commit 35d51570be
8 changed files with 27 additions and 18 deletions

View File

@ -111,7 +111,7 @@ abstract class Liquid extends Transparent{
}
protected function getEffectiveFlowDecay(Block $block) : int{
if(!($block instanceof Liquid) or $block->getId() !== $this->getId()){
if(!($block instanceof Liquid) or !$block->isSameType($this)){
return -1;
}
@ -410,7 +410,7 @@ abstract class Liquid extends Transparent{
}
private function getSmallestFlowDecay(Block $block, int $decay) : int{
if(!($block instanceof Liquid) or $block->getId() !== $this->getId()){
if(!($block instanceof Liquid) or !$block->isSameType($this)){
return $decay;
}