use of net.glowstone.inventory.MaterialMatcher in project Glowstone by GlowstoneMC.
the class BlockContainer method getDrops.
@NotNull
@Override
public Collection<ItemStack> getDrops(GlowBlock block, ItemStack tool) {
Collection<ItemStack> drops = getContentDrops(block);
MaterialMatcher neededTool = getNeededMiningTool(block);
if (neededTool == null || !InventoryUtil.isEmpty(tool) && neededTool.matches(InventoryUtil.itemOrEmpty(tool).getType())) {
drops.addAll(getBlockDrops(block));
}
return drops;
}
Aggregations