the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 43 lines 1.2 kB view raw
1#pragma once 2using namespace std; 3 4#include "Packet.h" 5#include "SynchedEntityData.h" 6 7class Player; 8 9class AddPlayerPacket : public Packet, public enable_shared_from_this<AddPlayerPacket> 10{ 11 12private: 13 shared_ptr<SynchedEntityData> entityData; 14 vector<shared_ptr<SynchedEntityData::DataItem> > *unpack; 15 16public: 17 int id; 18 wstring name; 19 int x, y, z; 20 char yRot, xRot; 21 int carriedItem; 22 PlayerUID xuid; // 4J Added 23 PlayerUID OnlineXuid; // 4J Added 24 BYTE m_playerIndex; // 4J Added 25 DWORD m_skinId; // 4J Added 26 DWORD m_capeId; // 4J Added 27 unsigned int m_uiGamePrivileges; // 4J Added 28 byte yHeadRot; // 4J Added 29 30 AddPlayerPacket(); 31 ~AddPlayerPacket(); 32 AddPlayerPacket(shared_ptr<Player> player, PlayerUID xuid, PlayerUID OnlineXuid,int xp, int yp, int zp, int yRotp, int xRotp, int yHeadRotp); 33 34 virtual void read(DataInputStream *dis); 35 virtual void write(DataOutputStream *dos); 36 virtual void handle(PacketListener *listener); 37 virtual int getEstimatedSize(); 38 39 vector<shared_ptr<SynchedEntityData::DataItem> > *getUnpackedData(); 40public: 41 static shared_ptr<Packet> create() { return shared_ptr<Packet>(new AddPlayerPacket()); } 42 virtual int getId() { return 20; } 43};