Skip to content

Commit

Permalink
Update BlockListener.java
Browse files Browse the repository at this point in the history
fix for issue Slimefun#3831
fixed by setting the block to air and reenabling regular drops
  • Loading branch information
Lolboer9999999 authored Jun 1, 2023
1 parent 85763d2 commit cb1a1e1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ private void dropItems(BlockBreakEvent e, List<ItemStack> drops) {
// Fixes #2560
if (e.isDropItems()) {
// Disable normal block drops
e.setDropItems(false);
// replace broken block with air so connected blocks (like signs) can drop, Fixes #3831
e.setCancelled(true);
e.getBlock().setType(Material.AIR);
e.setDropItems(true);

for (ItemStack drop : drops) {
// Prevent null or air from being dropped
Expand Down

0 comments on commit cb1a1e1

Please sign in to comment.