-
Notifications
You must be signed in to change notification settings - Fork 549
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
Fix sensitive blocks attached to sf blocks not dropping (1.19+) #3966
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/3966/f3861ebd
|
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.
Won’t this create a ghost block if the sensitive block is a Slimefun block?
If it does now then it already did before this change. The only extra thing I do now is drop the items of sensitive blocks that get destroyed. Also the only 2 sensitive blocks in Slimefun are the elevator plate and teleportation matrix activator and those get handled by This new method could serve as the more inclusive replacement for |
if (Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_19)) { | ||
return blockData.isSupported(block); | ||
} else { | ||
// TODO: Make 1.16-1.18 version. BlockData::isSupported is 1.19+. |
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.
is this todo for this PR or later?
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.
I wasn't planning on making that in this pr and I doubt anyone else will, so worst case scenario this is a fix for only 1.19+ and the version check can be removed when we drop support for 1.18.
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.
Im fine with that. We then have solved the issue for over 75% of the servers atleast
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.
Looks fine but just to be safe I added a test request. @Slimefun/bug-testers if you could please confirm this works in 1.19+ and creates no other issues we might have missed that would be awesome
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, build test passed. Tested on Paper 1.19.4-550 and Paper 1.20.2-318
Description
When you would break a Slimefun block any sensitive blocks attached to it would be destroyed, but not drop their item.
This fix only works for 1.19+, but that accounts for 4/5 of all Slimefun servers. Feel free to suggest a 1.16-1.18 version.
Proposed changes
Recursively check all attached sensitive blocks and drop them if they should be, while respecting
max-chained-neighbor-updates
inserver.properties
.Related Issues (if applicable)
Resolves #3182
Resolves #3831
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values