mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Play burp sound when consuming a FoodSource (#5158)
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user