92: Detect player looking at entity [Minecraft Map Making]

Опубликовано: 28 Июнь 2026
на канале: Infernal Device
9,700
269

Ep92: Detect when the player is looking near a specific entity.

Originally for Udemy, but uploaded here.
Commands, builds and ideas for people making their own Minecraft maps.

Check out my collabs on Coppit's channel:    / coppitj  

Join the server I play on and the Discord where I hang out.
Server IP: 51.81.246.145:25588
Discord:   / discord  

Udemy notes. YouTube formatting may make some of these wrong. :)

Commands used:
Detect when looking at a sheep:
execute as @p at @s anchored eyes facing entity @e[type=sheep,nbt={Color:7b}] eyes anchored feet positioned ^ ^ ^1 rotated as @s positioned ^ ^ ^-1 if entity @s[distance=..0.1]

NBT Colour Values:

0: White
1: Orange
2: Magenta
3: Light Blue
4: Yellow
5: Lime
6: Pink
7: Gray
8: Light Gray
9: Cyan
10: Purple
11: Blue
12: Brown
13: Green
14: Red
15: Black