Compasses in item frames on the underside of a block point in the wrong direction along the X axis. The east/west component of the needle is mirrored, while north/south is correct. Frames on top of blocks and on walls are unaffected.
Why it happens:
The needle rotation is computed in CompassAngleState.getRotationTowardsCompassTarget:
targetRotation = 0.5F - (ownerYRotation - 0.25F - angleToTarget);angleToTarget is always added with a fixed sign, which assumes the compass face is viewed from above. The only orientation input is ownerYRotation, a single yaw value from ItemFrame.getVisualRotationYInDegrees(), whose rotationCorrection of 90 * step for vertical frames is a pure yaw offset.
However, ItemFrameRenderer transforms a DOWN frame with Rx(+90) versus Rx(-90) for an UP frame. Viewed from below, the item plane is mirrored: local X maps to world -X in both cases, but local Y maps to world -Z for UP and world +Z for DOWN, so the DOWN transform reflects the needle plane instead of just rotating it. Working through the transforms, an UP frame renders the needle at world direction (cos α, 0, sin α) where α = atan2(dz, dx), which is correct, while a DOWN frame renders (-cos α, 0, sin α).
Thank you for helping us improve Minecraft! We saved your files: