mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-05 03:17:12 +00:00
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:
parent
9a1d3aec6b
commit
691df5c11d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user