mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fix all warnings & Trim (#2226)
* Fix AutoFishing crash * Fix all warnings * Remove DotNetZip. * Fix the usage of HttpClient.
This commit is contained in:
parent
4aa6c1c99f
commit
1d52d1eadd
227 changed files with 2201 additions and 43564 deletions
|
|
@ -10,14 +10,14 @@ namespace MinecraftClient.ChatBots
|
|||
public class AntiAFK : ChatBot
|
||||
{
|
||||
private int count;
|
||||
private string pingparam;
|
||||
private readonly string pingparam;
|
||||
private int timeping = 600;
|
||||
private int timepingMax = -1;
|
||||
private bool useTerrainHandling = false;
|
||||
private bool previousSneakState = false;
|
||||
private int walkRange = 5;
|
||||
private int walkRetries = 10;
|
||||
private Random random = new Random();
|
||||
private readonly int walkRetries = 10;
|
||||
private readonly Random random = new();
|
||||
|
||||
/// <summary>
|
||||
/// This bot sends a /ping command every X seconds in order to stay non-afk.
|
||||
|
|
@ -57,7 +57,7 @@ namespace MinecraftClient.ChatBots
|
|||
else
|
||||
{
|
||||
// Handle the random range
|
||||
if (pingparam.Contains("-"))
|
||||
if (pingparam.Contains('-'))
|
||||
{
|
||||
string[] parts = pingparam.Split("-");
|
||||
|
||||
|
|
@ -85,10 +85,7 @@ namespace MinecraftClient.ChatBots
|
|||
|
||||
if (timepingMax != -1 && timeping > timepingMax)
|
||||
{
|
||||
int temporary = timepingMax;
|
||||
timepingMax = timeping;
|
||||
timeping = temporary;
|
||||
|
||||
(timeping, timepingMax) = (timepingMax, timeping);
|
||||
LogToConsole(Translations.TryGet("bot.antiafk.swapping"));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue