You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 3, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 3, 2024. It is now read-only.
Forge distinguishes between "onLivingAttack" and "onPlayerAttack" while patchwork doesn't. #114
The LivingEntity mixin ends up not checking if the entity is instanceof PlayerEntity while forge does. For all I know there's a reason for this, but it's not documented if there is a reason.
To be clear: The reason I opened this issue was because I saw it while implementing the god-classes module, which raised some questions that were not on scope for those PRs. It's my fault for not laying out those questions:
Why does Forge do this?
Is there a reason why Patchwork doesn't do this? (thus the issue)
If the first question has a reasonable answer, and the answer to the second question is "no", then fixing it certainly makes sense.
The god-classes module is unaffected either way as I simply added the instanceof check to the relevant method in ForgeHooks.
(this comment brought to you by: discussion of whether a fix for this issue is actually needed or not)
After learning a bit about forge's event system and looking at it again, I don't actually think this issue actually does need to be fixed, as entity attacks just break when you try to, and it's already implemented in ForgeHooks anyway.
@obj-obj I know exactly why your attempt is breaking, I've even told you exactly why it's breaking on the PR. That is irrelevant to whether this issue should or should not be fixed.
YarnForge's ForgeHooks:
Patchwork's EntityEvents:
The LivingEntity mixin ends up not checking if the entity is
instanceof PlayerEntitywhile forge does. For all I know there's a reason for this, but it's not documented if there is a reason.