From 1d990231f1670fbfa3dc40323c4aa6141c9cd19a Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 13 Jan 2018 08:17:57 +0500 Subject: Updated to 1.12.2 --- src/NetworkClient.cpp | 2 +- src/Packet.hpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/NetworkClient.cpp b/src/NetworkClient.cpp index 38cb947..99d89f9 100644 --- a/src/NetworkClient.cpp +++ b/src/NetworkClient.cpp @@ -9,7 +9,7 @@ NetworkClient::NetworkClient(std::string address, unsigned short port, std::stri state = Handshaking; PacketHandshake handshake; - handshake.protocolVersion = 338; + handshake.protocolVersion = 340; handshake.serverAddress = address; handshake.serverPort = port; handshake.nextState = 2; diff --git a/src/Packet.hpp b/src/Packet.hpp index 4457893..57b39af 100644 --- a/src/Packet.hpp +++ b/src/Packet.hpp @@ -269,34 +269,34 @@ struct PacketSpawnPosition : Packet { struct PacketKeepAliveCB : Packet { void ToStream(StreamOutput *stream) override { - stream->WriteVarInt(KeepAliveId); + stream->WriteLong(KeepAliveId); } void FromStream(StreamInput *stream) override { - KeepAliveId = stream->ReadVarInt(); + KeepAliveId = stream->ReadLong(); } int GetPacketId() override { return PacketNamePlayCB::KeepAliveCB; } - int KeepAliveId; + long long KeepAliveId; }; struct PacketKeepAliveSB : Packet { void ToStream(StreamOutput *stream) override { - stream->WriteVarInt(KeepAliveId); + stream->WriteLong(KeepAliveId); } void FromStream(StreamInput *stream) override { - KeepAliveId = stream->ReadVarInt(); + KeepAliveId = stream->ReadLong(); } int GetPacketId() override { return PacketNamePlaySB::KeepAliveSB; } - int KeepAliveId; + long long KeepAliveId; PacketKeepAliveSB(int KeepAliveId) : KeepAliveId(KeepAliveId) {} }; -- cgit v1.2.3