the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 47 lines 824 B view raw
1#include "stdafx.h" 2#include <iostream> 3#include "InputOutputStream.h" 4#include "PacketListener.h" 5#include "SetCarriedItemPacket.h" 6 7 8 9SetCarriedItemPacket::SetCarriedItemPacket() 10{ 11 slot = 0; 12} 13 14SetCarriedItemPacket::SetCarriedItemPacket(int slot) 15{ 16 this->slot = slot; 17} 18 19void SetCarriedItemPacket::read(DataInputStream *dis) //throws IOException 20{ 21 slot = dis->readShort(); 22} 23 24void SetCarriedItemPacket::write(DataOutputStream *dos) //throws IOException 25{ 26 dos->writeShort(slot); 27} 28 29void SetCarriedItemPacket::handle(PacketListener *listener) 30{ 31 listener->handleSetCarriedItem(shared_from_this()); 32} 33 34int SetCarriedItemPacket::getEstimatedSize() 35{ 36 return 2; 37} 38 39bool SetCarriedItemPacket::canBeInvalidated() 40{ 41 return true; 42} 43 44bool SetCarriedItemPacket::isInvalidatedBy(shared_ptr<Packet> packet) 45{ 46 return true; 47}