the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 30 lines 793 B view raw
1#pragma once 2using namespace std; 3 4#include "Packet.h" 5#include "SynchedEntityData.h" 6 7class SetEntityDataPacket : public Packet, public enable_shared_from_this<SetEntityDataPacket> 8{ 9public: 10 int id; 11 12private: 13 vector<shared_ptr<SynchedEntityData::DataItem> > *packedItems; 14 15public: 16 SetEntityDataPacket(); 17 ~SetEntityDataPacket(); 18 SetEntityDataPacket(int id, shared_ptr<SynchedEntityData>, bool notJustDirty); 19 20 virtual void read(DataInputStream *dis); 21 virtual void write(DataOutputStream *dos); 22 virtual void handle(PacketListener *listener); 23 virtual int getEstimatedSize(); 24 25 vector<shared_ptr<SynchedEntityData::DataItem> > *getUnpackedData(); 26 27public: 28 static shared_ptr<Packet> create() { return shared_ptr<Packet>(new SetEntityDataPacket()); } 29 virtual int getId() { return 40; } 30};