2026-03-01 12:16:08 +08:00
|
|
|
#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
|
|
|
|
|
{
|
2026-03-08 19:08:36 -04:00
|
|
|
m_uiVal = static_cast<unsigned int>(dis->readInt());
|
2026-03-01 12:16:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DebugOptionsPacket::write(DataOutputStream *dos) // throws IOException
|
|
|
|
|
{
|
2026-03-08 19:08:36 -04:00
|
|
|
dos->writeInt(static_cast<int>(m_uiVal));
|
2026-03-01 12:16:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int DebugOptionsPacket::getEstimatedSize()
|
|
|
|
|
{
|
|
|
|
|
return sizeof(int);
|
|
|
|
|
}
|