36: Check players direction [Minecraft Map Making]
Ep36: Check which way the player is facing.
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: https://www.youtube.com/c/CoppitJ
Join the server I play on and the Discord where I hang out.
Server IP: 51.81.246.145:25588
Discord: https://discord.gg/KNSmPWdnfG
Udemy notes. YouTube formatting may make some of these wrong. :)
Commands used:
Remove HoldingCompass tag:
tag @p remove HoldingCompass
If player is holding a compass then give tag:
tag @p[nbt={SelectedItem:{id:"minecraft:compass",Count:1b}}] add HoldingCompass
Check if facing North:
execute as @p[tag=HoldingCompass,y_rotation=135..180] run say North
execute as @p[tag=HoldingCompass,y_rotation=-180..-135] run say North
Check if facing East:
execute as @p[tag=HoldingCompass,y_rotation=-135..-45] run say East
Check if facing South:
execute as @p[tag=HoldingCompass,y_rotation=-45..0] run say South
execute as @p[tag=HoldingCompass,y_rotation=0..45] run say South
Check if facing West:
execute as @p[tag=HoldingCompass,y_rotation=45..135] run say West
Other Videos By Infernal Device
Other Statistics
Minecraft Statistics For Infernal Device
At present, Infernal Device has 184,447 views spread across 877 videos for Minecraft, accounting for over 10 days of watchable video on his channel. This is 94.82% of the total watchable video for Minecraft on Infernal Device's YouTube channel.