-
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 not dropping sensitive blocks once and for all #4200
Open
EpicPlayerA10
wants to merge
10
commits into
Slimefun:master
Choose a base branch
from
EpicPlayerA10:fix/not-dropping-sensitive-blocks
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix not dropping sensitive blocks once and for all #4200
EpicPlayerA10
wants to merge
10
commits into
Slimefun:master
from
EpicPlayerA10:fix/not-dropping-sensitive-blocks
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/4200/fefff5b6
|
JustAHuman-xD
requested changes
May 30, 2024
...n/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockPhysicsListener.java
Outdated
Show resolved
Hide resolved
...n/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockPhysicsListener.java
Outdated
Show resolved
Hide resolved
TheBusyBot
added
the
⚡ Merge Conflicts
This Pull Request has merged conflicts which need to be resolved!
label
Sep 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
✨ Fix
This Pull Request fixes an issue.
⚡ Merge Conflicts
This Pull Request has merged conflicts which need to be resolved!
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values