diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 8976c23d5..dfb5a3ad2 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -2,7 +2,7 @@ name: Bug Report about: Report a Bug or an Issue with Slimefun 4. title: '' -labels: Bug Report +labels: '🐞 Bug Report' assignees: '' --- diff --git a/.github/renovate.json b/.github/renovate.json index 2334b50bf..c74f8617a 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -2,9 +2,7 @@ "extends": [ "config:base" ], - "assignees": [ - ], "labels": [ - "Dependency Update" + "🚨 Dependency Update" ] } diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index 44a48b4df..09cd99483 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -26,4 +26,4 @@ jobs: with: token: ${{ secrets.ACCESS_TOKEN }} issue_number: ${{ github.event.pull_request.number }} - labels: 'Translations Update' + labels: '📄 Translations Update' diff --git a/.github/workflows/close-invalid-issues.yml b/.github/workflows/close-invalid-issues.yml index 7122b36cf..705f6ab9a 100644 --- a/.github/workflows/close-invalid-issues.yml +++ b/.github/workflows/close-invalid-issues.yml @@ -10,7 +10,7 @@ jobs: name: Invalid Issues runs-on: ubuntu-latest - if: contains(github.event.issue.labels.*.name, 'Bug Report') == false && contains(github.event.issue.labels.*.name, 'Hacktoberfest') == false + if: contains(github.event.issue.labels.*.name, '🐞 Bug Report') == false && contains(github.event.issue.labels.*.name, 'Hacktoberfest') == false steps: - name: Close Issue uses: maxkomarychev/octions/octions/issues/update@master diff --git a/.github/workflows/duplicates.yml b/.github/workflows/duplicates.yml index 9dfa9d19a..a8883a408 100644 --- a/.github/workflows/duplicates.yml +++ b/.github/workflows/duplicates.yml @@ -18,4 +18,4 @@ jobs: with: token: ${{ secrets.ACCESS_TOKEN }} issue_number: ${{ github.event.issue.number }} - labels: 'Duplicate' + labels: '🚩 Duplicate' diff --git a/.github/workflows/merge-conflicts.yml b/.github/workflows/merge-conflicts.yml index c8aaaec14..71b8d025f 100644 --- a/.github/workflows/merge-conflicts.yml +++ b/.github/workflows/merge-conflicts.yml @@ -14,5 +14,5 @@ jobs: steps: - uses: mschilde/auto-label-merge-conflicts@master with: - CONFLICT_LABEL_NAME: 'Merge Conflicts' + CONFLICT_LABEL_NAME: '⚡ Merge Conflicts' GITHUB_TOKEN: "${{ secrets.ACCESS_TOKEN }}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 18839ff48..0986f3ce0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ #### Fixes * Fixed a couple of compatibility issues with ItemsAdder * Fixed #2575 +* Fixed ghost blocks to some extent (ghost blocks will now drop and be replaced) ## Release Candidate 18 (03 Dec 2020) diff --git a/pom.xml b/pom.xml index dcb7c65d9..b4d856e7c 100644 --- a/pom.xml +++ b/pom.xml @@ -380,7 +380,7 @@ com.gmail.nossr50.mcMMO mcMMO - 2.1.159 + 2.1.161 provided diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java index 85d2b07d2..c9c6f4c97 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java @@ -38,10 +38,11 @@ import me.mrCookieSlime.Slimefun.api.Slimefun; /** * The {@link BlockListener} is responsible for listening to the {@link BlockPlaceEvent} * and {@link BlockBreakEvent}. - * + * * @author TheBusyBiscuit * @author Linox - * + * @author Patbox + * * @see BlockPlaceHandler * @see BlockBreakHandler * @see ToolUseHandler @@ -60,7 +61,20 @@ public class BlockListener implements Listener { * While this can cause ghost blocks it also prevents them from replacing grass * or saplings etc... */ - if (BlockStorage.hasBlockInfo(e.getBlock())) { + Block block = e.getBlock(); + + if (e.getBlockReplacedState().getType().isAir()) { + SlimefunItem sfItem = BlockStorage.check(block); + + if (sfItem != null) { + for (ItemStack item : sfItem.getDrops()) { + if (item != null && !item.getType().isAir()) { + block.getWorld().dropItemNaturally(block.getLocation(), item); + } + } + BlockStorage.clearBlockInfo(block); + } + } else if (BlockStorage.hasBlockInfo(e.getBlock())) { e.setCancelled(true); } } @@ -177,7 +191,7 @@ public class BlockListener implements Listener { * This method checks for a sensitive {@link Block}. * Sensitive {@link Block Blocks} are pressure plates or saplings, which should be broken * when the block beneath is broken as well. - * + * * @param p * The {@link Player} who broke this {@link Block} * @param b