mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-09-28 08:40:47 +00:00
chore: format Minecraft.World
This commit is contained in:
@@ -5,29 +5,32 @@
|
||||
|
||||
class ServerPlayer;
|
||||
|
||||
class PlayerInfoPacket : public Packet, public std::enable_shared_from_this<PlayerInfoPacket>
|
||||
{
|
||||
public:
|
||||
// 4J Stu - I have re-purposed this packet for our uses
|
||||
//std::wstring name;
|
||||
//bool add;
|
||||
//int latency;
|
||||
std::uint8_t m_networkSmallId;
|
||||
short m_playerColourIndex;
|
||||
unsigned int m_playerPrivileges;
|
||||
int m_entityId;
|
||||
class PlayerInfoPacket : public Packet,
|
||||
public std::enable_shared_from_this<PlayerInfoPacket> {
|
||||
public:
|
||||
// 4J Stu - I have re-purposed this packet for our uses
|
||||
// std::wstring name;
|
||||
// bool add;
|
||||
// int latency;
|
||||
std::uint8_t m_networkSmallId;
|
||||
short m_playerColourIndex;
|
||||
unsigned int m_playerPrivileges;
|
||||
int m_entityId;
|
||||
|
||||
PlayerInfoPacket();
|
||||
//PlayerInfoPacket(const std::wstring &name, bool add, int latency);
|
||||
PlayerInfoPacket(std::uint8_t networkSmallId, short playerColourIndex, unsigned int playerPrivileges = 0);
|
||||
PlayerInfoPacket(std::shared_ptr<ServerPlayer> player);
|
||||
PlayerInfoPacket();
|
||||
// PlayerInfoPacket(const std::wstring &name, bool add, int latency);
|
||||
PlayerInfoPacket(std::uint8_t networkSmallId, short playerColourIndex,
|
||||
unsigned int playerPrivileges = 0);
|
||||
PlayerInfoPacket(std::shared_ptr<ServerPlayer> player);
|
||||
|
||||
virtual void read(DataInputStream *dis);
|
||||
virtual void write(DataOutputStream *dos);
|
||||
virtual void handle(PacketListener *listener);
|
||||
virtual int getEstimatedSize();
|
||||
virtual void read(DataInputStream* dis);
|
||||
virtual void write(DataOutputStream* dos);
|
||||
virtual void handle(PacketListener* listener);
|
||||
virtual int getEstimatedSize();
|
||||
|
||||
public:
|
||||
static std::shared_ptr<Packet> create() { return std::shared_ptr<Packet>(new PlayerInfoPacket()); }
|
||||
virtual int getId() { return 201; }
|
||||
static std::shared_ptr<Packet> create() {
|
||||
return std::shared_ptr<Packet>(new PlayerInfoPacket());
|
||||
}
|
||||
virtual int getId() { return 201; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user