P
Pop Storm Daily

Is it possible to get the angle of the Sun to a block in Minecraft?

Author

Sophia Edwards

Published May 26, 2026

Minecraft has shadows in some of the shaders, and the shadows are obviously created via the positon of the sun or by timing. So is there a way to actually get this angle of elevation from the ground of specific coordinates to the sun? Or, is it possible to get the shadow length of a block?

2

1 Answer

If you are talking about shaders as in shadermod/Iris/OptiFine shaders, those talk to the OpenGL graphics library directly and get the angle from their respective mod like this from the Iris mod. There is currently no direct way to fetch the sun's angle with a command in the vanilla game.

1