mojira.dev
MCPE-110282

Experience orb rendering is offset

Experience orbs' rendering is offset by +0.25 X compared to their actual position in the world. This is not a new bug; it has probably been in the game since the beginning. I just happened to determine it precisely while testing the new behavior of orbs in 1.16.100.

Steps to reproduce

  1. Load the attached test world. It consists of a 5 x 5 x 5 chamber of barrier blocks with a 1-block empty space in the middle and two glass blocks for visual reference.

  2. Press the button to summon an experience orb in the chamber.

  3. Move side to side along the X and Z axes and observe the rendered position of the experience orb as you move across the coordinates of its chamber

  4. Align your eye level with the floor of the orb chamber, and observer the orb's rendered Y position.

Expected results

The experience orb renders with the same alignment along each direction of each axis.

Actual results

The experience orb renders with the same alignment in the Y and Z directions. But on the X axis it is offset by about .25 block (4 pixels) in the + direction.

Note:

The X offset is more obvious if you set the xp_orb collision box to 0.0 width and 0.0 height. In that case it renders entirely outside its block in the +X direction. However, this is not a vanilla result so I did not include it in the test world.

Related issues

Attachments

Comments

migrated
[media][media][media][media]
GoldenHelmet

The bug here is in the "bones" section of the models\entity\experience_orb.geo.json file. The bugged coding is

"bones": [
        {
          "name": "body",
          "pivot": [ 8.0, 8.0, 0.0 ],
          "cubes": [
            {
              "origin": [ 0.0, 0.0, 0.0 ],
              "size": [ 16.0, 16.0, 0.0 ],
              "uv": {
                "south": { "uv": [ 0, 0 ] }
              }
            }
          ]
        }
      ]

The correct bones would be:

"bones": [
        {
          "name": "body",
          "pivot": [ 0.0, 6.0, 0.0 ],
          "cubes": [
            {
              "origin": [ -8.0, -2.0, 0.0 ],
              "size": [ 16.0, 16.0, 0.0 ],
              "uv": {
                "south": { "uv": [ 0, 0 ] }
              }
            }
          ]
        }
      ]

I have attached a resource pack that fixes the bug: 

[media]
migrated

Affects 1.17.40.20

[Mod] LateLag

The report is not entirely accurate. The Y offset is already correct in the vanilla model. The floating depends entirely on the texture of the orb, not the model.

With the attached fix, larger orbs actually clip into the floor:

[media]

Here's what it would look like with only the X offset changed:

[media]

Note that even in the second screenshot, it's still floating very slightly. That is a general issue with all entities, they're all rendered every so slightly upwards. Probably implemented to prevent issues with entity shadows.

I'll update the report and the fix accordingly.

GoldenHelmet

(Unassigned)

478226

Confirmed

Multiple

1.20.30.21 Preview, 1.17.11 Hotfix, 1.16.200, 1.16.201 Hotfix, 1.16.221 Hotfix, ..., 1.17.40, 1.19.0, 1.20.0, 1.20.12 Hotfix, 1.21.51 Hotfix

Retrieved