added fire extinguishing sound, closes #2777

This commit is contained in:
Dylan K. Taylor
2020-10-31 20:18:06 +00:00
parent f67ab094f2
commit 68f5eada32
2 changed files with 36 additions and 0 deletions

View File

@ -108,6 +108,7 @@ use pocketmine\world\format\Chunk;
use pocketmine\world\Position;
use pocketmine\world\sound\EntityAttackNoDamageSound;
use pocketmine\world\sound\EntityAttackSound;
use pocketmine\world\sound\FireExtinguishSound;
use pocketmine\world\World;
use function abs;
use function assert;
@ -1572,6 +1573,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$block = $target->getSide($face);
if($block->getId() === BlockLegacyIds::FIRE){
$this->getWorld()->setBlock($block->getPos(), VanillaBlocks::AIR());
$this->getWorld()->addSound($block->getPos()->add(0.5, 0.5, 0.5), new FireExtinguishSound());
return true;
}