If a player is eating food and mid-meal is placed into spectator mode, they will continue eating the food. Any effects of food will apply to the spectator once the food has been eaten. Most prominently, spectators will teleport due to chorus fruit or gain or lose status effects.
This behavior is undesirable as one would expect spectators to not carry over actions into spectator mode that cannot be started into spectator mode. For example, a player turning into spectator mode would expect to stay at the same position and not succeed in teleporting.
Steps to reproduce
1. Set a command block to run a full repeater delay after activating on a pressure plate
2. Set the command block to run /gamemode spectator @p[distance=..5]
3. Start eating chorus fruit and immediately step onto the pressure plate
4. Observe that the player continues eating the chorus fruit and teleports to another position within spectator mode
Thank you for your report!
We're tracking this issue in MC-129909, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.