mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fixed division with a 0 error
This commit is contained in:
parent
93112d2c02
commit
549f39fab1
1 changed files with 2 additions and 1 deletions
|
|
@ -959,9 +959,10 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
break;
|
||||
case PacketTypesIn.ChunkBatchFinished:
|
||||
dataTypes.ReadNextVarInt(packetData); // Number of chunks received
|
||||
var time = (DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastCHunkBatchStartedAt);
|
||||
SendChunkBatchReceived(
|
||||
// ReSharper disable once PossibleLossOfFraction
|
||||
25 / (DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastCHunkBatchStartedAt)
|
||||
25 / time == 0 ? 5 : time
|
||||
);
|
||||
break;
|
||||
case PacketTypesIn.ChunkBatchStarted:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue