I would like to start by first noting that this doesn’t affect Vanilla gameplay directly, as the getX, getY and getZ methods aren’t used by the game, but does cause issues with mod development, as one may use the methods (eg. sodium uses it), expecting the same behavior as using get. This is a technical bug within the codebase.
The class CompactVectorArray stores it’s data on the 1d array with the content indexes being 3 * index + offset, where index is the index for the vector, and the offset being 0 for x, 1 for y, and 2 for z. The used method, get correctly gets the values from the right indexes, but the individual method getZ, gets using the index 3 * index + 1 instead of 3 * index + 2
Comments 0
No comments.