the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 33 lines 619 B view raw
1#include "stdafx.h" 2#include "PacketListener.h" 3#include "ClientCommandPacket.h" 4 5ClientCommandPacket::ClientCommandPacket() 6{ 7 action = 0; 8} 9 10ClientCommandPacket::ClientCommandPacket(int action) 11{ 12 this->action = action; 13} 14 15void ClientCommandPacket::read(DataInputStream *dis) 16{ 17 action = dis->readByte(); 18} 19 20void ClientCommandPacket::write(DataOutputStream *dos) 21{ 22 dos->writeByte(action & 0xff); 23} 24 25void ClientCommandPacket::handle(PacketListener *listener) 26{ 27 listener->handleClientCommand(dynamic_pointer_cast<ClientCommandPacket>(shared_from_this())); 28} 29 30int ClientCommandPacket::getEstimatedSize() 31{ 32 return 1; 33}