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

Lightning Bolt detecting lightning rod incorrectly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 21w11a, 21w13a, 21w15a, 21w16a
    • Fix Version/s: 21w19a
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Entities, Redstone
    • Mojang Priority:
      Important

      Description

      When a lightning bolt is created, it will attempt to detect a lightning rod 1 block below itself.
      It does this correctly in ServerLevel.java tickChunk(), although right after that it runs lightningBolt.moveTo(Vec3.atBottomCenterOf(lvt8)); which offsets the lightning bolt before creating it.
      That same check is done within the lightning bolt in powerLightningRod() where it checks the block below, but now that the block is offset it checks the incorrect block.

      If you have a second lightning rod below, it will power that lightning rod instead

      Reproduce

      • Place two lightning rods one above and one below (see image for placement)
      • do /summon lightning_bolt on the top lightning rod
        Notice the bottom lightning rod is powered not the top

        Attachments

        1. 2021-03-17_15.17.36.png
          2.68 MB
          FX - PR0CESS
        2. MC-219873.mp4
          3.31 MB
          Avoma

          Issue Links

            Activity

              People

              Assignee:
              grum [Mojang] Grum (Erik Broes)
              Reporter:
              PR0CESS FX - PR0CESS
              Votes:
              8 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                CHK: