int dropMultiplier = getDropMultiplier();
float debrisYield = yield - debrisReduction;
for (Block block : blockList) {
BlockState blockState = block.getState();
if (BlockUtils.isOre(blockState)) {
ores.add(blockState);
}
else {
debris.add(blockState);
}
}
for (BlockState blockState : ores) {
if (Misc.getRandom().nextFloat() < (yield + oreBonus)) {
if (!mcMMO.getPlaceStore().isTrue(blockState)) {
xp += Mining.getBlockXp(blockState);
}
Misc.dropItem(blockState.getLocation(), blockState.getData().toItemStack(1)); // Initial block that would have been dropped
if (!mcMMO.getPlaceStore().isTrue(blockState)) {
for (int i = 1; i < dropMultiplier; i++) {
Mining.handleSilkTouchDrops(blockState); // Bonus drops - should drop the block & not the items
}
}
}
}
if (debrisYield > 0) {
for (BlockState blockState : debris) {
if (Misc.getRandom().nextFloat() < debrisYield) {
Misc.dropItems(blockState.getLocation(), blockState.getBlock().getDrops());
}
}
}
applyXpGain(xp, XPGainReason.PVE);