From 383dc2a2b9ca3a87f330391cfb998651cb06b5b5 Mon Sep 17 00:00:00 2001 From: Alexey <45711510+Gaprix@users.noreply.github.com> Date: Wed, 28 Sep 2022 20:18:53 +0300 Subject: [PATCH] Fix the copper block scrape sound (#5147) Co-authored-by: Dylan T --- src/block/utils/CopperTrait.php | 4 ++-- src/world/sound/ScrapeSound.php | 34 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 src/world/sound/ScrapeSound.php diff --git a/src/block/utils/CopperTrait.php b/src/block/utils/CopperTrait.php index 51d269b42..6bbb4fa37 100644 --- a/src/block/utils/CopperTrait.php +++ b/src/block/utils/CopperTrait.php @@ -34,7 +34,7 @@ use pocketmine\math\Vector3; use pocketmine\player\Player; use pocketmine\world\sound\CopperWaxApplySound; use pocketmine\world\sound\CopperWaxRemoveSound; -use pocketmine\world\sound\ItemUseOnBlockSound; +use pocketmine\world\sound\ScrapeSound; trait CopperTrait{ private CopperOxidation $oxidation; @@ -93,7 +93,7 @@ trait CopperTrait{ $this->oxidation = $previousOxidation; $this->position->getWorld()->setBlock($this->position, $this); //TODO: turquoise particles are supposed to appear when removing oxidation - $this->position->getWorld()->addSound($this->position, new ItemUseOnBlockSound($this)); + $this->position->getWorld()->addSound($this->position, new ScrapeSound()); $item->applyDamage(1); return true; } diff --git a/src/world/sound/ScrapeSound.php b/src/world/sound/ScrapeSound.php new file mode 100644 index 000000000..39f35adab --- /dev/null +++ b/src/world/sound/ScrapeSound.php @@ -0,0 +1,34 @@ +