Files
MinecraftConsoles/Minecraft.World/SetTimePacket.cpp
void_17 d63f79325f Get rid of MSVC's __int64
Use either int64_t, uint64_t or long long and unsigned long long, defined as per C++11 standard
2026-03-02 15:53:32 +07:00

52 lines
784 B
C++

#include "stdafx.h"
#include <iostream>
#include "InputOutputStream.h"
#include "PacketListener.h"
#include "SetTimePacket.h"
SetTimePacket::SetTimePacket()
{
time = 0;
}
SetTimePacket::SetTimePacket(int64_t time)
{
this->time = time;
}
void SetTimePacket::read(DataInputStream *dis) //throws IOException
{
time = dis->readLong();
}
void SetTimePacket::write(DataOutputStream *dos) //throws IOException
{
dos->writeLong(time);
}
void SetTimePacket::handle(PacketListener *listener)
{
listener->handleSetTime(shared_from_this());
}
int SetTimePacket::getEstimatedSize()
{
return 8;
}
bool SetTimePacket::canBeInvalidated()
{
return true;
}
bool SetTimePacket::isInvalidatedBy(shared_ptr<Packet> packet)
{
return true;
}
bool SetTimePacket::isAync()
{
return true;
}