FlintSteel: remove instanceof Solid check

This makes the behaviour match vanilla. This will now allow Fire block itself to handle deletion of itself when the area is not suitable (now that the logic is implemented in Fire for this).

This allows attempting to place in invalid conditions, which is as expected. This will produce the sound and flash as per vanilla, as the fire extinguishes itself.
This commit is contained in:
Dylan K. Taylor 2018-03-16 17:29:05 +00:00
parent 9a1d3aec6b
commit 691df5c11d

View File

@ -25,7 +25,6 @@ namespace pocketmine\item;
use pocketmine\block\Block;
use pocketmine\block\BlockFactory;
use pocketmine\block\Solid;
use pocketmine\math\Vector3;
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
use pocketmine\Player;
@ -36,7 +35,7 @@ class FlintSteel extends Tool{
}
public function onActivate(Player $player, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector) : bool{
if($blockReplace->getId() === self::AIR and ($blockClicked instanceof Solid)){
if($blockReplace->getId() === self::AIR){
$level = $player->getLevel();
assert($level !== null);
$level->setBlock($blockReplace, BlockFactory::get(Block::FIRE), true);