Dolphins Stop Functioning When Going Into Spectator Mode
When you have a dolphin in a block of water with air above it, when a player nearby is in creative, survival, or adventure mode, the dolphin will grab air every now and then.
However, if everyone in the local area is in spectator mode, it does not go to get air and then it eventually dies.
You can check this by putting a dolphin into the block of water and waiting in creative mode using the "/data get entity @e[type=minecraft:dolphin,sort=nearest,limit=1] Air" command and you will see it replenishes.
Then go into spectator mode and do the same command and you will see it will only go downwards until it dies.
This is a recreation of an issue reported on a modified client, tested, and continues to be a bug on a vanilla client.
Created Issue:
Dolphins Stop Functioning When Going Into Spectator Mode
When you have a dolphin in a block of water with air above it, when a player nearby is in creative, survival, or adventure mode, the dolphin will grab air every now and then.
However, if everyone in the local area is in spectator mode, it does not go to get air and then it eventually dies.
You can check this by putting a dolphin into the block of water and waiting in creative mode using the "/data get entity [Dolphin's uuid] Air" command and you will see it replenishes.
Then go into spectator mode and do the same command and you will see it will only go downwards until it dies.
This is a recreation of an issue reported on a modified client, tested, and continues to be a bug on a vanilla client.
Environment
Windows 10
When you have a dolphin in a block of water with air above it, when a player nearby is in creative, survival, or adventure mode, the dolphin will grab air every now and then.
However, if everyone in the local area is in spectator mode, it does not go to get air and then it eventually dies.
You can check this by putting a dolphin into the block of water and waiting in creative mode using the "/data get entity
[Dolphin's uuid] Air" command and you will see it replenishes.Then go into spectator mode and do the same command and you will see it will only go downwards until it dies.
This is a recreation of an issue reported on a modified client, tested, and continues to be a bug on a vanilla client.
When you have a dolphin in a block of water with air above it, when a player nearby is in creative, survival, or adventure mode, the dolphin will grab air every now and then.
However, if everyone in the local area is in spectator mode, it does not go to get air and then it eventually dies.
You can check this by putting a dolphin into the block of water and waiting in creative mode using the "/data get entity @e[type=minecraft:dolphin,sort=nearest,limit=1] Air" command and you will see it replenishes.
Then go into spectator mode and do the same command and you will see it will only go downwards until it dies.
This is a recreation of an issue reported on a modified client, tested, and continues to be a bug on a vanilla client.
Windows 10
The bug
Most mobs seem to stop walking (do not wander around / pathfind randomly) when there is only a spectator player nearby. The mobs might start moving, but then eventually stop. They still rotate and can bob up and down, but eventually they never actually leave its position.
Though this is likely intended (MC-46843, MC-48868), it leads to potential gameplay issues as described in MC-202512 and MC-212687. It also behaves inconsistently, because if it is intended behavior, it should apply to all mobs (MC-136206).
Steps to reproduce
This can be reproduced by switching the gamemode from creative to spectator, or by simply remaining in spectator mode and summoning the mobs listed below.
Notes
Logging out and relogging seems to (temporarily) fix the issue for some mobs.
When mobs interact with one another (i.e. cats and rabbits, for example) they might actually move around until the interaction is completed (that is, for example, the cat kills the rabbit). Then the mob stops moving again. Other examples include villagers fleeing from illagers and striders moving around when it rains.
Fixing this issue (if it is not intended) improperly might cause severe performance issues.
Affected mobs
This affects the following mobs: blazes, cats, chickens, cows, creepers, dolphins (MC-202512), donkeys, drowned, elder guardians, endermen (only teleport, don't walk), endermites, evokers, fish (cod, salmon, pufferfish, tropical fish), guardians, horses (including skeleton and zombie horses), husks, illusioners, iron golems, llamas and trader llamas, mooshrooms, mules, ocelots, pandas (they only roll, but don't walk), parrots, pigs, pillagers, polar bears, rabbits, ravagers, sheep, silverfish, spiders and cave spiders, skeletons, snow golems, squids and glow squids (MC-212687), strays, striders, vindicators, wandering traders, witches, wither skeletons, wolves, zombie villagers, zombies and zombified piglins.
This does not affect: axolotls, bats, bees, ender dragons, foxes, ghasts, goats, hoglins, magma cubes, phantoms, piglins, piglin brutes, slimes, turtles, vexes, villagers, withers and zoglins. Shulkers and giants are not affected because they already don't move in creative.
Other mobs, if any, were not tested.
Analysis
Analysis by Chumbanotz provided in this comment.


I can reproduce this, but a better command for reproducing might be /data get entity @e[type=minecraft:dolphin,sort=nearest,limit=1] Air as that will work for anyone without them having to find the dolphin's UUID.
Can confirm in 20w48a.
I cannot reproduce this in 1.17.1 Release Candidate 2, the dolphins emerge to get air even if there is only a spectator nearby. This means that I probably did something wrong in testing this in 1.17.1 Release Candidate 1.
Still cannot reproduce in 1.17.1.
Can confirm in 24w14a.