mojira.dev
MC-302165

Bows/tridents/crossbows are able to be charged earlier than should be possible on a singleplayer world

The Bug


Occasionally, based upon debugging, on an integrated server, the server will have an offset tick time when calling the releaseUsing method to the client, due to an unknown cause. If the timing is off such that more ticks have passed on the server by the time that releaseUsing is called, it is occasionally possible for time-based events, such as Tridents and Crossbows being able to throw or arrows becoming critical, to happen earlier than is intended.

For the attached videos, I have made sure to use a vanilla client, with keyboard inputs timed perfectly using a python script.

Steps to reproduce


Note: From code analysis, a Crossbow should be able to fire after 25 ticks (though it would take much longer to test, so not recommended, using Quick Charge III, which I was able to confirm this happens on, it should be able to fire after 10 ticks), the Bow should be critical after 20 ticks (one second), and the Trident should be able to fire after 10 ticks (half of a single second).

Step 1: Charge the weapon for a time at least 1-2 ticks before it should be possible to fire.

Step 2: Release, if it does crit/fire, repeat again for the same amount of time.

Expected result


For a Trident or Crossbow, it should not be able to fire when attempting repeatedly to throw before it is done charging.

For the Bow, it should not be possible to trigger a crit before 20 ticks.

Actual result


It is possible, seemingly at random, for a Trident/Crossbow to be fired early, and for a bow to be able to crit earlier than intended, despite ping not being a factor on an integrated server.

Environment

Any environment would suffice, though on a dedicated server it would be much easier due to ping.

Attachments

Comments 5

For some reason, I can’t attach the videos.

Rachel Arevalo

(Unassigned)

Community Consensus

Platform

Low

Networking

1.21.8, 1.21.9 Pre-Release 1

Retrieved