Skip to content

Commit 25fdf81

Browse files
committed
Add the option to disable HarvestX when sneaking.
close #3
1 parent 6ec7d33 commit 25fdf81

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx4G
99
loader_version=0.14.6
1010

1111
# Mod Properties
12-
mod_version = 1.6.0
12+
mod_version = 1.6.1
1313
maven_group = cn.taskeren.minequery
1414
archives_base_name = minequery
1515

src/main/java/cn/taskeren/minequery/callback/HarvestCheck.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public void register() {
2323

2424
@Override
2525
public ActionResult interact(PlayerEntity player, World world, Hand hand, BlockPos pos, Direction direction) {
26-
if(!config().harvestXConfig.harvestX) {
26+
if(!config().harvestXConfig.harvestX || (config().harvestXConfig.disableOnSneaking && player.isSneaking())) {
2727
return ActionResult.PASS;
2828
}
2929

src/main/java/cn/taskeren/minequery/config/MineQueryConfig.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@ public class MineQueryConfig implements ConfigData {
3434

3535
public static class HarvestXConfig {
3636
public boolean harvestX = true;
37-
public boolean checkCrops = true;
37+
public boolean checkCrops = true;
3838
public boolean checkNetherWart = true;
39-
public boolean checkCactus = true;
40-
public boolean checkSugarCane = true;
41-
public boolean checkStem = true;
39+
public boolean checkCactus = true;
40+
public boolean checkSugarCane = true;
41+
public boolean checkStem = true;
42+
public boolean disableOnSneaking = true;
4243
}
4344

4445
public static class NotHitConfig {
45-
public boolean notHit = true;
46+
public boolean notHit = true;
4647

4748
@ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON)
4849
public CanDamage ironGolem = CanDamage.ALL;

src/main/resources/assets/minequery/lang/en_us.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"text.autoconfig.minequery.option.harvestXConfig.checkCactus": "Check Cactus",
3535
"text.autoconfig.minequery.option.harvestXConfig.checkSugarCane": "Check Sugar Cane",
3636
"text.autoconfig.minequery.option.harvestXConfig.checkStem": "Check Stem",
37+
"text.autoconfig.minequery.option.harvestXConfig.disableOnSneaking": "Disable HarvestX when Sneaking",
3738
"text.autoconfig.minequery.option.notHitConfig": "Not Hit Configuration",
3839
"text.autoconfig.minequery.option.notHitConfig.notHit": "Enable Not Hit",
3940
"text.autoconfig.minequery.option.notHitConfig.ironGolem": "Prevent Attack Iron Golem",

src/main/resources/assets/minequery/lang/zh_cn.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"text.autoconfig.minequery.option.harvestXConfig.checkCactus": "检查仙人掌",
3535
"text.autoconfig.minequery.option.harvestXConfig.checkSugarCane": "检查甘蔗",
3636
"text.autoconfig.minequery.option.harvestXConfig.checkStem": "检查瓜梗",
37+
"text.autoconfig.minequery.option.harvestXConfig.disableOnSneaking": "蹲下时关闭收割检查",
3738
"text.autoconfig.minequery.option.notHitConfig": "不打他设置",
3839
"text.autoconfig.minequery.option.notHitConfig.notHit": "启用不打他",
3940
"text.autoconfig.minequery.option.notHitConfig.ironGolem": "不打铁傀儡",

src/main/resources/fabric.mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"cloth-config": "*"
3939
},
4040
"suggests": {
41-
"another-mod": "*"
41+
"modmenu": "*"
4242
},
4343

4444
"custom": {

0 commit comments

Comments
 (0)