[[File:Lightning.png|thumb|250px|Lightning during a thunderstorm.]]
[[File:LightningStrike.gif|thumb|right|A lightning bolt strikes a tree, making it potentially flammable. A [[creeper]] can be seen walking through the woods; if it had been closer to the strike, it would have become [[Creeper#Charged Creepers|charged]].]]
A '''thunderstorm''' is a somewhat uncommon and dangerous [[weather]] condition.

== Behavior ==

Thunderstorms are an uncommon temporary, global occurrence<ref>{{tweet|notch|55984678875836416|It's temporal and global|April 07, 2011}}</ref> that can happen randomly at any time, within the [[Overworld]]. The exact type of precipitation during a thunderstorm varies depending on the [[Biome#Temperature|temperature of the current biome]], as well as the current [[altitude]].

* While the clear counter is counting down, the weather is always clear. This counter is used only when the {{cmd|weather clear}} command is issued, setting the counter to a value given by the player or 5 minutes.
* 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-24,000 ticks (0.5-1 game days), and when the rain is turned off the counter is reset to a value of 12,000-180,000 ticks (0.5-7.5 game days).
* 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,600 ticks (3-13 minutes), and when thunder is turned off the counter resets to 12,000-180,000 ticks (0.5-7.5 game 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 approximate average real-time duration of 9 hours between thunderstorms.
*  The values in each range are uniformly distributed.

Thunderstorms can be skipped entirely with the use of a [[bed]], regardless of the time of day.

== Effects ==

As with rain and snow, the sky is darkened and the [[sun]], [[moon]], and [[Moon#Stars|stars]] are no longer visible. Thunderstorms darken the world, causing the [[light]] level from the sky to visually decrease to 10. The clouds darken from white to dark gray, although clouds themselves do not precipitate or create lightning. While the sun is not visible during rain, the glow associated with sunrise and sunset is still visible.

Unlike during regular rainstorms or snowstorms, the light level from the sky is treated as if it were 0{{check the code|[[Light#Internal sky light]] asserts it's "as if the internal sky light level were actually 5"}} for the purposes of hostile mob spawning, which allows hostile [[mobs]] to spawn at any time of the day.

=== Lightning ===
{{Distinguish|Lighting}}
{{anchor|Lightning Bolt}}

'''Lightning''' is a lethal element to thunderstorms. Lightning momentarily increases the sky light's brightness to slightly greater than full daylight.

[[File:Lightning fire.png|thumb|left|200px|The fire that a lightning bolt creates.]]

Lightning strikes randomly and creates [[fire]]s (only on normal and hard difficulty) in a 2 block radius where it strikes. Such fires act normally, igniting all flammable materials, detonating [[TNT]], and even activating [[nether portal]]s. The lightning itself, however, is not destructive and does not destroy blocks. While most fires are extinguished by the rain, areas that block rain can allow the fire to spread, and any [[netherrack]], [[magma block]]s, [[soul sand]], or [[soul soil]] lit by lightning is not extinguished by the rain.

Most [[entities]] struck by lightning are dealt {{hp|5}} damage (sometimes twice in succession) and are set on fire, which may cause additional damage.  [[Boats]] may be destroyed, entirely (including [[Boats with chests]]), leaving nothing behind.

If the player is killed by a lightning strike, the [[death message]] appears: "<player> was struck by lightning". This message does not display if the player was killed by the fire created by a lightning bolt.

Lightning {{in|bedrock}} changes color from white to orange at sunset, and appears brighter during the daytime.

Lightning may be manually summoned with the {{cmd|summon lightning_bolt}} command. It is summoned as an entity, and it can be referred to by [[commands]] or [[Command#Selectors|selectors]]. 

[[File:SkeletonRiderGroup.png|thumb|250px|A group of skeletal horsemen spawned during a thunderstorm.]]
[[File:Charged Creeper.gif|thumb|255x255px|[[Creeper#Charged Creeper|Charged Creeper]]]]
[[File:Villager becoming Witch.gif|thumb|A villager gets struck by lightning.]]

Lightning is also spawned when a [[trident]] enchanted with [[Channeling]] is thrown and strikes a mob or a [[lightning rod]] during a thunderstorm.

On [[graphics settings]] lower than ''Fabulous!'', [[water]] is invisible when seen through lightning.

==== Effects on mobs ====
A lightning strike affects certain mobs differently:
* Lightning may randomly spawn a [[Skeleton Horse#Spawning|"skeleton trap" horse]] with a chance of 0.75–1.5% chance on Easy, 1.5–4% on Normal, and 2.8125–6.75% on Hard, depending on the [[regional difficulty]]. A player triggers the trap by moving within 10 blocks of the horse, whereupon the horse transforms into four skeletal horsemen. A non-triggered trap horse despawns after 15 minutes.
* A [[pig]] struck by lightning turns into a [[zombified piglin]]. 
* A [[creeper]] becomes [[Creeper#Charged Creeper|charged]]. 
* A [[villager]] gets replaced by a [[witch]] when [[lightning]] strikes within four blocks from it. 
* A red [[mooshroom]] changes into a [[Mooshroom|brown mooshroom]] and vice versa.
* A lightning strike on a [[turtle]] instantly kills it, and it drops 1 [[bowl]] instead of its normal drops.<ref>{{bug|MC-125562|||Works as Intended}}</ref>

==== Lightning mechanics ====

For each loaded chunk, every tick there is a {{frac|1|100,000}} chance of an attempted lightning strike during a thunderstorm. From this probability, if ≈201 chunks are loaded (from a radius of 128 blocks from the player to the center of each chunk) then 90% of the time up to 5 lightning strikes occur in the world each minute, with an average of approximately 2.4 lightning strikes each minute.

When lightning is to strike, random X and Z coordinates within the chunk are chosen, and the block just above the highest block that is liquid or obstructs movement is chosen for the lightning strike. If a [[lightning rod]] is nearby, it strikes the rod instead. Then if there are any living entities that can see the sky in a 3×''h''×3 region from 3 below the target block up to the world height, one such entity is selected at random and the lightning target is moved to the block the entity stands in.

The target block is checked again for the following conditions:
* Target block can see the sky.
* Rain (not snow) is falling in the target block.
** Thus, lightning does not naturally strike within cold biomes or biomes where it does not rain.

If these conditions pass, lightning strikes.

When lightning strikes, all entities within a 6×12×6 region horizontally centered on the northwest corner of the target block with the bottom edge 3 below the target block are struck by lightning. Multiple passes are made over this region, so items dropped during an earlier pass may be destroyed during a subsequent pass; [[damage immunity]] usually prevents struck mobs from taking more than {{hp|5}} damage. [[Opacity|Non-solid]] blocks (such as [[redstone]], [[torch]]es, and [[snow layer]]s) are not directly affected by lightning.

==== Thunder ====
{{Redirect|Thunder|the ''Minecraft Dungeons'' enchantment|MCD:Thundering}}
'''Thunder''' is a sound event that occurs every time lightning strikes. Every player within 160 thousand blocks and in the same dimension hears the thunder. <!-- Source: [[Special:Diff/1578428]] -->

The ability to hear thunder affects multiplayer, as it is possible to hear lightning strike at someone else's base or use a modded Minecraft client to determine the direction of every strike in the world the player is in. Using the direction of strikes, it is possible to [[wikipedia:Triangulation (surveying)|triangulate]] the coordinates of lightning strikes.

Because lightning bolts only happen in loaded chunks, this can be used to, for example, know where the other player is in a multiplayer world with only two player (however, the spawn chunks are always loaded, so the triangulation might lead you to world spawn instead).

==== Lightning rods ====
Lightning strikes within a radius of 128 blocks (''Java Edition'') or 64 blocks (Bedrock Edition) of a [[lightning rod]] are redirected to the rod, emitting a [[Redstone]] signal. This can be used to prevent flammable structures from being struck by lightning, or intentionally direct lightning toward or away from mobs. During a thunderstorm, they emit spark-like particles, even in biomes where lightning doesn't strike.

== Sounds ==
{{Edition|Java}}:<br>

{{SoundTable
| type = java
| {{SoundLine
| sound =Explosion1.ogg
|sound2=Explosion2.ogg
|sound3=Explosion3.ogg
|sound4=Explosion4.ogg
|subtitle=Lightning strikes
|source=weather
|description=When lightning strikes near a player
|id=entity.lightning_bolt.impact
|translationkey=subtitles.entity.lightning_bolt.impact
|volume=2.0
|pitch=0.5-0.7
|distance=16}}
| {{SoundLine
|sound=Thunder1.ogg
|sound2=Thunder2.ogg
|sound3=Thunder3.ogg
|subtitle=Thunder roars
|source=weather
|description=When lightning strikes in the world
|id=entity.lightning_bolt.thunder
|translationkey=subtitles.entity.lightning_bolt.thunder
|volume=10000.0
|pitch=0.8-1.0
|distance=16 (technical) / 160K (effective)}}
| {{SoundLine
|rowspan=2
|sound=Trident thunder1.ogg
|sound2=Trident thunder2.ogg
|subtitle=Trident thunder cracks
|source=neutral
|description=When a Channeling trident hits a mob
|id=item.trident.thunder
|translationkey=subtitles.item.trident.thunder
|volume=5.0
|pitch=1.0
|distance=16}}
| {{SoundLine
|subtitle=Trident thunder cracks
|source=weather
|description=When a trident with Channeling strikes a lightning rod
|id=item.trident.thunder
|translationkey=subtitles.item.trident.thunder
|volume=5.0
|pitch=1.0
| distance = 16
}}
}}

{{Edition|Bedrock}}:
{{SoundTable
| type = bedrock
| {{SoundLine
| sound =Explosion1.ogg
|sound2=Explosion2.ogg
|sound3=Explosion3.ogg
|sound4=Explosion4.ogg
|source=weather
|description=When lightning strikes near a player
|id=ambient.weather.lightning.impact
|volume=1000.0
|pitch=0.3-0.7}}
| {{SoundLine
|sound=Thunder1.ogg
|sound2=Thunder2.ogg
|sound3=Thunder3.ogg
|source=weather
|description=When lightning strikes in the world
|id=ambient.weather.thunder
|volume=1000.0
|pitch=0.6-1.0}}
| {{SoundLine
|sound=Trident thunder1.ogg
|sound2=Trident thunder2.ogg
|source=player
|description=When a trident with Channeling strikes a mob<wbr><ref group=sound>{{bug|MCPE-173931||Tridents don't make channeling sounds when striking a lightning rod}}</ref><wbr>
|id=item.trident.thunder
|volume=1.0<wbr><ref group=sound>{{Bug|MCPE-178265||Trident thunder sound definition schema error}}</ref>
| pitch = 1.0
}}
}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|generatetranslationkeys=y
|displayname=Lightning Bolt
|spritetype=entity
|nameid=lightning_bolt
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|generatetranslationkeys=y
|displayname=Lightning Bolt
|spritetype=entity
|nameid=lightning_bolt
|id=93
|foot=1}}

=== Entity data ===

Lightning bolts have entity data associated with them that contain various properties.

{{el|java}}:
{{main|Entity format}}
{{/ED}}

{{el|bedrock}}:
: See [[Bedrock Edition level format/Entity format]].

==Advancements==

{{load advancements|Very Very Frightening;Surge Protector}}

== History ==

{{HistoryTable
|{{HistoryLine|java beta}}
|{{HistoryLine||1.5|Added thunderstorms and lightning.
|The ability for lightning to charge [[creeper]]s and transform [[pig]]s into [[zombie pigmen]] has been added.
|In [[multiplayer]], the sky during a thunderstorm looks identical to when [[rain]]ing.}}
|{{HistoryLine|java}}
|{{HistoryLine||1.3.1|dev=12w18a|As a result of singleplayer being changed to an internal server, the sky during a thunderstorm now looks the same as when raining.<ref name="MC-673">{{bug|MC-673}}</ref>}}
|{{HistoryLine||1.7.2|dev=13w39a|The clouds and the sky again appear much darker during thunderstorms.
|The rendering brightness is now decreased during thunderstorms. Previously, the sky would darken, but the ground wouldn't appear to get darker, even though monsters could spawn.}}
|{{HistoryLine||1.8|dev=14w03a|Lightning now transforms [[villager]]s into [[witch]]es.}}
|{{HistoryLine|||dev=14w30a|Lightning can now be manually summoned with the {{cmd|summon LightningBolt}} [[command]].}}
|{{HistoryLine|||dev=14w32a|Lightning now damages [[Nether]] mobs and [[mob]]s with the [[Fire Resistance]] status effect.}}
|{{HistoryLine||1.9|dev=15w38a|There is a now chance (depending on [[regional difficulty]]) that a lightning strike spawns a [[Skeleton Horse|"skeleton trap" skeletal horse]].}}
|{{HistoryLine||1.11|dev=16w32a|The [[entity]] ID has been changed from <code>LightningBolt</code> to <code>lightning_bolt</code>.}}
|{{HistoryLine||1.13|dev=18w07a|If a [[player]] throws a [[trident]] enchanted with [[Channeling]] at a [[mob]] during a thunderstorm, a lightning bolt is summoned and strikes that mob. This is the first time that a player can manipulate lightning without [[commands]].}}
|{{HistoryLine||1.14|dev=19w08a|If lightning strikes near a red [[mooshroom]], it turns into a brown mooshroom and vice versa.}}
|{{HistoryLine||1.16|dev=Pre-release 1|Lightning bolts can now be targeted by selectors and save to the world.}}
|{{HistoryLine||1.17|dev=20w45a|Lightning bolts can be led into a [[lightning rod]] within a 16x16 range.}}
|{{HistoryLine||1.18|dev=21w44a|[[Sleeping]] now only resets the weather cycle during rain or a thunderstorm.<ref>{{bug|MC-63340||Sleeping always resets time until rain|Fixed}}</ref> Therefore, sleeping frequently no longer prevents rain or a thunderstorm from happening.}}
|{{HistoryLine|||dev=20w46a|Lightning bolts can now be caught within a 32x32 range.}}
|{{HistoryLine|||dev=21w11a|Lightning bolts now clean oxidation off copper blocks.
|Lightning bolts no longer spawn skeleton horses when striking [[lightning rod]]s.}}

|{{HistoryLine|pocket alpha}}
|{{HistoryLine||v0.12.1|dev=build 1|Added thunderstorms.}}
|{{HistoryLine||v0.14.0|dev=build 1|Lightning now transforms [[villager]]s into [[witch]]es.}} 
|{{HistoryLine||v0.16.0|dev=build 1|There is now a chance (depending on [[regional difficulty]]) for a lightning strike to spawn a [[Horse#Skeleton trap|"skeleton trap" skeletal horse]].
|Lightning can now be manually summoned with the {{cmd|summon LightningBolt}} [[command]].}} 
|{{HistoryLine|pocket}}
|{{HistoryLine||1.1.0|dev=alpha 1.1.0.0|The [[entity]] ID has been changed from <code>lightningBolt</code> to <code>lightning_bolt</code>.}}
|{{HistoryLine|bedrock}}
|{{HistoryLine||1.2.13|dev=beta 1.2.13.8|If a [[player]] throws a [[trident]] enchanted with [[Channeling]] at a [[mob]], a lightning bolt is summoned and strikes that mob.}}
|{{HistoryLine||1.13.0|dev=beta 1.13.0.9|If lightning strikes near a red [[mooshroom]], it turns into a brown mooshroom and vice versa.}}
|{{HistoryLine||1.16.100|dev=beta 1.16.100.51|Hostile mobs can now spawn during thunderstorms in the day.}}
|{{HistoryLine||1.16.210|exp=Caves and Cliffs|dev=beta 1.16.210.57|Lightning bolts can now be caught within a 64x64 range.}}
|{{HistoryLine||1.16.220|exp=Caves and Cliffs|dev=beta 1.16.220.52|Lightning bolts now clean oxidation off copper blocks.}}
|{{HistoryLine||1.17.10|dev=beta 1.17.10.20|Thunderstorms now occur as often as in ''Java Edition''.}}

|{{HistoryLine|console}}
|{{HistoryLine||xbox=TU1|xbone=CU1|ps3=1.00|psvita=1.00|ps4=1.00|wiiu=Patch 1|Added thunderstorms.}}
|{{HistoryLine||xbox=TU31|xbone=CU19|ps3=1.22|psvita=1.22|ps4=1.22|wiiu=Patch 3|switch=1.0.1|Lightning now transforms [[villager]]s into [[witch]]es.}}
|{{HistoryLine||xbox=TU46|xbone=CU36|ps3=1.38|psvita=1.38|ps4=1.38|wiiu=Patch 15|switch=1.0.1|There is a now chance (depending on [[regional difficulty]]) that a lightning strike spawns a [[Skeleton Horse|"skeleton trap" skeletal horse]].}}
|{{HistoryLine||xbox=TU69|xbone=none|ps3=1.76|psvita=1.76|ps4=1.76|wiiu=Patch 38|switch=none|If a [[player]] throws a [[trident]] enchanted with [[Channeling]] at a [[mob]] during a thunderstorm, a lightning bolt is summoned and strikes that mob. This is the first time that a player can manipulate lightning.}}
}}

== Issues ==

{{issue list|Lightning|Thunder}}

== Trivia ==
* Lightning, unlike other weather effects, does not have an image file associated with it. It is an entity, coded directly into the game engine, allowing for dynamic, realistic lightning.
* {{IN|be}}, lightning strikes closer to the player more often than in Java Edition, due to spawn distance limits.
* Because lightning is an entity, [[commands]] and [[command block]]s can be used to kill and remove them from the world.

== Gallery ==
=== Screenshots ===
<gallery>
File:Void Thunder.png|The void during a lightning strike.
File:Witch Brawl.png|Witches fighting during a thunderstorm.
File:ThunderClouds.png|Thunderclouds appearing in a hot biome with no rain.
File:Largelake.png|Forest lake during the thunderstorm.
File:lightning_redstone_anim.gif|Lightning hitting a lightning rod and sending a redstone signal.
File:lightning_oxidizing_anim.gif|A lightning-struck lightning rod decreasing the oxidizing level of nearby copper blocks.
</gallery>

== References ==

{{reflist}}

== Navigation ==
{{Navbox environment}}
{{Navbox entities|Other}}

[[de:Gewitter]]
[[es:Tormenta]]
[[fr:Orage]]
[[ja:雷雨]]
[[ko:뇌우#번개]]
[[nl:Onweersbui]]
[[pl:Burza]]
[[pt:Tempestade]]
[[ru:Погода#Гроза]]
[[zh:雷暴]]
