The bug
Dolphins, after a while of engaging in their natural AI behaviors, will simply allow themselves to run out of air and drown rather than replenishing air, even when air is readily accessible.
They do it in both open and constrained environments. When playing with items, they drown themselves very frequently.
How to reproduce
Download and open the attached world. It contains 100 dolphins in a large, open-air tank, and 100 dolphins in individual water cells. All are persistent and are free to engage in their natural behaviors. The scoreboard sidebar shows the count of dolphins in each section.
Run
/tick sprint 10dand watch the dolphins.After a while, they will begin dying. All dolphins have ample access to air, and so they should be replenishing it regularly.
Dolphins in the open tank die much quicker, because they play with each others' item drops, and seem to prioritize playing over breathing.
Expected results
Dolphins should keep themselves alive indefinitely.
Observed results
A dolphin left to its own devices will drown itself in under 5 in-game days with astonishing regularity.
Notes
It’s a common rumor that captive dolphins drown when far from the player because their air ticks down while their AI is frozen. This is false. Air does not tick down when dolphins are loaded but unsimulated. They drown while fully active, right next to the player.