Skip to content
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

Fixed vanilla sensitive blocks #4050

Merged
merged 3 commits into from
Dec 9, 2023
Merged

Fixed vanilla sensitive blocks #4050

merged 3 commits into from
Dec 9, 2023

Conversation

Sfiguz7
Copy link
Member

@Sfiguz7 Sfiguz7 commented Dec 9, 2023

Description

Sensitive blocks were an issue, they were "fixed" a couple of times (#3966, #4048) and then we reverted the changes as it was a mess (#4049).
This now solves the issue for good in terms of vanilla sensitive blocks.

Proposed changes

Only drop items when BlockBreakEvent.isDropItems() is false, as otherwise we get double vanilla drops
Check around the block for sensitive blocks up until the max chained amount

Related Issues (if applicable)

Resolves #3182
Resolves #3831

Checklist

  • 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.*).
  • I followed the existing code standards and didn't mess up the formatting.
  • I did my best to add documentation to any public classes or methods I added.
  • I have added Nonnull and Nullable annotations to my methods to indicate their behaviour for null values
  • I added sufficient Unit Tests to cover my code.

@Sfiguz7 Sfiguz7 requested a review from a team as a code owner December 9, 2023 17:26
@github-actions github-actions bot added the ✨ Fix This Pull Request fixes an issue. label Dec 9, 2023
Copy link
Contributor

github-actions bot commented Dec 9, 2023

Your Pull Request was automatically labelled as: "✨ Fix"
Thank you for contributing to this project! ❤️

Copy link
Contributor

github-actions bot commented Dec 9, 2023

Slimefun preview build

A Slimefun preview build is available for testing!
Commit: b9335cdf

https://preview-builds.walshy.dev/download/Slimefun/4050/b9335cdf

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!

Copy link

sonarqubecloud bot commented Dec 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@J3fftw1 J3fftw1 added the Build tested Used to indicate the PR preview build has been tested by one of the team label Dec 9, 2023
Copy link
Contributor

@JustAHuman-xD JustAHuman-xD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praying

@Sfiguz7 Sfiguz7 merged commit 76d96bc into master Dec 9, 2023
16 checks passed
@Sfiguz7 Sfiguz7 deleted the fix/sensitive_blocks_v2 branch December 9, 2023 17:43
@100petr 100petr mentioned this pull request Dec 23, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build tested Used to indicate the PR preview build has been tested by one of the team ✨ Fix This Pull Request fixes an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Signs attached to custom blocks don't drop Block Placer makes blocks vanish
3 participants