mojira.dev
MC-226490

looking_at subpredicate doesn't respect special blocks hitboxes

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}

Attachments

Comments 0

No comments.

KawaMood

(Unassigned)

Confirmed

Advancements

1.17 Pre-release 1

Retrieved