Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
m1919810 committed Dec 29, 2024
1 parent e71dbda commit bcb5b38
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
import io.github.thebusybiscuit.slimefun4.utils.tags.SlimefunTag;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
Expand Down Expand Up @@ -38,13 +40,19 @@ public SmeltersPickaxe(ItemGroup itemGroup, SlimefunItemStack item, RecipeType r
if (SlimefunTag.SMELTERS_PICKAXE_BLOCKS.isTagged(b.getType())
&& !StorageCacheUtils.hasBlock(b.getLocation())) {
Collection<ItemStack> blockDrops = b.getDrops(tool);

List<ItemStack> itemDrops = new ArrayList<>();
for (ItemStack drop : blockDrops) {
if (drop != null && !drop.getType().isAir()) {
smelt(b, drop, fortune);
drops.add(drop);
itemDrops.add(drop);
}
}
// stop blockListener from dropping origin drops
e.setDropItems(false);
// drop smelted manually
for (ItemStack itemDrop : itemDrops) {
b.getWorld().dropItemNaturally(b.getLocation(), itemDrop);
}
damageItem(e.getPlayer(), tool);
}
};
Expand Down

0 comments on commit bcb5b38

Please sign in to comment.