Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add block dig time recalculation #94

Open
zardoy opened this issue Dec 17, 2023 · 1 comment
Open

Add block dig time recalculation #94

zardoy opened this issue Dec 17, 2023 · 1 comment

Comments

@zardoy
Copy link
Contributor

zardoy commented Dec 17, 2023

It's pretty common to have conditions for calculating dig time to be changed. The vanilla behavior is to just change the digging speed without resetting the digging progress, thus an event should be added.

For things like interactive clients (p viewer) this is super important. For example, when you dig down, the dig time is calculated taking into account the fact you are currently in the air but it doesn't get changed when you fall to the ground which makes digging time desync.

@zardoy
Copy link
Contributor Author

zardoy commented Jan 3, 2024

For things like interactive clients (p viewer) this is super important

I think I'm going to change the logic in prismarine web client so it ignores dig time and instead uses block_break_animation packet to update the progress (blockBreakProgressObserved event). and blockBreakProgressEnd to actually update the block (remove from the world). I guess this is more correct behavior that should also be used in mineflayer as the server can simply cancel block breakage for some reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant