

General Behaviour of entities in every tick, using the example of a Lightning. It´s also inside that cube), that they´ve been struck by lightning. It will then tell all entities inside that cube, except the Lightning itself (technically Lightning acutally exists serverside, it will search for entities in a 6x12圆Ĭube, so that the Lightning entity is at the center of the lower half of the cube. LightningState is greater than 0 then it will do the following things: If the Lightning will again try to place a fire block at the position of the LightningĮntity, using similar checks as the ones used, when a Lightning spawns. 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
#Trident minecraft dmg 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 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
#Trident minecraft dmg code#
Interpretation of the Code of the LightningBolt Class
