Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-114217

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

XMLWordPrintable

    • Confirmed
    • (Unassigned)

      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.

            Unassigned Unassigned
            marcono1234 [Mod] Marcono1234
            Votes:
            10 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: