mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
oops, a merge error
This commit is contained in:
parent
8fc11c6ce0
commit
bfe766e626
@ -326,17 +326,18 @@ abstract class Liquid extends Transparent{
|
||||
|
||||
protected function flowIntoBlock(Block $block, int $newFlowDecay, bool $falling) : void{
|
||||
if($this->canFlowInto($block) and !($block instanceof Liquid)){
|
||||
$ev = new BlockSpreadEvent($block, $this, BlockFactory::get($this->getId(), $newFlowDecay));
|
||||
$new = clone $this;
|
||||
$new->falling = $falling;
|
||||
$new->decay = $falling ? 0 : $newFlowDecay;
|
||||
|
||||
$ev = new BlockSpreadEvent($block, $this, $new);
|
||||
$ev->call();
|
||||
if(!$ev->isCancelled()){
|
||||
if($block->getId() > 0){
|
||||
$this->level->useBreakOn($block);
|
||||
}
|
||||
|
||||
$new = clone $this;
|
||||
$new->falling = $falling;
|
||||
$new->decay = $falling ? 0 : $newFlowDecay;
|
||||
$this->level->setBlock($block, $new);
|
||||
$this->level->setBlock($block, $ev->getNewState());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user