Something went wrong. Try again.
the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
Something went wrong. Try again.
1.0 kB · 60 lines
C++
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960#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;}