aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/DebugOptionsPacket.cpp
blob: f287efcd2a36e8645933ff09f5d796243e7913b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "stdafx.h"
#include <iostream>
#include "InputOutputStream.h"
#include "net.minecraft.world.item.h"
#include "PacketListener.h"
#include "DebugOptionsPacket.h"



DebugOptionsPacket::~DebugOptionsPacket()
{
}

DebugOptionsPacket::DebugOptionsPacket()
{
	m_uiVal = 0L;
}

DebugOptionsPacket::DebugOptionsPacket(unsigned int uiVal)
{
	this->m_uiVal = uiVal;
}

void DebugOptionsPacket::handle(PacketListener *listener)
{
	listener->handleDebugOptions(shared_from_this());
}

void DebugOptionsPacket::read(DataInputStream *dis) //throws IOException
{
	m_uiVal = (unsigned int)dis->readInt();
}

void DebugOptionsPacket::write(DataOutputStream *dos) // throws IOException
{
	dos->writeInt((int)m_uiVal);
}

int DebugOptionsPacket::getEstimatedSize() 
{
	return sizeof(int);
}