22declare(strict_types=1);
 
   24namespace pocketmine\block\utils;
 
   42    public function getLightLevel() : int{
 
   43        return $this->lit ? 3 : 0;
 
   50    public function onInteract(Item $item, 
int $face, Vector3 $clickVector, ?Player $player = 
null, array &$returnedItems = []) : bool{
 
   51        if($item->getTypeId() === ItemTypeIds::FIRE_CHARGE || $item->getTypeId() === ItemTypeIds::FLINT_AND_STEEL || $item->hasEnchantment(VanillaEnchantments::FIRE_ASPECT())){
 
   55            if($item instanceof Durable){
 
   56                $item->applyDamage(1);
 
   57            }elseif($item->getTypeId() === ItemTypeIds::FIRE_CHARGE){
 
   60                $this->position->getWorld()->addSound($this->position, 
new BlazeShootSound());
 
   62            $this->position->getWorld()->addSound($this->position, 
new FlintSteelSound());
 
   63            $this->position->getWorld()->setBlock($this->position, $this->setLit(
true));
 
   71            $this->position->getWorld()->addSound($this->position, 
new FireExtinguishSound());
 
   72            $this->position->getWorld()->setBlock($this->position, $this->setLit(
false));
 
   82    public function onProjectileHit(Projectile $projectile, RayTraceResult $hitResult) : void{
 
   83        if(!$this->lit && $projectile->isOnFire()){
 
   84            $this->position->getWorld()->setBlock($this->position, $this->setLit(
true));