mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-27 13:54:39 +00:00
chore: format Minecraft.World
This commit is contained in:
@@ -5,54 +5,46 @@
|
||||
#include "PacketListener.h"
|
||||
#include "AddPaintingPacket.h"
|
||||
|
||||
|
||||
|
||||
AddPaintingPacket::AddPaintingPacket()
|
||||
{
|
||||
id = -1;
|
||||
x = 0;
|
||||
y = 0;
|
||||
z = 0;
|
||||
dir = 0;
|
||||
motive = L"";
|
||||
AddPaintingPacket::AddPaintingPacket() {
|
||||
id = -1;
|
||||
x = 0;
|
||||
y = 0;
|
||||
z = 0;
|
||||
dir = 0;
|
||||
motive = L"";
|
||||
}
|
||||
|
||||
AddPaintingPacket::AddPaintingPacket(std::shared_ptr<Painting> e)
|
||||
{
|
||||
id = e->entityId;
|
||||
x = e->xTile;
|
||||
y = e->yTile;
|
||||
z = e->zTile;
|
||||
dir = e->dir;
|
||||
motive = e->motive->name;
|
||||
AddPaintingPacket::AddPaintingPacket(std::shared_ptr<Painting> e) {
|
||||
id = e->entityId;
|
||||
x = e->xTile;
|
||||
y = e->yTile;
|
||||
z = e->zTile;
|
||||
dir = e->dir;
|
||||
motive = e->motive->name;
|
||||
}
|
||||
|
||||
void AddPaintingPacket::read(DataInputStream *dis) //throws IOException
|
||||
void AddPaintingPacket::read(DataInputStream* dis) // throws IOException
|
||||
{
|
||||
id = dis->readInt();
|
||||
motive = readUtf(dis, Painting::Motive::MAX_MOTIVE_NAME_LENGTH);
|
||||
x = dis->readInt();
|
||||
y = dis->readInt();
|
||||
z = dis->readInt();
|
||||
dir = dis->readInt();
|
||||
id = dis->readInt();
|
||||
motive = readUtf(dis, Painting::Motive::MAX_MOTIVE_NAME_LENGTH);
|
||||
x = dis->readInt();
|
||||
y = dis->readInt();
|
||||
z = dis->readInt();
|
||||
dir = dis->readInt();
|
||||
}
|
||||
|
||||
void AddPaintingPacket::write(DataOutputStream *dos) //throws IOException
|
||||
void AddPaintingPacket::write(DataOutputStream* dos) // throws IOException
|
||||
{
|
||||
dos->writeInt(id);
|
||||
writeUtf(motive, dos);
|
||||
dos->writeInt(x);
|
||||
dos->writeInt(y);
|
||||
dos->writeInt(z);
|
||||
dos->writeInt(dir);
|
||||
dos->writeInt(id);
|
||||
writeUtf(motive, dos);
|
||||
dos->writeInt(x);
|
||||
dos->writeInt(y);
|
||||
dos->writeInt(z);
|
||||
dos->writeInt(dir);
|
||||
}
|
||||
|
||||
void AddPaintingPacket::handle(PacketListener *listener)
|
||||
{
|
||||
listener->handleAddPainting(shared_from_this());
|
||||
void AddPaintingPacket::handle(PacketListener* listener) {
|
||||
listener->handleAddPainting(shared_from_this());
|
||||
}
|
||||
|
||||
int AddPaintingPacket::getEstimatedSize()
|
||||
{
|
||||
return 24;
|
||||
}
|
||||
int AddPaintingPacket::getEstimatedSize() { return 24; }
|
||||
|
||||
Reference in New Issue
Block a user