mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixes #2851
This commit is contained in:
parent
84ad08be37
commit
51b56b1e0b
@ -46,6 +46,7 @@
|
|||||||
* Fixed a duplication glitch with the Woodcutter Android
|
* Fixed a duplication glitch with the Woodcutter Android
|
||||||
* Fixed #2839
|
* Fixed #2839
|
||||||
* Fixed #2849
|
* Fixed #2849
|
||||||
|
* Fixed #2851
|
||||||
|
|
||||||
## Release Candidate 20 (30 Jan 2021)
|
## Release Candidate 20 (30 Jan 2021)
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ import javax.annotation.ParametersAreNonnullByDefault;
|
|||||||
|
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
|
import org.bukkit.block.Chest;
|
||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
import org.bukkit.inventory.InventoryHolder;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler;
|
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler;
|
||||||
@ -48,8 +48,9 @@ public class OutputChest extends SimpleSlimefunItem<BlockBreakHandler> {
|
|||||||
Block b = e.getBlock();
|
Block b = e.getBlock();
|
||||||
BlockState state = PaperLib.getBlockState(b, false).getState();
|
BlockState state = PaperLib.getBlockState(b, false).getState();
|
||||||
|
|
||||||
if (state instanceof InventoryHolder) {
|
if (state instanceof Chest) {
|
||||||
for (ItemStack stack : ((InventoryHolder) state).getInventory()) {
|
// Fixes #2851 - Only drop the actual BlockInventory
|
||||||
|
for (ItemStack stack : ((Chest) state).getBlockInventory()) {
|
||||||
if (stack != null && !stack.getType().isAir()) {
|
if (stack != null && !stack.getType().isAir()) {
|
||||||
drops.add(stack);
|
drops.add(stack);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user