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

Lightning that strikes a lightning rod facing into weathering copper does not de-oxidize it

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 21w11a, 21w13a, 21w14a, 21w15a, 21w17a, 1.17, 1.17.1, 21w39a, 1.18 Release Candidate 3, 1.18.1, 22w15a, 22w18a, 1.19 Pre-release 5, 1.19, 1.19.2, 1.19.3 Pre-release 1, 1.19.3
    • None
    • Confirmed
    • Block states
    • Low
    • Gameplay

      The bug

      A lightning rod facing into some oxidized copper (any stage) doesn't de-oxidize it.

      How to reproduce

      1. Have a downward facing lightning rod
      2. Place some oxidized copper under it
      3. Strike it with lightning

      Observed Result

      It doesn't de-oxidize the copper.

      Expected Result

      It would de-oxidize the copper.

      Code analysis

      The lightning bolt has a check on clearCopperOnLightningStrike(...) which only checks the block facing the opposite way from it, so if the lightning rod is placed facing into the copper (upside down or laterally outwards) it will not work.

      net.minecraft.world.entity.LightningBolt.java (1.18-rc3, Mojang mappings)
      ...
      private static void clearCopperOnLightningStrike(Level level, BlockPos blockPos) {
              ...
              BlockState blockState = level.getBlockState(blockPos);
              if (blockState.is(Blocks.LIGHTNING_ROD)) {
                  BlockPos blockPos2 = blockPos.relative(blockState.getValue(LightningRodBlock.FACING).getOpposite());
                  BlockState blockState2 = level.getBlockState(blockPos2);
              }
              ...
      }
      ...
      

        1. 2021-03-19_15.29.44.png
          1.06 MB
          [Mod] Anthony Cicinelli
        2. 2021-06-11_13.04.18.png
          628 kB
          [Mod] ampolive
        3. 2021-06-11_13.05.13.png
          715 kB
          [Mod] ampolive
        4. MC-220232.mp4
          5.40 MB
          [Mod] Avoma

            Unassigned Unassigned
            Thumpbacker [Mod] Anthony Cicinelli
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: