-
Notifications
You must be signed in to change notification settings - Fork 546
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
exploded sf blocks now drop their sf item #3929
base: master
Are you sure you want to change the base?
Conversation
Your Pull Request was automatically labelled as: "✨ Fix" |
Slimefun preview buildA Slimefun preview build is available for testing! https://preview-builds.walshy.dev/download/Slimefun/3929/a18957ab
|
...ain/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/ExplosionsListener.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Style guidelines thing, otherwise looks good to me, can we get testing on this, feels like a big change, even if it's small code wise
...java/io/github/thebusybiscuit/slimefun4/implementation/handlers/SimpleBlockBreakHandler.java
Outdated
Show resolved
Hide resolved
Co-authored-by: JustAHuman-xD <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
i built a wall of 5x5 slimefun items. I hit the center with the upgraded explosive pickaxe from fluffy machines and only the center block dropped. however using the core slimefun explosive pickaxe (3x3) everything dropped as expected and stayed slimefun items. creeper explosions and tnt did not drop any slimefun blocks, nor were the blocks damaged. that doesn't seem like that should be the case. if a vanilla block explodes, so should the slimefun block |
I just tested this again, and for me the blocks were broken and dropped for the explosive pickaxe, tnt and creepers. SlimefunItem sfItem = BlockStorage.check(b);
// Don't break SF blocks
if (sfItem != null) {
return;
} |
in doing additional testing, some slimefun items broke, where others do not. core slimefun that broke were regulators and cargo and core machines. addon blocks that i tested didnt break. so far i can't get any addon blocks to drop. |
The way it's implemented now allows devs to choose what behaviour they want. This pr changes |
whichever way the team wants to go. just providing testing results. thanks itwins |
And thank you a lot for testing 😁 !! |
it doesnt seem to work for me. |
Description
Slimefun blocks didn't drop when exploded because the
drops
argument inBlockBreakHandler::onExplode
did nothing.Proposed changes
Pass theSlimefunItem
to thehandleEplosion
method inExplosionsListener.java
and drop the item there.Other changes:Removed unused import.I didn't change the method signature forBlockBreakHandler::onExplode
since it's a public method and that seemed like a bad idea to change.EDIT: Changed approach completely. Now added drops logic to
SimpleBlockBreakHandler::onExplode
.Related Issues (if applicable)
Resolves #3601
Also resolves Slimefun blocks not dropping from explosions, but somehow there was no issue open
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values