Hey, I'm new to modding and new to this forum so hopefully I'm doing things alright.
I'm attempting to implement increased knockback for a custom weapon in my mod. I've created the item and am trying to figure out how to add the increased knockback effect.
This post suggests subscribing to `LivingKnockBackEvent` - which I have successfully done and I'm able to effect the degree of knockback by using `event.setStrength`. However, I'm unable to conditionally set the knockback strength, as I don't have access to the entity which attacked through this method. Which is odd, because both the forum post AND the 1.16.x documentation inside of the code allude to an `Entity attacker` parameter which does not exist. I went back and looked at an older version (1.15.x and earlier) of Forge, and there did indeed used to be an `Entity attacker` parameter, but it was removed in 1.16.x for a reason I can't find. Because of this, I'm unable to find the weapon that was used to cause the knockback event - which is required for my task.
Did this get removed because there's a more modern way to access a knockback attacker entity? Or am I just out of luck? Alternatively, is there another way to set an items' knockback amount? I tried setting the `ATTACK_KNOCKBACK` attribute in the weapon modifier properties, but it turns out that doesn't work on items - only on mobs (which is to say, it shows up on the item as "+20 Attack Knockback", but it has no effect).
Any help would be appreciated, thanks!
[As a note, I am using Forge 1.16.5-36.1.0]