How to detect if the player is looking at the sky

Started by CaiGuyCrafter on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to detect if the player is looking at the sky

So for a long time, I've been trying to figure out how to do a procedure that detects if the player is looking at a full moon. I think I figured out how to detect if there is a full moon out, by doing "get moon phase factor = 0", but I'm not sure how to detect if the player is looking straight up. There's like things for detecting the pitch of the player's head, but idk what angles to use, or even if it would actually work. If someone could help that would be great ๐Ÿ˜ƒ๐Ÿ‘๐Ÿผ

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm not sure but u can justโ€ฆ
Mon, 10/31/2022 - 02:20

I'm not sure but u can just use nbt blocks and if camera pitch equal or bigger than like 180ยฐ do smth

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh, I actually found blocksโ€ฆ
Mon, 10/31/2022 - 02:25

oh, I actually found blocks for that without doing anything with nbt blocks

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, I already saw that oneโ€ฆ
Fri, 11/11/2022 - 21:06

Yes, I already saw that one. I was wondering what in degrees it should equal, but you already answered that. So I'll try 180 degrees. Thanks!