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

Merge pull request #3298 from qwertyuioplkjhgfd/shift-lumber-axe

Check for sneaking when breaking logs on lumber axe
This commit is contained in:
TheBusyBiscuit 2021-10-08 19:32:40 +02:00 committed by GitHub
commit 9c3465e80f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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());