From 6d19239db76204ec071a84ac6184b55dfaac8e46 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sat, 23 Mar 2019 18:09:29 -0700 Subject: [PATCH] Don't add drops for items with a quantity of zero --- src/main/java/com/gmail/nossr50/listeners/BlockListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index 4c80a3204..1a70d2975 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -61,6 +61,10 @@ public class BlockListener implements Listener { for(Item item : event.getItems()) { ItemStack is = new ItemStack(item.getItemStack()); + + if(is.getAmount() <= 0) + continue; + if(event.getBlock().getState().getMetadata(mcMMO.doubleDropKey).size() > 0) event.getBlock().getState().getWorld().dropItemNaturally(event.getBlockState().getLocation(), is); else if(event.getBlock().getState().getMetadata(mcMMO.tripleDropKey).size() > 0)