From 4bdd6410db2636fb521c155eced5c385014e2ead Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 20 Jul 2023 17:00:32 +0100 Subject: [PATCH] Fire: fixed support requirements closes #5599 --- src/block/Fire.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/block/Fire.php b/src/block/Fire.php index 648724529..0f2f7c876 100644 --- a/src/block/Fire.php +++ b/src/block/Fire.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace pocketmine\block; use pocketmine\block\utils\BlockDataSerializer; +use pocketmine\block\utils\SupportType; use pocketmine\entity\Entity; use pocketmine\entity\projectile\Arrow; use pocketmine\event\block\BlockBurnEvent; @@ -99,9 +100,13 @@ class Fire extends Flowable{ return []; } + private function canBeSupportedBy(Block $block) : bool{ + return $block->getSupportType(Facing::UP)->equals(SupportType::FULL()); + } + public function onNearbyBlockChange() : void{ $world = $this->position->getWorld(); - if($this->getSide(Facing::DOWN)->isTransparent() && !$this->hasAdjacentFlammableBlocks()){ + if(!$this->canBeSupportedBy($this->getSide(Facing::DOWN)) && !$this->hasAdjacentFlammableBlocks()){ $world->setBlock($this->position, VanillaBlocks::AIR()); }else{ $world->scheduleDelayedBlockUpdate($this->position, mt_rand(30, 40));