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

Data does not get removed from blocks that are indirectly broken #6

Open
SirMrStep opened this issue Jun 29, 2022 · 4 comments
Open

Comments

@SirMrStep
Copy link

I've noticed that for blocks like cactus where when the bottom block get's broken all the cactus blocks above break, the data will not get removed from the block and stays there until something is either placed in it's location or it is manually removed. To fix this I suggest getting the cactus blocks above the broken cactus and removing data from them if they have any.

@mfnalex
Copy link
Owner

mfnalex commented Jun 29, 2022

Noted. IIRC there's some event for that but I currently don't remember the name. I'm on vacation anyway until july 17th, so feel free to PR if you don't wanna wait :P

@SirMrStep
Copy link
Author

There is a BlockGrowEvent but I have no idea when that was added to the api so for the sake of backwards compatibility (if you care about that) I'd just grab the blocks above. I can make a quick and dirty PR for this issue and the other one I posted. They will be done in a bit.

@SirMrStep
Copy link
Author

Turns out you were right, BlockPhysicsEvent can capture any blocks updated or broken in any way. Made a pull request fixing both this and #7

@mfnalex
Copy link
Owner

mfnalex commented Jul 10, 2022

Thanks, I'll merge this after having tested it after my vacation

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

2 participants