Closed obj-obj closed 4 years ago
Ok I broke entity attacks (entites cannot attack at all) Gotta fix that
Please note that the original ForgeHooks returns the inverse of what the method on EntityEvents returns, which is almost certainly why this is breaking as you didn't account for it.
for SOME REASON
when a specific line of code is MinecraftForge.EVENT_BUS.post(new LivingAttackEvent(entity, src, damage))
, players can't attack
But when it's !(!MinecraftForge.EVENT_BUS.post(new LivingAttackEvent(entity, src, damage)))
, players can attack
My brain hurts
I need to actually learn how forge works before I try to fix bugs lmao
For the record, @obj-obj, afaict all you needed was as extra inversion there.
Patchwork's version of that hook doesn't seem to follow the same convention as Forge's version (specifically, one returns the inverse of the other). That might be worth fixing too (at it's callsites) but as I don't think I was the one to put those hooks in place, I can't speak for why they don't follow forge.
This is my first contribution :)