Paper icon indicating copy to clipboard operation
Paper copied to clipboard

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

Open exzolink opened this issue 1 year ago • 1 comments

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

exzolink avatar Feb 17 '24 03:02 exzolink

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:

lynxplay avatar Feb 19 '24 23:02 lynxplay