Misc protocol cleanup
This commit is contained in:
parent
3fbb7f0691
commit
70d41ab577
|
@ -35,7 +35,7 @@ namespace Feather
|
||||||
uint16_t port = packet.Read<uint16_t>();
|
uint16_t port = packet.Read<uint16_t>();
|
||||||
|
|
||||||
// next desired state
|
// next desired state
|
||||||
ProtocolState intention = (ProtocolState)(packet.ReadVarInt());
|
ProtocolState intention = packet.ReadVarInt<ProtocolState>();
|
||||||
|
|
||||||
printf("[Protocol] Client Intention Packet: version=%d, serverIp=%s, port=%u, intention=%d\n",
|
printf("[Protocol] Client Intention Packet: version=%d, serverIp=%s, port=%u, intention=%d\n",
|
||||||
clientProtocolVersion,
|
clientProtocolVersion,
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "NetworkMessage.h"
|
#include "NetworkMessage.h"
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
namespace Feather
|
namespace Feather
|
||||||
{
|
{
|
||||||
|
@ -10,7 +11,7 @@ namespace Feather
|
||||||
class PacketReader;
|
class PacketReader;
|
||||||
class MinecraftClient;
|
class MinecraftClient;
|
||||||
|
|
||||||
enum class ProtocolState
|
enum class ProtocolState : int32_t
|
||||||
{
|
{
|
||||||
Handholding = -1,
|
Handholding = -1,
|
||||||
Play = 0,
|
Play = 0,
|
||||||
|
|
Loading…
Reference in New Issue