mojira.dev
MC-134920

Channeling doesn't affect mobs standing on some non-full blocks and in boats/minecarts

 

The Bug:

Channeling doesn't affect mobs in some circumstances, here's a list of what i tested:

 

slabs

not struck by lightning bolt

stairs

struck by lightning bolt when mob is standing on the upper half;
not struck if standing on the lower half

soul sand

not struck by lightning bolt

farmland

not struck by lightning bolt

grass path

not struck by lightning bolt

snow

not struck if snow layers is 8

Mob in a boat

not struck by lightning bolt. This doesn't affect passive mobs.

Mob in a minecart

not struck by lightning bolt. This doesn't affect passive mobs.

Honey block

not struck by lightning bolt

Inside a cobweb

not struck by lightning bolt

Inside lava

not struck by lightning bolt

Inside water

not struck by lightning bolt

Inside Powder Snow

not struck by lightning bolt

 

Note: Mobs riding horses are not affected. 

Linked issues

Attachments

Comments 19

Sounds like the thurderstorm is going to the top of the block only, but if the mob is slightly lower than that, it doesnt hit it

Doesn't really explain the glass panes, fences, beds, etc.

I'm thinking maybe the game uses the lighting subroutine to check for sky access?

Apart from the boat the blocks where lightning doesn't strike seem to be the ones where F3 reports 0 light.

Boats on land do have 0 light though, and a boat in water possibly counts as being in water.

Boats in water only have 14 sky light which isn't full sky access.

Mobs in lava aren't struck by lightning either, also 14 sky light.

9 more comments

I would assume the cause of this bug (as well as MC-125773 and MC-217528) to be that Channeling checks for sky exposure at a mob's feet level. So when mobs are standing on non-full blocks that block sky light, their feet technically don't have sky access, therefore Channeling doesn't work. Similarly, when mobs are riding boats/minecarts, their hitboxes extend below the bottom of the vehicles, observable using F3 + B. Hopefully someone can do a code analysis on this, so my speculation can be confirmed.

Can confirm for 22w11a.

Can confirm in 1.19.

Can confirm in 1.19.2.

Can confirm in 1.19.4

Wit Uta

TheGabro

(Unassigned)

Confirmed

Gameplay

Low

Entities

channeling, mob

Minecraft 1.13, Minecraft 1.13.1, 1.15.2, 20w19a, 20w20a, ..., 1.21, 1.21.1, 24w39a, 1.21.4, 25w03a

Retrieved