Talk:Thunderstorm

Latest comment: 27 February by ChainSword20000 in topic thunderstorm mob spawning behavior
Jump to navigation Jump to search
Archives

Lightning "see the sky"[edit source]

Though raindrops are stopped by signs and glass, lightning summoned by a trident is not. Though raindrops are not stopped by cobwebs, lightning summoned by a trident is stopped. Water stops both. Anvils do not stop lightning (ie, placed atop a sign). Glowstone stops lightning from a trident.

This page needs some updates - "see the sky" is not a precise description of what lightning needs - both glowstone and glass are listed as transparent, but one works and the other doesn't. Elsewhere "where rain can fall" is described, but rain passes through cobwebs and lightning doesn't. Elsewhere again is the claim that lightning can't pass through glass, but trident lightning does. –Preceding unsigned comment was added by 174.52.215.177 (talk) at 05:56, 30 April 2020 (UTC). Please sign your posts with ~~~~ BA-DA-BOOM!Reply[reply]

What is the possibility of a rainstorm worsening to a thunderstorm?[edit source]

I am a little bit confused about descriptions in the main page:

  • How does the weather transition system work? Is it clear->rain/thunder->clear->rain/thunder, or clear->rain->thunder->rain->clear?
  • What's the transition possibility of these status?

Considering that in Thunderstorm#Lightning mechanics, someone could read 1/100000 from code, can anyone elaborate the mechanics of weather transition? Thank you! Kakagou12341 (talk) 03:55, 18 March 2021 (UTC)Reply[reply]

I play Bedrock, so I have no code to look at but I have never observed a thunderstorm fade into just rain. When it ends, it just ends and the weather clears. So I'd say it's clear → rain (possibly turning into a thunderstorm) → clear.
I'd like to see rain having a higher chance of becoming a thunderstorm with increasing game difficulty. Thunderstorms can leave behind witches (converted from villagers) and skeleton horse traps. Amatulic (talk) 02:51, 23 March 2021 (UTC)Reply[reply]

Thunderstorm appearing-mechanics[edit source]

Because I didn't found anything in the internet for that and also the question was asked multiple times: I looked in the code when thunderstorms occur. As written in net.minecraft.server.level.ServerLevel the method tick, there are 3 counter one for each weather state (clear, rain and thunder). As long as clear is counting down, the other counters will halt. However clear will only be set when typing in the command /weather clear, so in a survival world it will always be zero. Each time the rain counter reaches 0, it will switch rain on / off and set the counter to a new value between 12,000 and 23,999 ticks (that is 0.5 to 1 minecraft day) when raining is turned on and 12,000 to 179,999 ticks (that is 0.5 to 7.5 minecraft days) when rain is turned off. Every integer tick-number for the counters that are in the range have the same probability (equal distribution). For the thunder counter, when thunder is turned on, the counter gets a value between 3,600 ticks (3 minutes) and 15,599 (13 minutes) when thunder is turned off, it gets a value between 12,00 and 179,999 (0.5 to 7.5 days). Again, always equal distribution. However, when thunder is on and rain is off, then in-game, you see clear weather, that means, no lighting strikes and no dark clouds etc. With these numbers I calculated a proportion of 1.44% of the time, that it is thundering. With that I calculated, that you need to wait for a thunderstorm in average 9 hours and 16 minutes. I simulated also how long you would need in average with Python and there I got the value 8 hours and 40 minutes. Would anyone mind when I put that into the wiki? – Unsigned comment added by GuiTaek (talkcontribs) at 23:11, 5 July 2021‎ (UTC). Sign comments with ~~~~Reply[reply]

I don't mind, but your explanation is somewhat rambling and confusing. From what you wrote, it seems to me that:
  • While the clear counter is counting down, the weather is always clear. This counter is used only when the "/weather set clear" command is issued, setting the counter to a value between ??? and ??? ticks. (Might this counter also be set when the game first starts in a new world?)
  • The rain counter counts down to zero, and each time it reaches zero, the rain is toggled on or off. When the rain is turned on, the counter is reset to a value between 12,000-23,999 ticks (0.5-1 game days), and when the rain is turned off the counter is reset to a value of 12,000-179,999 ticks (0.5-7.5 game days). The values in each range are uniformly distributed.
  • Like the rain counter, the thunder counter also toggles thunder on and off when it reaches zero, but clear weather overrides the "on" state. When thunder is turned on, the thunder counter is reset to 3,600-15,999 ticks (3-13 minutes), and when thunder is turned off the counter rests to 12,000-179,999 ticks (0.5-7.5 days).
  • Thunder can occur in the game only when the rain and thunder states both happen to be "on" at the same time. The random combinations of the states toggled by the rain and thunder counters result in a 1.44% chance for a thunderstorm to occur, or an average real-time duration of 9 hours and 16 minutes between thunderstorms.
