mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Add and make use of Block->isSameType()
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user