Mojira Archive
MC-114217

Lightning strikes are randomized server and client side resulting in too short or too long lightning strikes client side

The bug

Lightning strikes are randomized server- and client-side, while they should only be randomized server-side. This can result in too long or too short lightning strikes client-side. For example the player is not seeing lightning bolts anymore but is still damaged.

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1

The constructor net.minecraft.entity.effect.EntityLightningBolt.EntityLightningBolt(World, double, double, double, boolean) chooses the life time client-side and the method net.minecraft.entity.effect.EntityLightningBolt.onUpdate() randomizes how long the lightning strike will take.

Unresolved

Marcono1234

2017-02-26, 10:22 PM

2022-05-09, 02:01 PM

12

2

Confirmed

(Unassigned)

client-side, lightning, lightning_bolt, random, server-side

Minecraft 1.11.2, 20w07a, 22w18a

-