It would be a command that would test for anything making a certain sound, and would succeed if it detected them, not unlike the testforblock command.
An example would be /testforsound @e[type=zombie,r=10] mob.zombie.hurt, which tests for any zombies that makes the zombie hurt sound in a 10 block radius.
This would make things much simpler, and, in some cases, possible when they previously weren't, especially in the more limited command system of Bedrock Edition.
Uses include testing for death sounds to increase the kill count on a scoreboard and testing for hurt sounds in a player's attack range to give the player an effect when they hit something with a melee weapon.
Please sign in to leave a comment.