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
6class AddEntityPacket : public Packet, public enable_shared_from_this<AddEntityPacket>
7{
8public:
9 static const int BOAT = 1;
10 static const int ITEM = 2;
11 static const int MINECART = 10;
12 static const int PRIMED_TNT = 50;
13 static const int ENDER_CRYSTAL = 51;
14 static const int ARROW = 60;
15 static const int SNOWBALL = 61;
16 static const int EGG = 62;
17 static const int FIREBALL = 63;
18 static const int SMALL_FIREBALL = 64;
19 static const int THROWN_ENDERPEARL = 65;
20 static const int WITHER_SKULL = 66;
21 static const int FALLING = 70;
22 static const int ITEM_FRAME = 71;
23 static const int EYEOFENDERSIGNAL = 72;
24 static const int THROWN_POTION = 73;
25 static const int FALLING_EGG = 74;
26 static const int THROWN_EXPBOTTLE = 75;
27 static const int FIREWORKS = 76;
28 static const int LEASH_KNOT = 77;
29 static const int FISH_HOOK = 90;
30
31 // 4J Added TU9
32 static const int DRAGON_FIRE_BALL = 200;
33
34 int id;
35 int x, y, z;
36 int xa, ya, za;
37 int type;
38 int data;
39 byte yRot,xRot; // 4J added
40
41private:
42 void _init(shared_ptr<Entity> e, int type, int data, int xp, int yp, int zp, int yRotp, int xRotp );
43
44public:
45 AddEntityPacket();
46 AddEntityPacket(shared_ptr<Entity> e, int type, int yRotp, int xRotp, int xp, int yp, int zp);
47 AddEntityPacket(shared_ptr<Entity> e, int type, int data, int yRotp, int xRotp, int xp, int yp, int zp );
48
49 virtual void read(DataInputStream *dis);
50 virtual void write(DataOutputStream *dos);
51 virtual void handle(PacketListener *listener);
52 virtual int getEstimatedSize();
53
54public:
55 static shared_ptr<Packet> create() { return shared_ptr<Packet>(new AddEntityPacket()); }
56 virtual int getId() { return 23; }
57};