mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-12 12:13:51 +00:00
Initial commit
This commit is contained in:
parent
def8cb4153
commit
b691c43c44
19437 changed files with 4363922 additions and 0 deletions
60
Minecraft.World/SetSpawnPositionPacket.cpp
Normal file
60
Minecraft.World/SetSpawnPositionPacket.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
#include "stdafx.h"
|
||||
#include <iostream>
|
||||
#include "InputOutputStream.h"
|
||||
#include "PacketListener.h"
|
||||
#include "SetSpawnPositionPacket.h"
|
||||
|
||||
|
||||
|
||||
SetSpawnPositionPacket::SetSpawnPositionPacket()
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
z = 0;
|
||||
}
|
||||
|
||||
SetSpawnPositionPacket::SetSpawnPositionPacket(int x, int y, int z)
|
||||
{
|
||||
this->x = x;
|
||||
this->y = y;
|
||||
this->z = z;
|
||||
}
|
||||
|
||||
void SetSpawnPositionPacket::read(DataInputStream *dis) //throws IOException
|
||||
{
|
||||
x = dis->readInt();
|
||||
y = dis->readInt();
|
||||
z = dis->readInt();
|
||||
}
|
||||
|
||||
void SetSpawnPositionPacket::write(DataOutputStream *dos) //throws IOException
|
||||
{
|
||||
dos->writeInt(x);
|
||||
dos->writeInt(y);
|
||||
dos->writeInt(z);
|
||||
}
|
||||
|
||||
void SetSpawnPositionPacket::handle(PacketListener *listener)
|
||||
{
|
||||
listener->handleSetSpawn(shared_from_this());
|
||||
}
|
||||
|
||||
int SetSpawnPositionPacket::getEstimatedSize()
|
||||
{
|
||||
return 3*4;
|
||||
}
|
||||
|
||||
bool SetSpawnPositionPacket::canBeInvalidated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SetSpawnPositionPacket::isInvalidatedBy(shared_ptr<Packet> packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SetSpawnPositionPacket::isAync()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue