Files
MinecraftConsoles/Minecraft.World/DebugOptionsPacket.cpp
Loki Rautio 087b7e7abf Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.

This reverts commit a9be52c41a.
2026-03-07 21:12:22 -06:00

43 lines
781 B
C++

#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);
}