the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2
3#include "PacketListener.h"
4#include "TileEditorOpenPacket.h"
5
6TileEditorOpenPacket::TileEditorOpenPacket()
7{
8 editorType = 0;
9 x = y = z = 0;
10}
11
12TileEditorOpenPacket::TileEditorOpenPacket(int editorType, int x, int y, int z)
13{
14 this->editorType = editorType;
15 this->x = x;
16 this->y = y;
17 this->z = z;
18}
19
20void TileEditorOpenPacket::handle(PacketListener *listener)
21{
22 listener->handleTileEditorOpen(shared_from_this());
23}
24
25void TileEditorOpenPacket::read(DataInputStream *dis)
26{
27 this->editorType = dis->readByte();
28 this->x = dis->readInt();
29 this->y = dis->readInt();
30 this->z = dis->readInt();
31}
32
33void TileEditorOpenPacket::write(DataOutputStream *dos)
34{
35 dos->writeByte(editorType);
36 dos->writeInt(x);
37 dos->writeInt(y);
38 dos->writeInt(z);
39}
40
41int TileEditorOpenPacket::getEstimatedSize()
42{
43 return 1 + 3 * 4;
44}