pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.27k stars 1.54k forks source link

Block placement flickering while trying to place block too close to yourself #4924

Open ItsZodiaX opened 2 years ago

ItsZodiaX commented 2 years ago

Issue description

Steps to reproduce the issue

  1. Trying to place block under your feet or in front of your face

OS and versions

Plugins

Plugins (0):

https://cdn.discordapp.com/attachments/878545340058468412/956586777471234108/2565-03-24_23.13.58.png

Crashdump, backtrace or other files

PocketMine-MP : https://cdn.discordapp.com/attachments/878545340058468412/956585496505626714/2022-03-24_22-56-34.mp4 https://cdn.discordapp.com/attachments/878545340058468412/955953635450302474/Minecraft_2022.03.23_-_05.44.15.08.DVR_Trim.mp4

Alternative server software (Dragonfly) : https://cdn.discordapp.com/attachments/878545340058468412/956585775984705556/2022-03-24_23-04-10.mp4

dktapps commented 2 years ago

I've been aware of this issue for a while.

Other servers have worked around this issue by avoiding resends if the collision boxes of the placed block overlap with that of the player. However, this is not a reliable solution because it assumes that PM has perfect vanilla knowledge. Any mismatch would result in ghost blocks instead of flickering, which is arguably worse.

Any other potential solution would require some kind of throttling of the right-click spam to avoid the spammy block resends that cause this problem.

ItsZodiaX commented 2 years ago

Does holding count as spamming? Because i was holding the right click in the video.

dktapps commented 2 years ago

Yes. The client continuously sends "right click" interactions while you're holding down the right clicker, regardless of whether something would actually result from doing so.

ItsZodiaX commented 2 years ago

So what we should do is a rework on hacky method that prevent right click spamming?

dktapps commented 2 years ago

Not exactly. If the hack that PM currently uses was removed, the problem would be worsened.

ItsZodiaX commented 2 years ago

So this issue can not be fixed with code?

dktapps commented 2 years ago

A perfect solution for this is not possible with current protocol, only workarounds.

ItsZodiaX commented 2 years ago

Thanks for the info. Hopefully this issue can be fixed in this nearly future. You can close this issue.