NoCheatPlus / Issues

Issues managment for the NoCheatPlus project.
13 stars 9 forks source link

INVENTORY_FASTCONSUME false positive while eating bread #426

Open MyPictures opened 7 years ago

MyPictures commented 7 years ago

Short description of the issue.

INVENTORY_FASTCONSUME false positive while eating a bread (inconsistent). I was in a parkour map and took some fall damage, so I wanted to replenish my hunger and started eating bread while also walking at the same time.

Complete output of the ncp version command (please prefer text here).

12:58:30 INFO: ---- Version information ---- 12:58:30 INFO: #### Server #### 12:58:30 INFO: git-Spigot-a3f6ea5-a2af8f0 ~MC: 1.11.2~ 12:58:30 INFO: detected: 1.11.2 12:58:30 INFO: #### NoCheatPlus #### 12:58:30 INFO: Plugin: 3.15.2-SNAPSHOT-sMD5NET-b1089 12:58:30 INFO: MCAccess: 1.11-1.11.2 / Spigot-CB-1.11_R1

12:58:30 INFO: blocks: BlocksMC1_4 | BlocksMC1_5 | BlocksMC1_6_1 | BlocksMC1_7_2 | BlocksMC1_8 | BlocksMC1_9 | BlocksMC1_10 | BlocksMC1_11 12:58:30 INFO: checks: FastConsume | Gutenberg | HotFixFallingBlockPortalEnter | AttackFrequency | FlyingFrequency | KeepAliveFrequency 12:58:30 INFO: defaults: pvpKnockBackVelocity 12:58:30 INFO: packet-listeners: DebugAdapter | UseEntityAdapter | MovingFlying | OutgoingPosition | KeepAliveAdapter | SoundDistance 12:58:30 INFO: Hooks: AllViolations~NCP~ 1.0 | TestNCPHook 1.0 12:58:30 INFO: #### Related Plugins #### 12:58:30 INFO: ProtocolLib v4.2.1

How to reproduce the issue (is it random / always happens / side conditions)?

Seems like latency is required for it and maybe something else. I attached 2 debug logs for further examination.

Have you made any (noteworthy) changes to the default configuration of NCP?

Enabled some debug settings as well as logging in folders. Was created and saved by NC+ 1085

Do you run any other special plugins that affect game mechanics next to NC+ (adding skills, machines, adding/changing blocks, other anti cheating)?

No. Just ProtocolLib and EssentialsX

Provide additional information, such as error/debug/violation logs. (For reproducible issues with moving consider: https://github.com/NoCheatPlus/Docs/wiki/Debugging#on-the-fly-debug-output-for-individual-players) Use GitHub gists or http://pastebin.com/ or similar for huge logs, or attach a (zip-) file here. For image uploads, please prefer a site that allows viewing without JavaScript, you can upload file attachments for issues right here.

FastConsumeLogs.zip

CaptainObvious0 commented 7 years ago

Does adjusting the FastConsume value in the config make a difference?

asofold commented 7 years ago

Swift look at one spot: The log states a null item stored - meaning the item interacted with either did not get set (off hand issue? / other), or it did get reset. Resetting could happen with all sorts of things, e.g. changing the hotbar slot, causing another interact event (pressure plates)?

So @CaptainObvious0 ... those cases likely can't be patched with altering values.

Will need to have a closer look. Perhaps i'm also going to use BlockInteractData to store everything about interaction, which would shift around a lot of things, demanding for more testing.

asofold commented 7 years ago

Making it somewhat patchable via configuration is possible, at the cost of always allowing the first item of a series of item-uses to be consumed instantly (compare to the 'strict' flag with instantbow).

MyPictures commented 7 years ago

@CaptainObvious0 I do not think so, without having to lower strictness of the check as @asofold stated.

@asofold Yes pressure plates were used and I did switch quickly to the bread and started eating it. After it failed 1 time I waited a little (1 second) and then tried to eat again, that worked.

asofold commented 7 years ago

So it's inventory.fastconsume with pressure plates (only!)?

MyPictures commented 7 years ago

@asofold That is kinda really hard to reproduce. Not sure if it was just lag?

asofold commented 7 years ago

Lag - by itself unlikely. The reason for the check triggering is that the interaction data (item to eat...) somehow got reset. I don't see how pressure plates are in it (unless they fire a different action than PHYSICAL), this would need to somehow extend logging (all types and actions for interaction) and also log resetting, so we get an idea why/where this happens.

Perhaps on that/some version of minecraft repeated interaction happens for some reason and the item gets reset - now again, this would mean that the item gets consumed without firing an event and then an interaction event fires resetting the item and then the item consume event fires with no item set. ... obviously i'm at guessing :p.