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.1 kB · 58 lines
C++
at main
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859#include "stdafx.h"#include <iostream>#include "InputOutputStream.h"#include "net.minecraft.world.entity.h"#include "PacketListener.h"#include "AddPaintingPacket.h"
AddPaintingPacket::AddPaintingPacket(){ id = -1; x = 0; y = 0; z = 0; dir = 0; motive = L"";}
AddPaintingPacket::AddPaintingPacket(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{ 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{ 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());}
int AddPaintingPacket::getEstimatedSize(){ return 24;}