diff --git a/src/pocketmine/item/FlintSteel.php b/src/pocketmine/item/FlintSteel.php index f512b1de8..0cbcc0262 100644 --- a/src/pocketmine/item/FlintSteel.php +++ b/src/pocketmine/item/FlintSteel.php @@ -37,12 +37,16 @@ class FlintSteel extends Tool{ } public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ - if(($player->gamemode & 0x01) === 0 and $this->useOn($block) and $this->getDamage() >= $this->getMaxDurability()){ - $player->getInventory()->setItemInHand(new Item(Item::AIR, 0, 0)); - } - if($block->getId() === self::AIR and ($target instanceof Solid)){ $level->setBlock($block, new Fire(), true); + if(($player->gamemode & 0x01) === 0 and $this->useOn($block)){ + if($this->getDamage() >= $this->getMaxDurability()){ + $player->getInventory()->setItemInHand(new Item(Item::AIR, 0, 0)); + }else{ + $this->meta++; + $player->getInventory()->setItemInHand($this); + } + } return true; }