the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 53 lines 1.6 kB view raw
1#pragma once 2using namespace std; 3 4#include "Packet.h" 5 6class ContainerOpenPacket : public Packet, public enable_shared_from_this<ContainerOpenPacket> 7{ 8public: 9 static const int CONTAINER = 0; 10 static const int WORKBENCH = 1; 11 static const int FURNACE = 2; 12 static const int TRAP = 3; 13 static const int ENCHANTMENT = 4; 14 static const int BREWING_STAND = 5; 15 static const int TRADER_NPC = 6; 16 static const int BEACON = 7; 17 static const int REPAIR_TABLE = 8; 18 static const int HOPPER = 9; 19 static const int DROPPER = 10; 20 static const int HORSE = 11; 21 static const int FIREWORKS = 12; // 4J Added 22 static const int BONUS_CHEST = 13; // 4J Added 23 static const int LARGE_CHEST = 14; // 4J Added 24 static const int ENDER_CHEST = 15; // 4J Added 25 static const int MINECART_CHEST = 16; // 4J Added 26 static const int MINECART_HOPPER = 17; // 4J Added 27 28 int containerId; 29 int type; 30 int size; 31 bool customName; 32 wstring title; 33 int entityId; 34 35private: 36 void _init(int containerId, int type, const wstring &title, int size, bool customName, int entityId); 37 38public: 39 ContainerOpenPacket(); 40 ContainerOpenPacket(int containerId, int type, const wstring &title, int size, bool customName); 41 ContainerOpenPacket(int containerId, int type, const wstring &title, int size, bool customName, int entityId); 42 43 virtual void handle(PacketListener *listener); 44 virtual void read(DataInputStream *dis); 45 virtual void write(DataOutputStream *dos); 46 virtual int getEstimatedSize(); 47 48public: 49 static shared_ptr<Packet> create() { return shared_ptr<Packet>(new ContainerOpenPacket()); } 50 virtual int getId() { return 100; } 51}; 52 53