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 PlayerActionPacket : public Packet, public enable_shared_from_this<PlayerActionPacket>
7{
8public:
9 static const int START_DESTROY_BLOCK;
10 static const int ABORT_DESTROY_BLOCK;
11 static const int STOP_DESTROY_BLOCK;
12 static const int DROP_ALL_ITEMS;
13 static const int DROP_ITEM;
14 static const int RELEASE_USE_ITEM;
15
16 int x, y, z, face, action;
17
18 PlayerActionPacket();
19 PlayerActionPacket(int action, int x, int y, int z, int face);
20
21 virtual void read(DataInputStream *dis);
22 virtual void write(DataOutputStream *dos);
23 virtual void handle(PacketListener *listener);
24 virtual int getEstimatedSize();
25
26public:
27 static shared_ptr<Packet> create() { return shared_ptr<Packet>(new PlayerActionPacket()); }
28 virtual int getId() { return 14; }
29};
30
31