There is inconsistent behavior when the player’s head is within an interaction entity and the player is looking at a different, interactable entity within the interaction range. The expectation is that there is consistent behavior during this scenario. However, sometimes right clicking is intercepted by the interaction entity surrounding the player’s head. Other times, right clicking passes through the interaction entity. This is most easily replicated using an entity with a CustomName because the custom name plate visibility happens to correlate with the ability to interact with the entity here, but this issue also affects unnamed entities the same way.
Reproduce
Use F3+B to show hitboxes.
On flat ground, build a small fence circle leaving one free space in the middle, and while standing in that free space, summon a villager with a CustomName.
/summon minecraft:villager ~ ~ ~ {CustomName:A}
Then, standing about 2.5 blocks away from the villager, look at the villager’s eyes. This reveals the custom name, and right clicking interacts with the villager. While continuing to look at the villager, summon an interaction display entity a little below the the player’s head level to encase the player’s head when standing inside.
/execute anchored eyes positioned ^ ^ ^ positioned ~ ~-.5 ~ run summon minecraft:interaction
Notice that this makes the custom name disappear, and right clicking no longer interacts with the villager. Step a little to the side, look at the villager, and summon another interaction entity using the above command. Do this at least 10 times around in a circle surrounding the villager.
Now kill and re-summon the villager while standing in the center of the fence.
/kill @n[type=minecraft:villager]
/summon minecraft:villager ~ ~ ~ {CustomName:A}
Then revisit each interaction display and look at the villager. Some of the interaction entities will still block visibility of the custom name and intercept right clicks, and some of the interaction entities will pass through the visibility of the custom name and allow interacting with the villager. It seems to be somewhat directional in terms of which existing interaction entities change behavior after re-summoning the villager.
For good measure, go to a gap, look at the villager, and summon one more interaction entity, and notice that this new one blocks visibility of the custom name and intercepts right clicks.
Attachments
Comments 0
No comments.