mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 19:50:18 +00:00
Replace BlockLegacyIds usages with BlockTypeIds where possible
This commit is contained in:
@@ -24,7 +24,7 @@ declare(strict_types=1);
|
||||
namespace pocketmine\item;
|
||||
|
||||
use pocketmine\block\Block;
|
||||
use pocketmine\block\BlockLegacyIds;
|
||||
use pocketmine\block\BlockTypeIds;
|
||||
use pocketmine\block\VanillaBlocks;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\player\Player;
|
||||
@@ -33,7 +33,7 @@ use pocketmine\world\sound\FlintSteelSound;
|
||||
class FlintSteel extends Tool{
|
||||
|
||||
public function onInteractBlock(Player $player, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector) : ItemUseResult{
|
||||
if($blockReplace->getId() === BlockLegacyIds::AIR){
|
||||
if($blockReplace->getTypeId() === BlockTypeIds::AIR){
|
||||
$world = $player->getWorld();
|
||||
$world->setBlock($blockReplace->getPosition(), VanillaBlocks::FIRE());
|
||||
$world->addSound($blockReplace->getPosition()->add(0.5, 0.5, 0.5), new FlintSteelSound());
|
||||
|
Reference in New Issue
Block a user