The bug / Steps to reproduce
Place down a command block with a pressure plate on top that sets players who stand on it to spectator mode. Get a bow and arrow, draw back the bow but do not release. Step on the plate to enter spectator mode then release the bow to fire the arrow.
This bug allows you shoot arrows in a situation where a map maker most likely doesn't want it. In and of itself it's quite a cool concept but doesn't seem to work as it should!
Demonstration video: https://youtu.be/myDDq4Ks27A?t=1m35s
The same bug occurs with tridents in 1.13 and later.
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by 8
relates to 2
testing discovered 1
Attachments
Comments 32
Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w42a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.
I can confirm this behavior in 1.19.2. Following on from my code analysis, I've double-checked my proposed fix and I can confidently confirm that it's fully functioning and works as expected, so I've attached two screenshots to this report, one of which shows the current code and the other that shows the fixed code. I feel this information may be quite insightful hence my reasoning for providing it. 🙂
[media][media]I can't reproduce shooting arrows from a bow in spectator mode (although the FOV effect persists). Tridents can still be thrown after changing to spectator mode.
Confirmed. Interestingly, it only works when switching from creative if you had an arrow in your inventory.