the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 46 lines 975 B view raw
1#include "stdafx.h" 2#include <iostream> 3#include "InputOutputStream.h" 4#include "net.minecraft.world.entity.h" 5#include "PacketListener.h" 6#include "TextureChangePacket.h" 7 8 9 10TextureChangePacket::TextureChangePacket() 11{ 12 id = -1; 13 action = e_TextureChange_Skin; 14 path = L""; 15} 16 17TextureChangePacket::TextureChangePacket(shared_ptr<Entity> e, ETextureChangeType action, const wstring &path) 18{ 19 id = e->entityId; 20 this->action = action; 21 this->path = path; 22} 23 24void TextureChangePacket::read(DataInputStream *dis) //throws IOException 25{ 26 id = dis->readInt(); 27 action = (ETextureChangeType)dis->readByte(); 28 path = dis->readUTF(); 29} 30 31void TextureChangePacket::write(DataOutputStream *dos) //throws IOException 32{ 33 dos->writeInt(id); 34 dos->writeByte(action); 35 dos->writeUTF(path); 36} 37 38void TextureChangePacket::handle(PacketListener *listener) 39{ 40 listener->handleTextureChange(shared_from_this()); 41} 42 43int TextureChangePacket::getEstimatedSize() 44{ 45 return 5 + (int)path.size(); 46}