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.
768 B · 41 lines
C++
at master
123456789101112131415161718192021222324252627282930313233343536373839404142#include "stdafx.h"#include <iostream>#include "InputOutputStream.h"#include "PacketListener.h"#include "EntityEventPacket.h"
EntityEventPacket::EntityEventPacket() { entityId = 0; eventId = 0;}
EntityEventPacket::EntityEventPacket(int entityId, byte eventId) { this->entityId = entityId; this->eventId = eventId;}
void EntityEventPacket::read(DataInputStream *dis) //throws IOException { entityId = dis->readInt(); eventId = dis->readByte();}
void EntityEventPacket::write(DataOutputStream *dos) //throws IOException { dos->writeInt(entityId); dos->writeByte(eventId);}
void EntityEventPacket::handle(PacketListener *listener) { listener->handleEntityEvent(shared_from_this());}
int EntityEventPacket::getEstimatedSize(){ return 5;}