From af78c2e0b459a880d748aec3aae41e765ad68862 Mon Sep 17 00:00:00 2001 From: mcchampions <1309635304@qq.com> Date: Fri, 26 Jul 2024 18:52:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=88=86=E7=82=B8=E5=B7=A5=E5=85=B7):=20?= =?UTF-8?q?=20SlimefunGuguProject/Slimefun4#928?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../implementation/items/tools/ExplosiveTool.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/ExplosiveTool.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/ExplosiveTool.java index d1c61a6777..b2c61b8f8d 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/ExplosiveTool.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/ExplosiveTool.java @@ -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 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)); } }; }