mojira.dev
MC-81773

Bows, crossbows, and tridents drawn in survival/creative/adventure mode can be released in spectator mode

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

MC-206705 Spyglasses stay in use in spectator mode Resolved MC-129909 Players in spectator mode continue to consume foods and liquids shortly after switching game modes Resolved MC-69216 Switching to spectator mode while fishing keeps rod cast Resolved MC-98322 Flying after shifting between Creative/Spectator Resolved MC-119417 A spectator can occupy a bed if they enter it and then are switched to spectator mode Resolved

Attachments

Comments 33

Confirmed. Interestingly, it only works when switching from creative if you had an arrow in your inventory.

Confirmed in 16w07b.

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.

Confirmed in 1.11.1

Confirmed in 1.11.2

23 more comments

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]

Can confirm in 1.19.3.

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.

Can confirm in 1.21.5

This issue was fixed in 25w46a.

migrated

(Unassigned)

Confirmed

Platform

Normal

Player

arrow, bow, game-mode-switch, gamemode, shoot, spectator, trident

Minecraft 1.8.7, Minecraft 16w07b, Minecraft 1.10.2, Minecraft 16w42a, Minecraft 16w43a, , 1.19.3, 1.20.1, 1.20.6, 1.21, 24w44a

25w46a

Retrieved