Talk:Daylight cycle

From Minecraft Wiki
Jump to: navigation, search
Archives
  1. 2010 – 2019
  2. Current

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

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?[edit]

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)