diff --git a/gradle.properties b/gradle.properties index d5c9071..84c2c50 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G org.gradle.parallel=true # Mod Properties -mod_version=1.2.33 +mod_version=1.2.34 maven_group=yan.lx.bedrockMiner archives_base_name=bedrock-miner diff --git a/src/main/java/yan/lx/bedrockminer/task/TaskHandler.java b/src/main/java/yan/lx/bedrockminer/task/TaskHandler.java index 81302e8..5f13dc9 100644 --- a/src/main/java/yan/lx/bedrockminer/task/TaskHandler.java +++ b/src/main/java/yan/lx/bedrockminer/task/TaskHandler.java @@ -222,6 +222,7 @@ private void findSlimeBlock() { MessageUtils.setOverlayMessage(Text.literal(LanguageText.HANDLE_SEEK.getString().replace("%BlockPos%", pos.toShortString()))); } else { state = TaskState.WAIT_GAME_UPDATE; + this.tick(true); } } @@ -276,6 +277,7 @@ private void findRedstoneTorch() { MessageUtils.setOverlayMessage(Text.literal(LanguageText.HANDLE_SEEK.getString().replace("%BlockPos%", pos.toShortString()))); } else { state = TaskState.WAIT_GAME_UPDATE; + this.tick(true); } } @@ -342,6 +344,7 @@ private void findPiston() { MessageUtils.setOverlayMessage(Text.literal(LanguageText.HANDLE_SEEK.getString().replace("%BlockPos%", pos.toShortString()))); } else { state = TaskState.WAIT_GAME_UPDATE; + this.tick(true); } } @@ -437,7 +440,6 @@ private void updateStates() { if (!world.getBlockState(pos).isOf(block)) { this.state = TaskState.RECYCLED_ITEMS; this.debugUpdateStates("目标不存在"); - this.tick(true); return; } if (!this.executed) { @@ -446,20 +448,17 @@ private void updateStates() { if (this.piston == null) { this.debugUpdateStates("活塞未获取,准备查找合适的位置"); this.state = TaskState.FIND_PISTON; - this.tick(true); return; } if (this.redstoneTorch == null) { this.debugUpdateStates("红石火把未获取,准备查找合适的位置"); this.state = TaskState.FIND_REDSTONE_TORCH; - this.tick(true); return; } if (this.slimeBlock == null) { this.debugUpdateStates("红石火把底座未获取,准备查找合适的位置"); this.state = TaskState.FIND_SLIME_BLOCK; - this.tick(true); return; }