-
Bug
-
Resolution: Unresolved
-
None
-
1.18.2, 1.19, 1.19.1 Pre-release 1
-
None
-
Plausible
-
Player
-
Normal
-
Platform
I had always been wondering why taking fall damage on servers causes your movement to stall in midair, so I did some investigating, as it turns out, when the server is managing the player's movement, there would be a difference in behavior between local server and remote servers.
Facts
1. Player receives knockback from server via `ClientboundSetEntityMotionPacket`
2. When the client receives the packet for the local player, it sets the player's motion/delta movement to the Vec3 in the packet
3. The Vec3 in the packet is determined by the motion/delta movement the server has of that player.
Issue:
The server code crossed sides to access the LocalPlayer's motion on singleplayer, while it can't on multiplayer.
Ramification:
On single player, any knockback is added to the player's original motion(Only the host if it's opened to LAN), but on multiplayer, the knockback replaces the player's original motion.
Proposed solution:
- Add a different packet for player knockbacks
Not recommended solutions:
- Make the client report motion data to server (But it could open up new a creative uses)
- Change how ClientboundSetEntityMotionPacket is handled and add the motion instead of setting.
also you should fix the side crossing
- relates to
-
MC-252141 Small downwards motion applied to player when receiving knockback
- Open