If you hit a fireball directly at someone it will credit you for the kill, However if you hit next to them or they are otherwise hit by the fireball but not directly you will not be credited for the kill on the player.
This was checked using the playerKillCount scoreboard so it is possible the issue is with that and not the credit itself, this was only checked as players against players but could also be the case with other entities.
Pretty sure code analysis:
In
LargeFireball#onHit
, the call tolevel.explode
passesnull
to the entity parameter instead ofthis
. As a result,Explosion#getSourceMob
can't find the fireball, nor its owner. Contrast with Primed TNT, which uses a similarexplode
call but does pass itself in.The fireball still works for direct hits because
onHitEntity
passes the fireball entity to thehurt
damage source context.