diff --git a/src/entity/Living.php b/src/entity/Living.php index 1d597715c..58b7c1791 100644 --- a/src/entity/Living.php +++ b/src/entity/Living.php @@ -56,6 +56,7 @@ use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties; use pocketmine\player\Player; use pocketmine\timings\Timings; use pocketmine\utils\Binary; +use pocketmine\world\sound\BurpSound; use pocketmine\world\sound\EntityLandSound; use pocketmine\world\sound\EntityLongFallSound; use pocketmine\world\sound\EntityShortFallSound; @@ -320,6 +321,9 @@ abstract class Living extends Entity{ foreach($consumable->getAdditionalEffects() as $effect){ $this->effectManager->add($effect); } + if($consumable instanceof FoodSource){ + $this->broadcastSound(new BurpSound()); + } $consumable->onConsume($this); } diff --git a/src/world/sound/BurpSound.php b/src/world/sound/BurpSound.php new file mode 100644 index 000000000..a4467f71d --- /dev/null +++ b/src/world/sound/BurpSound.php @@ -0,0 +1,35 @@ +