Mojira Archive
MC-125773

Channeling enchantment doesn't work when mob is in water or lava

The bug

The channeling enchantment doesn't work on a mob whilst it is standing in water or lava.

How to reproduce

  1. Summon an entity in a block of water
  2. Run the command /weather thunder
  3. Obtain a trident with the Channeling enchantment
  4. Strike the entity with the trident

Observed behavior

No lightning strikes the entity and the Channeling enchantment does not affect the entity.

Expected behavior

The Channeling enchantment would be effective even when the entity is in water.

Code analysis

Code analysis by Xander Smith can be found in this comment.