Open EpicPlayerA10 opened 4 months ago
Your Pull Request was automatically labelled as: "✨ Fix" Thank you for contributing to this project! ❤️
A Slimefun preview build is available for testing! Commit: fefff5b6
https://preview-builds.walshy.dev/download/Slimefun/4200/fefff5b6
Note: This is not a supported build and is only here for the purposes of testing. Do not run this on a live server and do not report bugs anywhere but this PR!
Description
Fixed not dropping sensitive blocks once and for all
Proposed changes
This PR takes a different approach from all other solutions. It listens for
BlockPhysicsEvent
which fires before block update. Inside listener it checks if block can be placed in the location where event was fired. This is the best method to listen for collapsing sensitive blocks without a headache withSENSITIVE_MATERIALS
tag.The only downside of this solution is that it require at least version 1.18 because it uses
BlockData#isSupported
method.Related Issues (if applicable)
3182
3831
3009
4069
4037
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values