* Fixed boats falling and a TP glitch #266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch #266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides
43 lines
807 B
C++
43 lines
807 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 = static_cast<unsigned int>(dis->readInt());
|
|
}
|
|
|
|
void DebugOptionsPacket::write(DataOutputStream *dos) // throws IOException
|
|
{
|
|
dos->writeInt(static_cast<int>(m_uiVal));
|
|
}
|
|
|
|
int DebugOptionsPacket::getEstimatedSize()
|
|
{
|
|
return sizeof(int);
|
|
}
|