mojira.dev
MC-300825

Entities with NaN motion cause clients to be kicked and softlocked

The new net.minecraft.network.LpVec3 class fails to properly communicate Vec3 values when one of the vector’s axes is NaN. This can happen without external editing with minecarts, as seen in this video. When at least one axis is NaN, a 0 will be written for the first byte. This will cause the client to only read a single byte and return Vec3.ZERO. When this occurs, the extra bytes that were written from the server will not be read by the client and this will throw an exception. Attached is one such log from when this occurred and a world that contains a minecart with NaN motion. Attempting to join the world will kick the player.

My recommendation is to just write a double for each axis and not bother with this rather pointless network optimization.

Linked issues

Attachments

Comments 2

can replicate 25w32a

Captain_S0L0

Filip Randenbäck

Confirmed

Platform

Very Important

Entities, Minecart

25w32a, 25w33a

Future Update

Retrieved