the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 41 lines 1.1 kB view raw
1#pragma once 2using namespace std; 3 4#include "Packet.h" 5 6class PlayerCommandPacket : public Packet, public enable_shared_from_this<PlayerCommandPacket> 7{ 8public: 9 static const int START_SNEAKING; 10 static const int STOP_SNEAKING; 11 static const int STOP_SLEEPING; 12 static const int START_SPRINTING; 13 static const int STOP_SPRINTING; 14 static const int START_IDLEANIM; 15 static const int STOP_IDLEANIM; 16 static const int RIDING_JUMP; 17 static const int OPEN_INVENTORY; 18 19 // 4J Added 20 // 4J-PB - Making this host only setting 21 /* 22 static const int SHOW_ON_MAPS; 23 static const int HIDE_ON_MAPS; 24 */ 25 26 int id; 27 int action; 28 int data; 29 30 PlayerCommandPacket(); 31 PlayerCommandPacket(shared_ptr<Entity> e, int action); 32 PlayerCommandPacket(shared_ptr<Entity> e, int action, int data); 33 34 virtual void read(DataInputStream *dis); 35 virtual void write(DataOutputStream *dos); 36 virtual void handle(PacketListener *listener); 37 virtual int getEstimatedSize(); 38public: 39 static shared_ptr<Packet> create() { return shared_ptr<Packet>(new PlayerCommandPacket()); } 40 virtual int getId() { return 19; } 41};