mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Fix sneak check on GT
This commit is contained in:
parent
7c6d5c476d
commit
a333f36fd8
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user