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

looking_at subpredicate doesn't always detect visible entities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 1.17 Pre-release 1
    • None
    • Confirmed
    • Advancements

      The player's subpredicate seems to have an offset, or rely on another check. The ray doesn't seem to directly track for the entity from the client cursor.

      See attached image.

      How to reproduce :

      Set up a datapack using :

      • A predicate file using the player subpredicate "looking_at"
      • A tick function that triggers a specific event (like a playsound) when the player look at the desired entity.
      • Place the needed blocks, summon an entity like in the image, and look at it.

      Or

      • Download the datapack that is attached and install it in a world.
      • Place the needed blocks, summon a husk like in the image, and look at it.
      summon husk ~ ~ ~ {NoAI:1b}
      

            Unassigned Unassigned
            PauseKawa KawaMood
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: