-
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, 1.21
-
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
- Have a downward facing lightning rod
- Place some oxidized copper under it
- 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); } ... } ...