diff --git a/src/pocketmine/block/TNT.php b/src/pocketmine/block/TNT.php index 3a9caf54d..92b49c374 100644 --- a/src/pocketmine/block/TNT.php +++ b/src/pocketmine/block/TNT.php @@ -27,6 +27,8 @@ use pocketmine\entity\Entity; use pocketmine\entity\EntityFactory; use pocketmine\entity\object\PrimedTNT; use pocketmine\entity\projectile\Arrow; +use pocketmine\item\Durable; +use pocketmine\item\enchantment\Enchantment; use pocketmine\item\FlintSteel; use pocketmine\item\Item; use pocketmine\math\Vector3; @@ -53,8 +55,10 @@ class TNT extends Solid{ } public function onActivate(Item $item, int $face, Vector3 $clickVector, ?Player $player = null) : bool{ - if($item instanceof FlintSteel){ - $item->applyDamage(1); + if($item instanceof FlintSteel or $item->hasEnchantment(Enchantment::FIRE_ASPECT)){ + if($item instanceof Durable){ + $item->applyDamage(1); + } $this->ignite(); return true; }