OldCombatMechanics

OldCombatMechanics

46.1k Downloads

Golden Apples continually subtract from inventory

awgybop1 opened this issue ยท 8 comments

commented

Information

  • Server Version: PaperSpigot 1.16.5

  • OldCombatMechanics version: 1.9.0

  • Server Log File: There is no information contained within this log file of any errors with the plugin.

  • OldCombatMechanics config file: https://pastebin.com/jT56E6wj

Problem Description

When eating Golden Apples, sometimes they will continue to be subtracted from your inventory after eating just one.

Here is a video showing the glitch occuring, as you can see it's very inconsistent.
I completely disabled the option in the config and wrote my own system because this bug was very annoying, but even with the config option disabled, you can see the problem still occurs.

https://www.youtube.com/watch?v=jqcgwxvFJjw

commented

I cannot reproduce this in any way, and 1.8 clients are not supported anyway. If this problem arises again, please open a new issue with enough detail to be able to replicate it.

commented

I believe this may be related to issue #405

commented

Found out how to make it consistent, right-click a Super Golden Apple in Creative Mode (just one time!) and it will continuously subtract. So this tells me it isn't with the consume event, just the clicking event of the Golden Apple. Quite strange?

commented

UPDATE: Looks like this was due to a patch I had made to get Gapples to work with the module disabled.
For some reason, the server shows to other players I constantly eating the Golden Apples when I am no-longer right clicking on them, and my patch was looping causing the Golden Apples to subtract from my inventory even in creative. Very strange that I could consume a Golden Apple in Creative Mode, my patch should not trigger at all..

commented

Nope, none at all. All I did was use the PlayerItemConsumeEvent, cancel the event, remove the item from the inventory, and then apply the classic (Minecraft 1.8) potion effects to the player.

commented

What exactly did you patch? Did you do any packet manipulation?

commented

I think OCM cancels and re-applies the effects of that event too, doing that twice would indeed cause issues!

commented

I'm running into this same issue actually. I've disabled and remade a lot of the modules in OCM due to an issue with eating being interrupted by damage (I believe it's the old damage modules), but this still happens. It seems like 1.8 clients just don't handle that event getting cancelled properly.