The bug
The player can interact with entities and tile entities while inside of an entities hitbox under some circumstances.
How to Reproduce:
Load the following datapack into your world:
Press the button in their respective marked orders on the signs
Stand inside the 1st armor stand's hitbox (The oldest entity)
Look straight forward to the second armor stand
Right click the chest
→ ❌ You are only able to open the chestStand inside the second armor stand (The second oldest entity)
Look straight forward to the first armor stand
Right click the chest
→ ✔ You cannot open the chestAim your cursor where the slime's hitbox and chest meet
[media]
Right click
→ ❌ You can open the chest
Screenshots/Videos:
[media]
Notes:
This issue also applies to things such as the attack indicator. When following the same steps listed above, instead of trying to right click a chest, if you hold a tool or weapon instead the observed results will be an inconsistent and unreliable display of the attack indicator.
Turning on entity hitboxes helps reproducing this issue. (F3 + B)
Code Analysis:
(From @unknown)
Based on 1.11.2 decompiled using MCP 9.37
The method net.minecraft.client.renderer.EntityRenderer.getMouseOver(float)
does not consistently define which entity should preferred. Expected would be probably:
Closest entity intersecting with player's eye level
If no entity intersecting with player's eye level exists closest entity in ray from player's eyes
Linked issues
Attachments
Comments 6
@Marcono1234 I was meaning to get around to responding to this way sooner, but yeah I'm fine with the edit, haha. Changed "a little" is an understatement though XD That said, I like your edit much better, it's a lot more concise (I tend to have a bad habit of writing more than is probably necessary sometimes).
Just made a few edits myself on the things that were bugging me a little, as well as updated the versions to include the latest 1.13 snapshot (17w50a).
Can confirm. I'd like to request ownership of this issue to update the description with a structure file for ease of reproducing the issue, and to maintain it going forward.
This describes MC-260305; while this is older, that one got priority assigned and is easier to find.
@@unknown I changed the report a little bit to make it hopefully easier and faster to read. I hope you are fine with that. Feel free to improve it as well if you want.
You cannot select older versions because they are archived. This is probably the case to prevent people from reporting bugs for older versions.