1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00
This commit is contained in:
TheBusyBiscuit 2021-03-01 09:30:38 +01:00
parent 84ad08be37
commit 51b56b1e0b
2 changed files with 5 additions and 3 deletions

View File

@ -46,6 +46,7 @@
* Fixed a duplication glitch with the Woodcutter Android
* Fixed #2839
* Fixed #2849
* Fixed #2851
## Release Candidate 20 (30 Jan 2021)

View File

@ -6,8 +6,8 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
import org.bukkit.block.Chest;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler;
@ -48,8 +48,9 @@ public class OutputChest extends SimpleSlimefunItem<BlockBreakHandler> {
Block b = e.getBlock();
BlockState state = PaperLib.getBlockState(b, false).getState();
if (state instanceof InventoryHolder) {
for (ItemStack stack : ((InventoryHolder) state).getInventory()) {
if (state instanceof Chest) {
// Fixes #2851 - Only drop the actual BlockInventory
for (ItemStack stack : ((Chest) state).getBlockInventory()) {
if (stack != null && !stack.getType().isAir()) {
drops.add(stack);
}