Minecraft Wiki
Advertisement
Archives

How is the sun-set and sun-rise times/light-levels measured?[]

I ran a test in Minecraft 1.15.1 using the following commands to measure time and light level:

  • execute as @p at @s run execute store result score $LIGHT light run loot spawn ~ -1 ~ loot swamp:light_level
  • execute store result score $GLOBAL time run time query daytime
  • execute if score $GLOBAL light < $LIGHT light run tellraw @a [{"text":"Light change detected from "},{"score":{"name":"$GLOBAL","objective":"light"}},{"text":" to "},{"score":{"name":"$LIGHT","objective":"light"}},{"text":" @ "},{"score":{"name":"$GLOBAL","objective":"time"}}]
  • execute if score $GLOBAL light > $LIGHT light run tellraw @a [{"text":"Light change detected from "},{"score":{"name":"$GLOBAL","objective":"light"}},{"text":" to "},{"score":{"name":"$LIGHT","objective":"light"}},{"text":" @ "},{"score":{"name":"$GLOBAL","objective":"time"}}]
  • scoreboard players operation $GLOBAL light = $LIGHT light

Basically reading the light value using a loot_table with a predicate testing each light level. It would read the current light level at my position and store it in the $LIGHT light score. Then it is tested against $GLOBAL light score, if it has changed, indicate the change using a tellraw command. Then set the $GLOBAL light score to that of $LIGHT.

This all runs in a single tick, so the daytime that is queried, should be the exact tick that the light level changed. Also, the loot table light level is LIGHT = max(sky-darkening, block). This means it takes the sky-light level and subtracts the darkening of the sky (sunset), if there is no blocklight nearby, this would accurately measure light level changes.

However my results as shown below, differ from those on the wiki page, this lead me to believe those measurements might be calculated, based on game code or otherwise, however my measurements are from experiments in the latest version. Another reason why the wiki has different results might be biome or version related? They did a light engine rewrite so that could be it.

My question, are my results accurate and should I update the wiki. Or is my measurement method not correct?

My Results:

Sky Light Level Day Time
15 to 14 12042
14 to 13 12211
13 to 12 12378
12 to 11 12543
11 to 10 12706
10 to 9 12868
9 to 8 13028
8 to 7 13189
7 to 6 13349
6 to 5 13510
5 to 4 13671
4 to 5 22332
5 to 6 22493
6 to 7 22654
7 to 8 22814
8 to 9 22975
9 to 10 23136
10 to 11 23298
11 to 12 23461
12 to 13 23625
13 to 14 23792
14 to 15 23962


--AgentM –Preceding unsigned comment was added by 85.148.222.43 (talk) at 19:44, 9 January 2020 (UTC). Please sign your posts with ~~~~

The sun gets larger during sunset?[]

This is said on the Sunset page. After some experimenting in Java, the Sun during both sunset and noon is the same exact size. In Bedrock Edition, the Sun gets larger when you look at it, but when looking away it again happens to be the same size. Am I missing something here? Mushroom378 (talk) 20:07, 2 March 2020 (UTC)


If I'll be honest, it's probably something about you.
Maybe skybox?
But think about it-- It probably doesn't do that, 'cuz let's face it:
Who would take the time to code this?
Nonetheless, the community might be missing something. But maybe they aren't. Pacomatic (talk) 14:24, 29 April 2021 (UTC)

Source for solar zenith angle[]

Where is the source for the solar zenith angle? The timetable reads that ticks 12786 and 23216 are the ticks that return an angle of 0. Please cite/verify the source for this. Delvin4519 (talk) 19:00, 20 January 2023 (UTC)

What is the reason for introducing the "Minecraft" seconds, minutes, and weeks?[]

The article subdivides Minecraft hours into "Minecraft" minutes (1/60 of a Minecraft hour) and seconds (1/60 of a "Minecraft" minute) and unites Minecraft days into "Minecraft" weeks (7 Minecraft days). However, I see no reason for these values for them. They are not whole numbers of ticks, and the "Minecraft" time values given in the table are a mess unless they're a whole number of Minecraft hours. I think it would make more sense to have 10 Minecraft minutes in a Minecraft hour. Why are the "Minecraft" time units the way they are? Orisphera (talk) 18:38, 31 January 2023 (UTC)

Advertisement