Player Knockback Doesn't Post LivingKnockBackEvent
Charles445 opened this issue ยท 2 comments
Forge Version
14.23.5.2860
Galacticraft Version
4.0.2.284
Log or Crash Report
No response
Reproduction steps
Galacticraft overrides player knockback entirely, but doesn't post a LivingKnockBackEvent, causing mods like Damage Tilt to fail.
For context, Forge posts a LivingKnockBackEvent at the beginning of knockBack in EntityLivingBase
It's missing from here
https://github.com/TeamGalacticraft/Galacticraft-Legacy/blob/master/src/main/java/micdoodle8/mods/galacticraft/core/entities/player/PlayerServer.java#L128
I assume adding this to the beginning of the function would fix it
LivingKnockBackEvent event = ForgeHooks.onLivingKnockBack(player, p_70653_1_, p_70653_2_, impulseX, impulseZ); if(event.isCanceled()) return;
I've added the event to PlayerServer, I ran a test with and without the mod you mentioned but since most of the video examples show slowed down footage just to tell the difference it's not a major issue for me to go that far, so your free to test and let me know.
you can download the preview with the update here
https://github.com/TeamGalacticraft/Galacticraft-Legacy/actions/runs/2563235252