Open Wyatt-Stanke opened 1 year ago
This is actually a bug in the Minecraft client and is out of our control unfortunately. I would leave a link to the issue in the Minecraft bug tracker here, but I can't find it right now.
We can leave this issue open until it's fixed by Mojang.
Valence Version
8897eeacb9104e404f91b529bc0488ef313aa694 (latest as of date of issue)
What You Did
I have code to listen for when a block is mined. It works fine for blocks take time to mine, but if a block instant mines (for example, wheat), the Stop event is not fired. This problem also happens in this example: https://github.com/valence-rs/valence/blob/main/crates/valence/examples/building.rs
What Went Wrong
I expected for when a block is insta-broken for it to fire an event with the state
DiggingState::Stop
.Additional Information
The reason why this is happening is because the
DiggingState::Stop
event is not firing. https://github.com/valence-rs/valence/blob/main/crates/valence/examples/building.rs has this bug. A quick workaround I used is to check if the block is an insta-breakable block or the event state isDiggingState::Stop
Screen recording: https://github.com/valence-rs/valence/assets/47758296/524e9b88-a039-488a-8956-406b417b9641