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.
This commit is contained in:
Dylan K. Taylor 2018-10-01 16:15:49 -04:00
parent 74486d6880
commit 94936d0f6b

View File

@ -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;