Skip to content

Commit 55188ef

Browse files
committed
1.2.1 don't stop when eating (fix #5)
1 parent 7bd9105 commit 55188ef

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

common/src/main/java/sh/okx/civmodern/common/macro/IceRoadMacro.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,21 @@ public void tick() {
5252

5353
if (enabled) {
5454
if (!jump) {
55+
AUTO_EAT:
5556
if (config.isIceRoadAutoEat()) {
5657
if (this.eating != null) {
5758
if (!mc.player.isUsingItem() || !this.eating.equals(mc.player.getUseItem())) {
5859
this.eating = null;
5960
mc.options.keyUse.setDown(false);
6061
} else {
61-
return;
62+
break AUTO_EAT;
6263
}
6364
}
6465

6566
ItemStack mainhand = mc.player.getMainHandItem();
6667
if (tryEat(mainhand)) {
6768
this.eating = mainhand;
68-
mc.options.keyUp.setDown(false);
69+
mc.options.keyUse.setDown(true);
6970
return;
7071
}
7172
}
@@ -95,7 +96,6 @@ private boolean tryEat(ItemStack item) {
9596
FoodProperties food = item.getItem().getFoodProperties();
9697
if (food != null && food.getNutrition() > 0) {
9798
if (mc.player.getFoodData().getFoodLevel() + food.getNutrition() <= 20) {
98-
mc.options.keyUse.setDown(true);
9999
return true;
100100
}
101101
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx2048M
33
minecraft_version=1.16.5
44

55
archives_base_name=civmodern
6-
mod_version=1.2
6+
mod_version=1.2.1
77
maven_group=sh.okx.civmodern
88

99
architectury_version=1.14.156

0 commit comments

Comments
 (0)