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

looking_at subpredicate doesn't respect special blocks hitboxes

XMLWordPrintable

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

      The player's subpredicate "look_at" partially respects the hitboxes of special blocks.
      For example :

      • Trying to raycast from the full opaque half part of the stairs in the attached image will stop the ray, however, the opaque part above the hole doesn't.
      • Looking from the top of a lectern won't prevent the ray to reach the entity behind.

      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:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: