the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include <iostream>
3#include "InputOutputStream.h"
4#include "PacketListener.h"
5#include "UpdateProgressPacket.h"
6
7
8
9UpdateProgressPacket::UpdateProgressPacket()
10{
11 this->m_percentage = 0;
12}
13
14UpdateProgressPacket::UpdateProgressPacket(int percentage)
15{
16 this->m_percentage = percentage;
17}
18
19void UpdateProgressPacket::read(DataInputStream *dis) //throws IOException
20{
21 m_percentage = dis->readByte();
22}
23
24void UpdateProgressPacket::write(DataOutputStream *dos) //throws IOException
25{
26 dos->writeByte(m_percentage);
27}
28
29void UpdateProgressPacket::handle(PacketListener *listener)
30{
31 listener->handleUpdateProgress(shared_from_this());
32}
33
34int UpdateProgressPacket::getEstimatedSize()
35{
36 return 1;
37}