On my realm, my friends and I created a joke that whenever something stands on a bone block, they get struck with lightning until they die or get off the block. In 1.15.x, this was all well and good as all it was was just a random noise here and there etc, but now in 1.16 and 1.16.1, whenever anything causes the spam lighting, even for a short period of time, it causes immense lag to the point of the server crashing sometimes. The exact command we used is listed below.
/execute at @e if block ~ ~-1 ~ minecraft:bone_block run summon minecraft:lightning_bolt
Comments 6
Wow, this is quite exciting! Until the server crashes.
This is actually Working As Intended. Here's why:
In 1.16 lightning_bolt entities can be selected using commands.
Your command spawns lightning when any entity (including lightning) stands on a bone block.
So when you step onto a bone block, one lightning bolt is spawned.
Next tick, there are two entities on the bone block (one player and one lightning bolt) so two more lightning bolts are spawned.
Next tick, there are 4 entities on the bone block, so 4 more are spawned... you get the idea!
Fix by making the command ignore lightning:
/execute at @e[type=!lightning_bolt] if block ~ ~-1 ~ minecraft:bone_block run summon minecraft:lightning_bolt
Can reproduce in 20w28a. It practically freezes the tick cycle.