Fix tps not updated

This commit is contained in:
ReinforceZwei 2020-03-31 19:03:08 +08:00 committed by ORelio
parent 5d0172a1f9
commit 9dbb70eb63

View file

@ -82,7 +82,7 @@ namespace MinecraftClient.ChatBots
{
if (attackSpeed != prop["generic.attackSpeed"])
{
GetServerTPS();
serverTPS = GetServerTPS();
attackSpeed = prop["generic.attackSpeed"];
attackCooldownSecond = 1 / attackSpeed * (serverTPS / 20.0); // server tps will affect the cooldown
attackCooldown = Convert.ToInt32(Math.Truncate(attackCooldownSecond / 0.1) + 1);