Does that sound about right? I'd organize it into bullets if possible. As you can see from the first bullet, some information is missing about the "clear" counter. Amatulic (talk) 23:58, 5 July 2021 (UTC)Reply[reply]
Thanks for the opinion, I'm not that experienced in writing in this wiki. For the first point, I don't know the answers, they need more digging in the code. Everything you wrote is correct, so maybe when I have the numbers, can I just take your points? 20:21, 6 July 2021 (UTC)
So I looked it up and as written in Commands/weather the duration is fixed at 5 mins (regardless of the counter) and it was a little bit hard to look it up but as long as minecraft don't explicitly use their own commands to set the clear counters (this would be really weird, but I coudn't verify) the clear counter is really only set when the command is typed in and not when the world is first generated. So I will copy & paste your explanation just into the wiki. GuiTaek (talk) 14:58, 11 July 2021 (UTC)Reply[reply]
Looks good to me. Amatulic (talk) 22:13, 11 July 2021 (UTC)Reply[reply]

Skeleton horse spawning[edit source]

Do skeleton horses spawn if lightning is spawned through the summon command, and do they spawn if the lightning is redirected onto a lightning rod?

Unclear about behavior of lightning rod[edit source]

One section on this page states "Lightning strikes within an area of 32×4×32 blocks above a lightning rod are redirected to the rod, emitting a Redstone signal." Meanwhile the Lightning Rod article states "Lightning rods redirect lightning strikes within a spherical volume having a radius of 128 blocks in Java Edition and 64 blocks in Bedrock Edition". Which is it? Also this page states that the search for living entities occurs *after* lightning rod redirection? So if I stood on a platform way above the lightning rod the lightning would redirect from the lightning rod to me? Also, does it care whether the lightning rod is underground? Nothing mentions underground restrictions for the lightning rod, but if the final strike position is still underground then the lightning doesn't happen. Does that mean putting a lightning rod underground just stops any nearby lightning entirely, unless a living entity stands on the surface above the lightning rod? Seems like a great hidden trap if so. {{SUBST:User:Retep998/Sig}} 08:34, 18 November 2021 (UTC)

This article is wrong. Lightning rods redirect lightning within a sphere surrounding the rod. I'll correct it. And entities within that sphere are safe; the lightning goes to the rod.
I have no idea what happens if the lightning rod is underground. I should try it. Regardless of where the rod is, the final strike position is always on the surface exposed to the sky, however. Amatulic (talk) 21:23, 18 November 2021 (UTC)Reply[reply]

Has anyone had lightning delete a boat (with chest) ?[edit source]

Just ocean exploring /looting, I lost some relatively-unimportant stuff, as I ignored lightning striking, and after some struck nearby me when I'd gotten out of the boat. Yeah, not even a hint anything'd been there. Here or the boat section? Yilante 3 /24 /24 2600:1702:30A0:D290:94C2:8520:9273:A5B2 21:04, 24 March 2024 (UTC)Reply[reply]

How does sleeping interact with the rain timers?[edit source]

The page doesn't make a mention of how sleeping in a bed interacts with the rain and thunderstorm timers, save for the version history saying that they're not reset if it's not raining since 1.18.

The main questions I have are:

  • Does sleeping in a bed speed up the timers if it's not raining or do they just remain as is?
  • Does sleeping in a bed while it's raining (not during a thunderstorm) reset both timers?
  • If you're looking for a thunderstorm, is it better to sleep every night? Or just the nights it's not raining? Or something else?

McAwesome (talk) 18:27, 18 February 2025 (UTC)Reply[reply]

thunderstorm mob spawning behavior[edit source]

I found a switch in the code that changes the light checking conditions when thundering, and it gets the light level with ambient darkness of 10 when it is thundering, and with an ambient darkness of default otherwise, looking at default it is a maze of code, but it seems to only have a range of 6 to 11, and the ambient darkness is subtracted from the skylight level in the function that is used to fetch the light level, so that would leave a skylight max of 5 as far as mob spawning is concerned during thunderstorms, and a skylight max of 10 ever as far as mob spawning goes if I read the code for the non thunder calculations right, which confuses me and makes me think I missed something. anyway, the converging of the checks is in HostileEntity class, function called isSpawnDark by my decompiler if that helps anyone find it and help me check. the maze of code is in World class, in the calculateAmbientDarkness function. ChainSword20000 (talk) 06:02, 27 February 2025 (UTC)Reply[reply]