mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Clean up LevelSoundEvent handling
This commit is contained in:
@@ -26,8 +26,8 @@ namespace pocketmine\item;
|
||||
use pocketmine\block\Block;
|
||||
use pocketmine\block\BlockFactory;
|
||||
use pocketmine\block\BlockLegacyIds;
|
||||
use pocketmine\level\sound\FlintSteelSound;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
|
||||
use pocketmine\Player;
|
||||
use function assert;
|
||||
|
||||
@@ -41,7 +41,7 @@ class FlintSteel extends Tool{
|
||||
$level = $player->getLevel();
|
||||
assert($level !== null);
|
||||
$level->setBlock($blockReplace, BlockFactory::get(BlockLegacyIds::FIRE));
|
||||
$level->broadcastLevelSoundEvent($blockReplace->add(0.5, 0.5, 0.5), LevelSoundEventPacket::SOUND_IGNITE);
|
||||
$level->addSound($blockReplace->add(0.5, 0.5, 0.5), new FlintSteelSound());
|
||||
|
||||
$this->applyDamage(1);
|
||||
|
||||
|
Reference in New Issue
Block a user