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

Attachments

Comments 32

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

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.

22 more comments

Can confirm in 1.18.2 and 22w18a.

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.

Can confirm in 1.21.5

Sparks

(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

Retrieved