From 94936d0f6b433629a6193f4fd11193f94bcdb5bc Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 1 Oct 2018 16:15:49 -0400 Subject: [PATCH] Fixed CPU leak in falling water block updating The cause of this was the flow decay of falling water changing, but the flow decay is ignored for falling water. This caused the block to be repeatedly set to itself, triggering local block updates, causing the disease to spread in large falling water bodies and cause immense amounts of lag. --- src/pocketmine/block/Liquid.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/block/Liquid.php b/src/pocketmine/block/Liquid.php index caa43e692..e81928843 100644 --- a/src/pocketmine/block/Liquid.php +++ b/src/pocketmine/block/Liquid.php @@ -246,7 +246,7 @@ abstract class Liquid extends Transparent{ } } - if($newDecay !== $this->decay or $falling !== $this->falling){ +*/ if($falling !== $this->falling or (!$falling and $newDecay !== $this->decay)){ if(!$falling and $newDecay < 0){ $this->level->setBlock($this, BlockFactory::get(Block::AIR)); return;