4jcraft/Minecraft.World/Network/Packets/DebugOptionsPacket.cpp
2026-03-13 17:06:56 -05:00

31 lines
836 B
C++

#include "../../Platform/stdafx.h"
#include <iostream>
#include "../../IO/Streams/InputOutputStream.h"
#include "../../Headers/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); }