mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-24 17:47:44 +01:00
Don't add drops for items with a quantity of zero
This commit is contained in:
parent
faab64864a
commit
6d19239db7
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user