Sun

The sun is a celestial body that provides light for the Overworld.
==Daytime==
The sun and moon rise in the east and set in the west.
When the player creates a new world, the time is set to dawn and the sun starts on the horizon. As time passes, it slowly moves across the sky. As the sun sets, the moon rises. Overall, daytime lasts 10 minutes (in real-time).
==Sunlight==
Sunlight refers to the light, particularly sky light, which illuminates all blocks directly below the sky, and which do not have a shadow cast over them by an opaque block or by inclement weather. Clouds themselves do not cast shadows; however, during inclement weather (rain and snow), the sky darkens and reduces the amount of sunlight in the world. During these storms, the ambient light value during the day is reduced to 12 from the usual 15, and in thunderstorms the light level is reduced to 10 although treated as 5, allowing hostile mobs to spawn.
When the sun rises and sets, blocks exposed to sunlight change their light level depending on the angle of the sun, giving the effect of gradually getting lighter at dawn and gradually getting darker at dusk. However, shadows of blocks are not affected by the position of the sun in the sky, making sundials impossible.
Illumination decreases with depth underground until ultimately there is no illumination all. A gap or a vertical shaft in the ceiling of a cavern allows sunlight to filter in.
Sunlight can be used to turn dirt blocks into grass blocks, as long as there is an illuminated grass block adjacent to the dirt. Grass blocks spread quickest when exposed to sunlight at the high-point of the day (time 6000).
=== Effects on mobs ===
Sunlight affects how certain mobs spawn.
Except for bats, which require light level 4 or lower to spawn, passive mobs require a minimum light level of 9 () or 12 (mooshrooms, polar bears, and rabbits ) or 7 (all other land animals ) to spawn; therefore, they do not spawn at night.
Hostile mobs, in contrast, do not spawn in sky light level 8 or above (See: Spawn#Spawn_cycle). Skeletons, zombies, zombie villagers, strays, drowned and phantoms are set on fire for 160 ticks upon entering an area fully illuminated by sunlight, and they try to avoid such areas. They do not burn while in water, in the rain, wearing a helmet, or in the shade. Spiders become neutral while in direct sunlight, until attacked by the player. Endermen teleport away from players in sunlight. All other hostile mobs, such as creepers, slimes, and silverfish, are completely unaffected by sunlight.
Boss mobs do not take damage from sunlight; they spawn regardless of the light level.
==History==
==Issues==
==Trivia==
*The sun is visibly larger during sunrise and sunset.
*If the player is underwater or underground and looks at the sun, it appears the same as the sun at sunset. This is due to the way the sun is rendered when exposed to the sky.
*Standing or flying at a height above the terrain of approximately 1.4× the render distance, the sun appears opposite to the moon in the sky, making it seem almost as if the player is in space.
==Gallery==
Sunset In Jungle.png|Example sunset seen from the top of a jungle tree.
Sun in space.png|The sun viewed from high up, making it seem like the player is in space.
Mcpelookingsun.png|, when looking toward the sun. The sky gets slightly darker and the sun slightly larger. (You may need to click the image to see it better.)
Mcpelookingsunafter.png|The sun would look like this, if the player looks away or if the world is heading into the night.
MCPE Sunlight 1.jpg|Sunlight influences shadows on entities in Bedrock Edition.
MCPE Sunlight 2.jpg|The previous screenshot from the opposite angle.
Sun (texture).png|The texture of the sun from the default resource pack.
Sunsetriver.png|River running between Forest and Windswept Hills biome with sunset in the background.
SunsetOverMountain.png|The sun sets over a rising Windswept Hills in the background.
Desertsunset.png|Sunset over a desert and forest. Also village can be seen on a hill on the left side.
Sunset over Minecraft.png|Savanna and desert biomes in suset.
Desertsunsetvillage.png|Sunset over a desert with village.
Sunrise over a jungle.png|Sunrise over a jungle.
Sun visible at the bottom of the sea.png|Looking down (in this case from Y:203) at night time, it's possible to see the sun under the sea, because the sun and the moon are on opposite sides of eachother and due to the distance, the bottom of the sea despawns, leaving a gap where it can be seen.
==References==
cs:Slunce
de:Sonne
es:Sol
fr:Soleil
hu:Nap
ja:太陽
ko:태양
nl:Zon
pl:Słońce
pt:Sol
ru:Солнце
th:ดวงอาทิตย์
uk:Сонце
zh:太阳