Skip to content

Commit

Permalink
fix(爆炸工具): SlimefunGuguProject#928
Browse files Browse the repository at this point in the history
  • Loading branch information
mcchampions committed Jul 26, 2024
1 parent fb40f37 commit af78c2e
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,17 @@ public ToolUseHandler getItemHandler() {
return (e, tool, fortune, drops) -> {
Player p = e.getPlayer();

Block b = e.getBlock();
if (!p.isSneaking()) {
Block b = e.getBlock();

b.getWorld().createExplosion(b.getLocation(), 0);
SoundEffect.EXPLOSIVE_TOOL_EXPLODE_SOUND.playAt(b);

List<Block> blocks = findBlocks(b);
breakBlocks(e, p, tool, b, blocks, drops);
SlimefunItem sfItem = StorageCacheUtils.getSfItem(b.getLocation());
if (sfItem == null || sfItem.useVanillaBlockBreaking()) {
drops.addAll(b.getDrops(tool));
}
}
SlimefunItem sfItem = StorageCacheUtils.getSfItem(b.getLocation());
if (sfItem == null || sfItem.useVanillaBlockBreaking()) {
drops.addAll(b.getDrops(tool));
}
};
}
Expand Down

0 comments on commit af78c2e

Please sign in to comment.