Fix sneak check on GT

This commit is contained in:
nossr50 2020-02-19 16:19:19 -08:00
parent 7c6d5c476d
commit a333f36fd8

View File

@ -171,6 +171,7 @@ public class HerbalismManager extends SkillManager {
//TODO: The design of Green Terra needs to change, this is a mess
if(Permissions.greenThumbPlant(getPlayer(), originalBreak.getType())) {
if(!getPlayer().isSneaking())
processGreenThumbPlants(originalBreak, blockBreakEvent, isGreenTerraActive());
}
@ -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;
}