mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Fixed liquid flow attempting to set negative block damage values
This should only execute if the current liquid block is actually still existent. When decay is negative, it means the water block doesn't exist anymore.
This commit is contained in:
@ -254,6 +254,7 @@ abstract class Liquid extends Transparent{
|
||||
//$this->updateFlow();
|
||||
}
|
||||
|
||||
if($decay >= 0){
|
||||
$bottomBlock = $this->level->getBlock($this->temporalVector->setComponents($this->x, $this->y - 1, $this->z));
|
||||
|
||||
if($this instanceof Lava and $bottomBlock instanceof Water){
|
||||
@ -263,7 +264,7 @@ abstract class Liquid extends Transparent{
|
||||
$this->getLevel()->setBlock($bottomBlock, BlockFactory::get($this->id, $decay | 0x08), true, false);
|
||||
$this->getLevel()->scheduleDelayedBlockUpdate($bottomBlock, $this->tickRate());
|
||||
|
||||
}elseif($decay >= 0 and ($decay === 0 or !$bottomBlock->canBeFlowedInto())){
|
||||
}elseif($decay === 0 or !$bottomBlock->canBeFlowedInto()){
|
||||
$flags = $this->getOptimalFlowDirections();
|
||||
|
||||
$l = $decay + $multiplier;
|
||||
@ -274,6 +275,7 @@ abstract class Liquid extends Transparent{
|
||||
|
||||
if($l >= 8){
|
||||
$this->checkForHarden();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -295,7 +297,7 @@ abstract class Liquid extends Transparent{
|
||||
}
|
||||
|
||||
$this->checkForHarden();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user