From 8f0588581bfbc028b4a92891e5c6a2fee20cfecd Mon Sep 17 00:00:00 2001 From: Kaooot <37877491+Kaooot@users.noreply.github.com> Date: Sun, 8 Sep 2024 18:13:13 +0200 Subject: [PATCH] Fix typo in ServerboundDiagnosticsPacket (#260) --- .../serializer/ServerboundDiagnosticsSerializer_v712.java | 4 ++-- .../protocol/bedrock/packet/ServerboundDiagnosticsPacket.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v712/serializer/ServerboundDiagnosticsSerializer_v712.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v712/serializer/ServerboundDiagnosticsSerializer_v712.java index 58345ca5d..167f7996b 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v712/serializer/ServerboundDiagnosticsSerializer_v712.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v712/serializer/ServerboundDiagnosticsSerializer_v712.java @@ -10,7 +10,7 @@ public class ServerboundDiagnosticsSerializer_v712 implements BedrockPacketSeria @Override public void serialize(ByteBuf buffer, BedrockCodecHelper helper, ServerboundDiagnosticsPacket packet) { - buffer.writeFloatLE(packet.getAvgTps()); + buffer.writeFloatLE(packet.getAvgFps()); buffer.writeFloatLE(packet.getAvgServerSimTickTimeMS()); buffer.writeFloatLE(packet.getAvgClientSimTickTimeMS()); buffer.writeFloatLE(packet.getAvgBeginFrameTimeMS()); @@ -23,7 +23,7 @@ public void serialize(ByteBuf buffer, BedrockCodecHelper helper, ServerboundDiag @Override public void deserialize(ByteBuf buffer, BedrockCodecHelper helper, ServerboundDiagnosticsPacket packet) { - packet.setAvgTps(buffer.readFloatLE()); + packet.setAvgFps(buffer.readFloatLE()); packet.setAvgServerSimTickTimeMS(buffer.readFloatLE()); packet.setAvgClientSimTickTimeMS(buffer.readFloatLE()); packet.setAvgBeginFrameTimeMS(buffer.readFloatLE()); diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/ServerboundDiagnosticsPacket.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/ServerboundDiagnosticsPacket.java index 0d8522844..1e10eb26d 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/ServerboundDiagnosticsPacket.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/ServerboundDiagnosticsPacket.java @@ -9,7 +9,7 @@ @EqualsAndHashCode(doNotUseGetters = true) @ToString(doNotUseGetters = true) public class ServerboundDiagnosticsPacket implements BedrockPacket{ - private float avgTps; + private float avgFps; private float avgServerSimTickTimeMS; private float avgClientSimTickTimeMS; private float avgBeginFrameTimeMS;