Fixes Explosive pickaxe not properly dropping blocks
Description
When using an ExplosiveTool to break vanilla blocks in the vicinity of Slimefun Blocks, drops from the vanilla block would disappear. This adds back those drops.
ASKING FOR OTHER PEOPLE TO TEST ANYWAY BUT BELOW IS WHAT I TESTED Tested in 1.20 the following towers of blocks (listing bottom to top, breaking the middle one)
-
Acontainer with items inside, vanilla block, sensitive blocks on both
-
Acontainer with items inside, vanilla container with items inside, sensitive blocks on both
-
Acontainer with items inside, shulker with items inside, sensitive blocks on both --> NO DUPES
-
Acontainer with items inside, vanilla ore, sensitive blocks on both, fortune on the explosive tool --> Multiple drops from the ore
-
All the above with Acontainer and vanilla swapped to reconfirm nothing broke
As Acontainer I have used an Electric Dust Washer, but they should all work the same. As vanilla containers I have used chests, furnaces, lecterns, chiseled bookshelves, jukeboxes, all filled.
Proposed changes
When drops are dropped, check if the main block broken was vanilla. If so, drop what it should.
Related Issues (if applicable)
#4051
Checklist
- [x] I have fully tested the proposed changes and promise that they will not break everything into chaos.
- [ ] I have also tested the proposed changes in combination with various popular addons and can confirm my changes do not break them.
- [ ] I have made sure that the proposed changes do not break compatibility across the supported Minecraft versions (1.16.* - 1.20.*).
- [x] I followed the existing code standards and didn't mess up the formatting.
- [x] I did my best to add documentation to any public classes or methods I added.
- [ ] I have added
NonnullandNullableannotations to my methods to indicate their behaviour for null values - [ ] I added sufficient Unit Tests to cover my code.
Your Pull Request was automatically labelled as: "✨ Fix" Thank you for contributing to this project! ❤️
Quality Gate passed
The SonarCloud Quality Gate passed, but some issues were introduced.
5 New issues
0 Security Hotspots
71.4% Coverage on New Code
0.0% Duplication on New Code
Slimefun preview build
A Slimefun preview build is available for testing! Commit: 68b223f5
https://preview-builds.walshy.dev/download/Slimefun/4062/68b223f5
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!
Quality Gate passed
Issues
9 New issues
Measures
0 Security Hotspots
71.4% Coverage on New Code
0.0% Duplication on New Code