I override the method attackEntityFrom of ClientPlayerBase (Player API) which is called everytime player is hit and I want to get the Entity who hit the player.
I use Player API with and I have a problem:
public boolean attackEntityFrom(DamageSource damageSource, float v) {
if(damageSource.getEntity() != null)
{
//Never Reached
}
return super.attackEntityFrom(damageSource, v);
}
I saw that I need to use EntityDamageSource but It is not working.
What can I do?
(It is clientside)