When standing inside the hitbox of an interaction while looking at a different interaction outside of the hitbox and either interacting or attacking you will hit the other interaction, not the one you are in. Interacting through the interaction while outside it does not produce this issue, your camera has to be inside the hitbox.
Linked issues
is duplicated by 4
relates to 1
Attachments
Comments 9
The only commands needed are 2 summon commands to spawn the entities in; one at ~ ~1 ~2 and one at ~ ~1 ~; try interacting with the first summoned one, while your head is in the second one. Then just check the data of both with /data get
Can confirm. This affects all entities including mobs. And this is affected by the order of entity creating. Summon two entities and if your head is in the second one, you cannot interact with the first summoned one. If your head is in the first one, you can interact with the second summoned one. The expected behavior is the entity that your head is in should always be hit, and it should not affected by the entity summoning order.
Can confirm in 1.19.4-pre1.
Detail steps to reproduce:
Summon an entity:
/summon minecraft:interaction ~ ~ ~
Summon another entity some blocks away:
/summon minecraft:interaction ~ ~ ~2
Put your head in the first summoned one, face the second one and hit.
Check if the first one is hit:
/data get entity @e[type=minecraft:interaction,limit=1,sort=nearest]
I've encountered the same Bug while working on a project with a friend in 1.20.2 and have also noticed it occuring in 23w43b.
Edit: I have also had the Bug behave differently from world to world... In one world, it only happened while facing east, in another (the one from my screenshot), it only happened while facing north...
I did a bit of experimenting and this seems to only happen with entities outside of your current chunk
[media]
What command(s) do you use?