mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user