PaperMC / Paper

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

BlockDamageEvent not fires after clicking in the air and holding the left button #10257

Open exzolink opened 6 months ago

exzolink commented 6 months ago

Expected behavior

Should fire BlockDamageEvent when we start breaking a block by holding the left button after clicking in the air.

Observed/Actual behavior

Video

Steps/models to reproduce

1) Listen to BlockDamageEvent 2) Click in the air and hold the left button 3) Break some block 4) Event not fired

Plugin and Datapack List

Server Plugins (7): Bukkit Plugins: FastAsyncWorldEdit, LiteAntiCheat, ProtocolLib, Terra, TileCulling, ViaBackwards, ViaVersion

Paper version

This server is running Paper version git-Paper-426 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 7ccefdc)

Other

No response

lynxplay commented 6 months ago

This seems like a work as intended. You are still breaking the same block. This is a quirk in the client, but it simply does not send the start destroy block player action packet.

There is little to none we can effectively do here. The server does not know you are trying to break that block, at least not in the relevant packet. The block is broken because the client sends the STOP_DESTROY_BLOCK action at the end and enough time has passed since its initial START_DESTROY_BLOCK action.

The only reason this works in the first place is because the server currently simply does not check if the client is isDestroyingBlock on the server end when it sends a STOP_DESTROY_BLOCK action.

Maintaining a fix for this seems terribly difficult for what is a client bug that I guess we should poke mojang about ?

Not closing this rn, would want some more opinions on this :+1: