Formatting

This commit is contained in:
Anon 2023-11-27 00:03:20 +01:00
parent 0ad892ef50
commit 2fb5c163d5

View file

@ -963,11 +963,13 @@ namespace MinecraftClient.Protocol.Handlers
case PacketTypesIn.ChunkBatchFinished:
var batchSize = dataTypes.ReadNextVarInt(packetData); // Number of chunks received
if (batchSize > 0) {
if (batchSize > 0)
{
var d = GetNanos() - chunkBatchStartTime;
var d2 = d / (double)batchSize;
var d3 = Math.Clamp(d2, aggregatedNanosPerChunk / 3.0, aggregatedNanosPerChunk * 3.0);
aggregatedNanosPerChunk = (aggregatedNanosPerChunk * oldSamplesWeight + d3) / (oldSamplesWeight + 1);
aggregatedNanosPerChunk =
(aggregatedNanosPerChunk * oldSamplesWeight + d3) / (oldSamplesWeight + 1);
oldSamplesWeight = Math.Min(49, oldSamplesWeight + 1);
}