mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-09 05:08:36 +00:00
Fire: fixed sticking to transparent top-sides of blocks
closes #4879 closes #2819
This commit is contained in:
parent
10c0d83fa5
commit
025f6407e2
@ -99,7 +99,7 @@ class Fire extends Flowable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function onNearbyBlockChange() : void{
|
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());
|
$this->position->getWorld()->setBlock($this->position, VanillaBlocks::AIR());
|
||||||
}else{
|
}else{
|
||||||
$this->position->getWorld()->scheduleDelayedBlockUpdate($this->position, mt_rand(30, 40));
|
$this->position->getWorld()->scheduleDelayedBlockUpdate($this->position, mt_rand(30, 40));
|
||||||
@ -129,7 +129,7 @@ class Fire extends Flowable{
|
|||||||
}
|
}
|
||||||
}elseif(!$this->hasAdjacentFlammableBlocks()){
|
}elseif(!$this->hasAdjacentFlammableBlocks()){
|
||||||
$canSpread = false;
|
$canSpread = false;
|
||||||
if(!$down->isSolid() || $this->age > 3){
|
if($down->isTransparent() || $this->age > 3){
|
||||||
$result = VanillaBlocks::AIR();
|
$result = VanillaBlocks::AIR();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user