If the lightningState is less than a random numberīetween -9 and 0, then boltLivingTime will be reduced by 1, lightningState willīe set to 1, the Lightning will randomly change the way it looks, and the LightningState is less than 0, then it will do the following things: If boltLivingTime
#MINECRAFT SOUND EFFECTS MINECRAFT WIKI UPDATE#
Update lightningState will be reduced by 1. LightningState is 2, then some sound effects will be played. The Lightning will do everything entities do in general when they´re updated.Īfter doing general entity stuff, the following things happen: Lightning has been generated, it will do the following things every tick: The lightning entity, however the fire is generally more likely to generate
![minecraft sound effects minecraft wiki minecraft sound effects minecraft wiki](https://static.wikia.nocookie.net/soundeffects/images/8/82/Minecraft.jpg)
If var8 is an airīlock and fire can be placed on the block below, then the air block will beġ Fire block can spread up to 4 blocks away on each axis from the position of 1 and 1 will be added to the x, y and z coordinates of var8. Repeat 4 times the following process: 3 random numbers (one for each axis) between Lightning will remember the Position of the Block it is in, and call it var8.Īn air block and fire can be placed on the block below, then the air block will If that should all be the case, then it will do the following things: Hard and whether a 10x10 area around the spot, where the lightning spawned, is Gamerule "doFireTick" is true, whether the difficulty is normal or Then check, if it exists serverside and not just clientside, whether the A variable called lightningState will be set to 2. Lightning spawns, it will set a variable called boltLivingTime to a random
#MINECRAFT SOUND EFFECTS MINECRAFT WIKI CODE#
Interpretation of the Code of the LightningBolt Class Wither Skeleton - Do not take damage but appear to be set alight (more details please).Witch - Takes damage, but uses a fire-resistance potion and becomes immune to being lit on fire and repetitive strikes.Pigs - Turned into sword-less Zombie Pigmen.Mooshrooms - red mooshrooms turn to brown mooshrooms and brown mooshrooms turn to red mooshrooms upon the strike.Endermen - Do teleport after taking damage.Ender Dragon - Does not take damage(no video evidence in Xisumavoid's video).Creepers - Turn "charged" but still take damage from the first and repetitive strikes.It can also be spawned in via commands with /summon Lightning ~ ~ ~ This can be used for a plethora of things, mainly used for visual effects or weapons in custom maps.īecause it only deals fire damage it doesn't harm nether mobs at all, however some mobs have interesting effects: Lightning naturally spawns in game during a Thunderstorm. In general it lights the block it strikes on fire then deals 5 fire damage to any entity in a 6 3 block cube centered 3 blocks above the block it strikes then lights those mobs on fire. Whether this is worth mentioning is discussable. Since the EntityWeatherEffect class has almost literally no code, Lightnings can be thought of inheriting code from the Entity class only. The LightningBolt class only inherits code from the Entity and the EntityWeatherEffect -class.
![minecraft sound effects minecraft wiki minecraft sound effects minecraft wiki](https://www.tynker.com/image/hero/minecraft/mc-steve.png)
4.1 General Behaviour of entities in every tick, using the example of a Lightning.4 Interpretation of the Code of the LightningBolt Class.