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:
commit
9c3465e80f
@ -50,7 +50,7 @@ public class LumberAxe extends SlimefunItem implements NotPlaceable {
|
|||||||
@Nonnull
|
@Nonnull
|
||||||
private ToolUseHandler onBlockBreak() {
|
private ToolUseHandler onBlockBreak() {
|
||||||
return (e, tool, fortune, drops) -> {
|
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()));
|
List<Block> logs = Vein.find(e.getBlock(), MAX_BROKEN, b -> Tag.LOGS.isTagged(b.getType()));
|
||||||
logs.remove(e.getBlock());
|
logs.remove(e.getBlock());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user