Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-262964

Standing inside interaction prioritizes hurting/interacting with entities outside of it

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.20 Pre-release 6
    • None
    • Unconfirmed
    • (Unassigned)

      Expected behavior:
      When standing inside a normal hitbox in the game, Attacking or interacting always hurts/ interacts with the entity you're standing inside.

      Actual behavior:
      When standing inside an interaction and another entity is within range and you are facing it, left clicking (attacking) will hurt the outside entity. if no other entity is in range, the left click will attack the interaction.

      Demonstration:

      Steps to reproduce:

      simply:
      1. summon an interaction, stand inside it, notice attack.timestamp increments normally, but doesn't when facing an entity EG a villager.
      2. summon a floating zombie/slime with no AI, step inside and see there is no difference between facing the villager and not facing it when attacking.
      (full steps to reproduce + commands i used)
      1. for hitboxes to put the player head into (slime for comparison):

      /summon minecraft:interaction ~ ~1 ~
      /summon minecraft:slime ~ ~1 ~1 {NoAI:1,Size:1b}
       /summon villager ~1 ~ ~ {NoAI:1}
      

      2. for seeing the timestamp increment only when not facing the villager/armor stand:

      /scoreboard objectives add interaction dummy
      repeat:
      /execute store result score @p interaction run data get entity @e[type=minecraft:interaction,sort=nearest,limit=1] attack.timestamp 1 

       

            Unassigned Unassigned
            pauloalbert paulo khayat
            Votes:
            3 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: