mojira.dev
MC-276079

Swing packet sent to client sends one back to the server

When sending an arm swing/animation packet to the java client, it will send an arm swing packet back to the server even though the player didn't manually swing by clicking. This results in "fake" arm swing packets being sent to the server, causing inconsistencies whenever playing on servers with higher ping.

Steps to reproduce (Check on a Paper jar server using a packet listener plugin to send and listen to packets):
1. While on a server, send to the player a clientbound "Entity Animation" packet, with the entity ID as the player and the "Swing Main Hand" animation ID.

2. If done properly, the player's client should show them swinging their arm, which will also send a "Swing Arm" serverbound packet to to the server as if the player client swung their hands by left clicking. You can check this using some sort of packet listener/checker on the server to see which packets are being received.

Expected Behavior:

When the clientbound animation packet is sent to the player, it should not send back a serverbound packet to the server, as those packets are usually handled as if the player trigger those themselves.

Observed Behavior:

It's observed that when sending the clientbound animation packet to the player, it sends back a serverbound swing arm packet to the server. This can cause issues when listening to this packet whenever you want to have the player do a fake swing that isn't a real input on their end.

Comments 5

Can you please provide more information? You can do so by attaching a screenshot/video showcasing the bug, providing the How to Reproduce steps and the Observation and Expectations.

We do not have enough information to reproduce this issue.

Please include the following information to help us understand your problem:

Steps to Reproduce:
1. (Explain what needs to be done for the issue to happen)
2.
3.

Observed Results:
(Briefly describe what happens)

Expected Results:
(Briefly describe what should happen)

Please also attach any needed commands, add-ons/behavior packs, data packs, resource packs, screenshots, videos, or worlds needed to help reproduce this issue.

Refer to the Bug Tracker Guidelines for more information about how to write helpful bug reports. Bug reports with insufficient information may be closed as Incomplete.

This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Updated the description.

Is this able to be replicated in a vanilla environment?

This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

It's not, as this a clientside/serverside bug that vanilla environments don't have access to reproducing. However, I'm very confident does exist even in vanilla environments.

Novalescent

(Unassigned)

Plausible

Platform

Normal

Networking

1.21.1

Retrieved