PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
10.03k stars 2.33k forks source link

Sending ClientboundContainerSetSlotPacket does not wait cooldown on the client #10376

Open exzolink opened 7 months ago

exzolink commented 7 months ago

Expected behavior

Don't send packet if client not really set item in slot.

Observed/Actual behavior

Video

Steps/models to reproduce

Listen to ClientboundContainerSetSlotPacket and fast click item in any inventory

Plugin and Datapack List

Bukkit Plugins: FastAsyncWorldEdit, ProtocolLib, SkydustryCore, Terra, Vault, ViaBackwards, ViaVersion

Paper version

This server is running Paper version git-Paper-463 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 45d1486)

Other

No response

Malfrador commented 6 months ago

What exactly is the bug you are experiencing here? Listening to packets is not part of the Paper API. If something behaves weirdly there or breaks, its due to whatever you or ProtocolLib are doing with that packet. I am also not really able to see any obvious issue in your video.

Generally, the server will send inventory packets more often than required in a lot of cases to reduce the potential of desync, so just the ClientboundContainerSetSlotPacket getting sent while not required is not something that needs to be fixed. We also would need to rule out that this is a ProtocolLib issue - sometimes just listening to a packet can have weird side effects. You could use a client-side packet logger for that.