Description
Since Breath of the Nautilus was added in 1.21.130, applying it to a player with the /effect command or with the Script API (player.addEffect) has never worked(apply successfully but it doesn’t work): the effect does not stop the player's oxygen from being consumed.
However, the same effect obtained by taming a nautilus and riding it does work.
Reproduction steps
1. Create a world with cheats enabled and apply the attached add-on.
2. Enter the world. Notice that the Breath of the Nautilus icon appears in the HUD effect list with a duration of 10 minutes.
3. In Survival mode, jump into water. Notice that while Breath of the Nautilus is active, the oxygen bar is still consumed and the player can eventually drown.
4. Switch to Creative mode.
5. Run: /effect @p clear
6. Run: /effect @p breath_of_the_nautilus 600 0
7. Switch back to Survival mode, stay submerged, and notice that oxygen is still consumed, with the effect icon still shown in the HUD effect list.
Expected result
With Breath of the Nautilus active, the oxygen bar should not deplete underwater and the player should not drown.
Actual result
Players still lose oxygen when Breath of the Nautilus is applied via /effect or the Script API
Thank you for helping us improve Minecraft! We saved your files: