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

looking_at subpredicate doesn't detect entities through transparent blocks

XMLWordPrintable

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

      Many transparent blocks such as flowers, tall grass, ferns, saplings let the ray pass through them. It is the same case for every fluids block (air, lava, water...).
      However, full glass blocks and glass panes seem to totally stop it.

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

              Created:
              Updated:
              Resolved:
              CHK: