When passive mobs take sonic boom damage they won't flee in panic.
Steps to reproduce:
Summon the pig.
Use the following command:
/effect give @e[type=minecraft:pig,distance=..3] minecraft:resistance 999999 255Wait for the pig to be damaged by the sonic boom.
The pig were found to behave as if they were completely unharmed.
Affected mobs:
Chicken
Cow
Donkey
Horse
Llama
Mooshroom
Mule
Pig
Polar bear baby
Rabbit
Skeleton horse
Zombie horse
Sheep
Parrot
Turtle
Wandering trader
Fox
Villager
Wandering trader
Allay
Axolotl
Cat
Squid
Glow squid
Frog
Goat
Strider
Ocelot
Cod
Salmon
Tropical
Pufferfish
Tadpole
I can confirm this behavior. By the way, I think the command within the description should give resistance to the pig and not the warden. The correct command can be found below. 😃