1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

check for sneaking on lumber axe

This commit is contained in:
qwertyuioplkjhgfd 2021-10-02 20:03:03 -07:00
parent fe9d11d879
commit 36912f517f

View File

@ -50,7 +50,7 @@ public class LumberAxe extends SlimefunItem implements NotPlaceable {
@Nonnull
private ToolUseHandler onBlockBreak() {
return (e, tool, fortune, drops) -> {
if (Tag.LOGS.isTagged(e.getBlock().getType())) {
if (!e.getPlayer().isSneaking() && Tag.LOGS.isTagged(e.getBlock().getType())) {
List<Block> logs = Vein.find(e.getBlock(), MAX_BROKEN, b -> Tag.LOGS.isTagged(b.getType()));
logs.remove(e.getBlock());