the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2using namespace std;
3
4#include "Packet.h"
5#include "SynchedEntityData.h"
6
7class LivingEntity;
8
9class AddMobPacket : public Packet, public enable_shared_from_this<AddMobPacket>
10{
11public:
12 int id;
13 int type;
14 int x, y, z;
15 int xd, yd, zd;
16 byte yRot, xRot, yHeadRot;
17
18private:
19 shared_ptr<SynchedEntityData> entityData;
20 vector<shared_ptr<SynchedEntityData::DataItem> > *unpack;
21
22public:
23 AddMobPacket();
24 ~AddMobPacket();
25 AddMobPacket(shared_ptr<LivingEntity> mob, int yRotp, int xRotp, int xp, int yp, int zp, int yHeadRotp);
26
27 virtual void read(DataInputStream *dis);
28 virtual void write(DataOutputStream *dos);
29 virtual void handle(PacketListener *listener);
30 virtual int getEstimatedSize();
31
32 vector<shared_ptr<SynchedEntityData::DataItem> > *getUnpackedData();
33
34public:
35 static shared_ptr<Packet> create() { return shared_ptr<Packet>(new AddMobPacket()); }
36 virtual int getId() { return 24; }
37};