Eat event cancelled when damaged
poloaudmo opened this issue ยท 17 comments
Whenever a player takes damage from another player, the eat event resets.
Can an option be added to disable this feature?
Neither the old armour durability or old armour strength actually directly modify the inventory, so I don't see what those modules could have to do with this. The gapple module cancels the eat event in order to be able to apply the desired effects, which could cause problems on the client-side if the client hasn't realised the item was technically eaten. Technically the normal gapple effects haven't changed with 1.9, so if this is really a big problem we could make a separate listener for those and just leave the effects untouched. This, however, would not be possible with enchanted golden apples.
Yes, the eating animation is reset and the item is not consumed. Moreover, it's not only just by player damage but any type of damage whatsoever.
Alright, and is that not what it's meant to do? Surely, if you're damaged while eating you shouldn't be able to continue eating?
This was a combat mechanic of version 1.7 (as far as I remember) and was changed later such that a player could be able to eat even if they are taking damage.
Thank you for your quick responses!
This was a combat mechanic of version 1.7 (as far as I remember) and was changed later such that a player could be able to eat even if they are taking damage.
Thank you for your quick responses!
So, when was this changed, and from what functionality?
Okay, tbh I tested it out on 1.6-1.12 and the eat even doesn't cancel. But when using this plugin, the eat even cancels. I'm not sure if this might be a bug/introduced in a specific MC update or something. So, the eat even shouldn't reset upon taking damage but with this plugin it does reset. I think having an option which gives the players the ability to enable/disable this feature would be great.
Hey, if a user has all permissions, i.e, ' * '. Then upon eating while taking damage the eating action does seem to reset visually on screen but the item does get consumed. On average it take 1.61 seconds to eat most foods. For example, if a player is eating steak and taking damage then visually the eating animation would keep cancelling on his screen but if the right mouse button is held for 1.61 seconds then the item does get consumed. This only happens when the player has ' * ' permission though. I'm not sure if this is happening because having all permissions bypasses some features of the plugin or if there is some hidden permission specific to this.
Hey, if a user has all permissions, i.e, ' * '. Then upon eating while taking damage the eating action does seem to reset visually on screen but the item does get consumed. On average it take 1.61 seconds to eat most foods. For example, if a player is eating steak and taking damage then visually the eating animation would keep cancelling on his screen but if the right mouse button is held for 1.61 seconds then the item does get consumed. This only happens when the player has ' * ' permission though. I'm not sure if this is happening because having all permissions bypasses some features of the plugin or if there is some hidden permission specific to this.
I don't see how that's relevant at all, unless there's some other plugin conflicting. What other plugins do you have installed?
I do not have any plugins that affect combat mechanics, just this one. But still if it helps then this is my plugins list : https://gyazo.com/74c13c40015fbfa3f044f32159273bf1
@I-Al-Istannen wasn't an issue like this fixed with a patch of yours? Or am I misremembering?
I was trying to fix a bug where you could not hold down right click to consume apples (it would continuously show the animation but not do anything), but I never solved that one IIRC. After digging around in spigot / nms code for a few hours I got bored enough to stop it...
I don't think I have looked at this issue but maybe it is also related to cancelling some consume / right click event.
i also got this issue its stops above 1.12.2. only with ocm. if there is a fix i would like to know
btw this only happens when i have old-armour-durability:true
When i set it on false its fine
I cannot reproduce this bug at all. Are you saying this only happens when running Minecraft 1.12.2 and below? Is that a client of server version? Also, is it with any kind of damage, and is it with any kind of food?