pWn3d1337 / Techguns2

1.12 Port/Rewrite of Techguns mod for Minecraft. WIP
Other
77 stars 57 forks source link

Canceling LivingAttackEvent prevents other mods from responding #304

Open yeelp opened 3 months ago

yeelp commented 3 months ago

TG cancels LivingAttackEvent at high priority when TG based damage is inflicted. This prevents other mods from responding to that event, which seems unideal.

Take the mod I've developed; Distinct Damage Descriptions (DDD). It responds to LivingAttackEvent at lowest priority because it wants to respond last. But it doesn't get the chance, and so these two mods don't play well together. You can see the specific part of DDD where this occurs right here.

DDD needs the context of what TG is doing to the damage in order to respond properly. This is where I wonder why TG is canceling LivingAttackEvent. I'm not super familiar with the mod or the repo so I don't know why TG needs to cancel the event. I'd like to know why TG needs to cancel the event and if there is anything that can be done to get these mods working together.

pWn3d1337 commented 2 months ago

The cancellation is intended and needed to bypass the default processing.

yeelp commented 2 months ago

I understand cancelling is intended, but why does TG need to cancel? Are there other alternatives? It seems like doing so really shuts out mod compatibility completely

pWn3d1337 commented 2 months ago

Because it needs to bypass the default damage function with it's own one