HungerOverhaul icon indicating copy to clipboard operation
HungerOverhaul copied to clipboard

Fix event handlers (like PlayerInteractEvent) not respecting current event state

Open squeek502 opened this issue 9 years ago • 4 comments

Right now, for many event handlers in HO, the relevant states of the event (isCanceled(), getResult()) is not checked before the logic is executed. This decreases compatibility with other mods significantly.

Would fix ForgeEssentials/ForgeEssentials#1966

squeek502 avatar Feb 03 '16 06:02 squeek502

Is this the reason when I eat food, it ends up reappearing in my inventory?

cap10zeus avatar May 02 '16 19:05 cap10zeus

Can't say for sure. That would be a server/client desync, but can't be certain of the cause.

squeek502 avatar May 02 '16 19:05 squeek502

@cap10zeus Are you using ForgeEssentials? If so, eating food and then it reappearing in your inventory is usually because the player doesn't have FE Perms to "use" the food "item". So, you eat it (client-side)… the server says "Nope, no perms"… and then the server puts it back in your inventory, and you didn't gain the hunger.

PitchBright avatar May 02 '16 19:05 PitchBright

Hmm, that makes sense. We don't have ForgeEssentials but we do have Thermos+ GriefPreventionPlus. It was doing it for awhile then it stopped, so it's just annoying that I can't figure out the cause. I will keep an eye on the perms though. Thanks for the advice. Oh and hi there PitchBright, we've crossed a few times now, lol.

cap10zeus avatar May 03 '16 01:05 cap10zeus