From 625612909e1b745143af9269b1d6e4b7ef5eaf75 Mon Sep 17 00:00:00 2001 From: BruceChen Date: Mon, 10 Oct 2022 10:56:12 +0800 Subject: [PATCH] Bug fix --- ConsoleInteractive | 2 +- MinecraftClient/ChatBots/AutoDig.cs | 2 +- MinecraftClient/Commands/Dig.cs | 3 +++ MinecraftClient/WinAPI/ConsoleIcon.cs | 5 ----- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ConsoleInteractive b/ConsoleInteractive index 225b10ec..7acaa0ab 160000 --- a/ConsoleInteractive +++ b/ConsoleInteractive @@ -1 +1 @@ -Subproject commit 225b10ec96af5c8f179a008cc442b502d23bc601 +Subproject commit 7acaa0ab31809f0f6512e6a76e53e15441de8e7c diff --git a/MinecraftClient/ChatBots/AutoDig.cs b/MinecraftClient/ChatBots/AutoDig.cs index 27cfecc3..9d0c585c 100644 --- a/MinecraftClient/ChatBots/AutoDig.cs +++ b/MinecraftClient/ChatBots/AutoDig.cs @@ -43,7 +43,7 @@ namespace MinecraftClient.ChatBots public double Auto_Start_Delay = 3.0; [TomlInlineComment("$config.ChatBot.AutoDig.Dig_Timeout$")] - public double Dig_Timeout = 30.0; + public double Dig_Timeout = 60.0; [TomlInlineComment("$config.ChatBot.AutoDig.Log_Block_Dig$")] public bool Log_Block_Dig = true; diff --git a/MinecraftClient/Commands/Dig.cs b/MinecraftClient/Commands/Dig.cs index d82303c0..ce825e98 100644 --- a/MinecraftClient/Commands/Dig.cs +++ b/MinecraftClient/Commands/Dig.cs @@ -40,7 +40,10 @@ namespace MinecraftClient.Commands if (block.Type == Material.Air) return Translations.Get("cmd.dig.no_block"); else if (handler.DigBlock(blockToBreak)) + { + blockToBreak = blockToBreak.ToCenter(); return Translations.Get("cmd.dig.dig", blockToBreak.X, blockToBreak.Y, blockToBreak.Z, block.Type); + } else return Translations.Get("cmd.dig.fail"); } diff --git a/MinecraftClient/WinAPI/ConsoleIcon.cs b/MinecraftClient/WinAPI/ConsoleIcon.cs index 4eda86fa..e66eca89 100644 --- a/MinecraftClient/WinAPI/ConsoleIcon.cs +++ b/MinecraftClient/WinAPI/ConsoleIcon.cs @@ -50,11 +50,6 @@ namespace MinecraftClient.WinAPI { HttpClient httpClient = new(); try - { - Task httpWebRequest = httpClient.GetStreamAsync("https://minotar.net/helm/" + playerName + "/100.png"); - httpWebRequest.Wait(); - Stream imageStream = httpWebRequest.Result; - try { Task httpWebRequest = httpClient.GetStreamAsync("https://minotar.net/helm/" + playerName + "/100.png"); httpWebRequest.Wait();