Hello, I am trying to play a sound using LevelSoundEventPacket and I can play certain sounds like HIT, BREAK, PLACE, etc without a problem, but when I tried playing THUNDER and EXPLOSION nothing happened.
@jasonwynn10 just didn't understand your problem, nothing will change. To play them, you need to modify $pk->extraData and $pk->pitch
And I don't know what's the int of them :/ Maybe, do a var_dump() and you will find what numbers you need to set.
extraData is volume, I set it 100 and I can hear sounds like hitting and placing blocks. How can I monitor packets and how can I trigger the thunder naturally ?
i found thing in pocketmine that no one know but the pmmp dev, Code: use pocketmine\network\mcpe\protocol\PlaySoundPacket; $sound = new PlaySoundPacket(); $sound->x = $player->getX(); $sound->y = $player->getY(); $sound->z = $player->getZ(); $sound->volume = 3; $sound->pitch = 2; $sound->soundName = "AMBIENT.WEATHER.LIGHTNING.IMPACT"; $this->getServer()->broadcastPacket($player->getLevel()->getPlayers(), $sound); and i found a list of name here https://github.com/ClearSkyTeam/ClearSky/blob/master/src/pocketmine/resources/clientsounds.json