Fire: fixed sticking to transparent top-sides of blocks

closes #4879
closes #2819
This commit is contained in:
Dylan K. Taylor 2022-03-09 16:59:11 +00:00
parent 10c0d83fa5
commit 025f6407e2
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -99,7 +99,7 @@ class Fire extends Flowable{
}
public function onNearbyBlockChange() : void{
if(!$this->getSide(Facing::DOWN)->isSolid() && !$this->hasAdjacentFlammableBlocks()){
if($this->getSide(Facing::DOWN)->isTransparent() && !$this->hasAdjacentFlammableBlocks()){
$this->position->getWorld()->setBlock($this->position, VanillaBlocks::AIR());
}else{
$this->position->getWorld()->scheduleDelayedBlockUpdate($this->position, mt_rand(30, 40));
@ -129,7 +129,7 @@ class Fire extends Flowable{
}
}elseif(!$this->hasAdjacentFlammableBlocks()){
$canSpread = false;
if(!$down->isSolid() || $this->age > 3){
if($down->isTransparent() || $this->age > 3){
$result = VanillaBlocks::AIR();
}
}