Merge remote-tracking branch 'origin/stable' into staging/4.1

This commit is contained in:
Dylan K. Taylor
2022-02-06 23:55:52 +00:00
10 changed files with 44 additions and 16 deletions

View File

@ -83,6 +83,9 @@ abstract class Liquid extends Transparent{
/** @return $this */
public function setDecay(int $decay) : self{
if($decay < 0 || $decay > 7){
throw new \InvalidArgumentException("Decay must be in range 0-7");
}
$this->decay = $decay;
return $this;
}
@ -339,7 +342,7 @@ abstract class Liquid extends Transparent{
$ev = new BlockSpreadEvent($block, $this, $new);
$ev->call();
if(!$ev->isCancelled()){
if($block->getId() > 0){
if($block->getId() !== BlockLegacyIds::AIR){
$this->position->getWorld()->useBreakOn($block->position);
}