PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.75k stars 871 forks source link

feat: Add optimistic update for block placement #3391

Open zardoy opened 3 weeks ago

zardoy commented 3 weeks ago

This is what native client does. It is important if the ping is low and after placement, calculates physics correctly. If the placement is not allowed the block is still updated to air by the server.

Maybe it's worth adding it as a setting to not break existing behaviors, but I don't see a reason why it shouldn't be enabled by default .

zardoy commented 3 weeks ago

What version does this apply to and do you have a source for that?

I don't know how to find things in the native client source I could check it by launching the client. This was always the behaviour of minecraft client.