mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Fix sneak check on GT
This commit is contained in:
parent
7c6d5c476d
commit
a333f36fd8
@ -171,7 +171,8 @@ public class HerbalismManager extends SkillManager {
|
|||||||
|
|
||||||
//TODO: The design of Green Terra needs to change, this is a mess
|
//TODO: The design of Green Terra needs to change, this is a mess
|
||||||
if(Permissions.greenThumbPlant(getPlayer(), originalBreak.getType())) {
|
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
|
//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
|
* @param greenTerra boolean to determine if greenTerra is active or not
|
||||||
*/
|
*/
|
||||||
private void processGreenThumbPlants(BlockState blockState, BlockBreakEvent blockBreakEvent, boolean greenTerra) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user