mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Merge branch 'master' into refactoring/third-party-integrations
This commit is contained in:
commit
3acd6926ad
2
.github/ISSUE_TEMPLATE/bug-report.md
vendored
2
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@ -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: ''
|
||||
|
||||
---
|
||||
|
4
.github/renovate.json
vendored
4
.github/renovate.json
vendored
@ -2,9 +2,7 @@
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"assignees": [
|
||||
],
|
||||
"labels": [
|
||||
"Dependency Update"
|
||||
"🚨 Dependency Update"
|
||||
]
|
||||
}
|
||||
|
2
.github/workflows/auto-approve.yml
vendored
2
.github/workflows/auto-approve.yml
vendored
@ -26,4 +26,4 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
issue_number: ${{ github.event.pull_request.number }}
|
||||
labels: 'Translations Update'
|
||||
labels: '📄 Translations Update'
|
||||
|
2
.github/workflows/close-invalid-issues.yml
vendored
2
.github/workflows/close-invalid-issues.yml
vendored
@ -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
|
||||
|
2
.github/workflows/duplicates.yml
vendored
2
.github/workflows/duplicates.yml
vendored
@ -18,4 +18,4 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
issue_number: ${{ github.event.issue.number }}
|
||||
labels: 'Duplicate'
|
||||
labels: '🚩 Duplicate'
|
||||
|
2
.github/workflows/merge-conflicts.yml
vendored
2
.github/workflows/merge-conflicts.yml
vendored
@ -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 }}"
|
||||
|
@ -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)
|
||||
|
||||
|
2
pom.xml
2
pom.xml
@ -380,7 +380,7 @@
|
||||
<dependency>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>2.1.159</version>
|
||||
<version>2.1.161</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user