From e02ed48f61a3d0ef45e37586f22bf2bc3cbbba1c Mon Sep 17 00:00:00 2001 From: Eygwi <245492840+eygwi@users.noreply.github.com> Date: Tue, 16 Dec 2025 09:29:25 +0700 Subject: [PATCH 1/2] fix Bug #4304 --- .../implementation/items/tools/PickaxeOfVeinMining.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/PickaxeOfVeinMining.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/PickaxeOfVeinMining.java index 41a293a7f3..4f0d850aeb 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/PickaxeOfVeinMining.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/PickaxeOfVeinMining.java @@ -13,7 +13,6 @@ import org.bukkit.inventory.ItemStack; import io.github.bakedlibs.dough.blocks.Vein; -import io.github.bakedlibs.dough.items.CustomItemStack; import io.github.bakedlibs.dough.protection.Interaction; import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup; import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting; @@ -48,13 +47,13 @@ public PickaxeOfVeinMining(ItemGroup itemGroup, SlimefunItemStack item, RecipeTy return (e, tool, fortune, drops) -> { if (SlimefunTag.PICKAXE_OF_VEIN_MINING_BLOCKS.isTagged(e.getBlock().getType())) { List blocks = Vein.find(e.getBlock(), maxBlocks.getValue(), b -> SlimefunTag.PICKAXE_OF_VEIN_MINING_BLOCKS.isTagged(b.getType())); - breakBlocks(e.getPlayer(), blocks, fortune, tool); + breakBlocks(e.getPlayer(), blocks, tool); } }; } @ParametersAreNonnullByDefault - private void breakBlocks(Player p, List blocks, int fortune, ItemStack tool) { + private void breakBlocks(Player p, List blocks, ItemStack tool) { for (Block b : blocks) { if (Slimefun.getProtectionManager().hasPermission(p, b.getLocation(), Interaction.BREAK_BLOCK)) { b.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, b.getType()); @@ -63,7 +62,7 @@ private void breakBlocks(Player p, List blocks, int fortune, ItemStack to b.getWorld().dropItemNaturally(b.getLocation(), new ItemStack(b.getType())); } else { for (ItemStack drop : b.getDrops(tool)) { - b.getWorld().dropItemNaturally(b.getLocation(), drop.getType().isBlock() ? drop : CustomItemStack.create(drop, fortune)); + b.getWorld().dropItemNaturally(b.getLocation(), drop); } } @@ -72,4 +71,4 @@ private void breakBlocks(Player p, List blocks, int fortune, ItemStack to } } -} +} \ No newline at end of file From 212bf8104bd08d9769870115f0b3e92aadc0e648 Mon Sep 17 00:00:00 2001 From: Eygwi <245492840+eygwi@users.noreply.github.com> Date: Tue, 16 Dec 2025 12:12:26 +0700 Subject: [PATCH 2/2] Fix Pickaxe of Vein Mining destroying Slimefun blocks --- .../implementation/items/tools/PickaxeOfVeinMining.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/PickaxeOfVeinMining.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/PickaxeOfVeinMining.java index 4f0d850aeb..7644fd7653 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/PickaxeOfVeinMining.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/PickaxeOfVeinMining.java @@ -23,6 +23,7 @@ import io.github.thebusybiscuit.slimefun4.implementation.Slimefun; import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem; import io.github.thebusybiscuit.slimefun4.utils.tags.SlimefunTag; +import me.mrCookieSlime.Slimefun.api.BlockStorage; /** * The {@link PickaxeOfVeinMining} is a powerful tool which allows you to mine an entire vein of ores @@ -55,6 +56,10 @@ public PickaxeOfVeinMining(ItemGroup itemGroup, SlimefunItemStack item, RecipeTy @ParametersAreNonnullByDefault private void breakBlocks(Player p, List blocks, ItemStack tool) { for (Block b : blocks) { + if (BlockStorage.check(b.getLocation()) != null) { + continue; + } + if (Slimefun.getProtectionManager().hasPermission(p, b.getLocation(), Interaction.BREAK_BLOCK)) { b.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, b.getType());