From a333f36fd80f3b3425ac41e6d40191fdfe1af048 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Wed, 19 Feb 2020 16:19:19 -0800 Subject: [PATCH] Fix sneak check on GT --- .../com/gmail/nossr50/skills/herbalism/HerbalismManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java b/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java index c7a91cfc0..0a50a60bf 100644 --- a/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java +++ b/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java @@ -171,7 +171,8 @@ public class HerbalismManager extends SkillManager { //TODO: The design of Green Terra needs to change, this is a mess if(Permissions.greenThumbPlant(getPlayer(), originalBreak.getType())) { - processGreenThumbPlants(originalBreak, blockBreakEvent, isGreenTerraActive()); + if(!getPlayer().isSneaking()) + processGreenThumbPlants(originalBreak, blockBreakEvent, isGreenTerraActive()); } //When replanting a immature crop we cancel the block break event and back out @@ -669,7 +670,7 @@ public class HerbalismManager extends SkillManager { * @param greenTerra boolean to determine if greenTerra is active or not */ private void processGreenThumbPlants(BlockState blockState, BlockBreakEvent blockBreakEvent, boolean greenTerra) { - if(blockBreakEvent.getPlayer().isSneaking() || !ItemUtils.isHoe(blockBreakEvent.getPlayer().getInventory().getItemInMainHand())) { + if(!ItemUtils.isHoe(blockBreakEvent.getPlayer().getInventory().getItemInMainHand())) { return; }