the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 30 lines 843 B view raw
1#pragma once 2using namespace std; 3 4#include "Packet.h" 5 6class Level; 7 8// 4J Added this packet so that when a player initially joins the game we just need to send them the area of chunks 9// around them rather than one packet for each chunk 10class ChunkVisibilityAreaPacket : public Packet, public enable_shared_from_this<ChunkVisibilityAreaPacket> 11{ 12public: 13 int m_minX, m_maxX, m_minZ, m_maxZ; 14 15private: 16 //int size; 17 18public: 19 ChunkVisibilityAreaPacket(); 20 ChunkVisibilityAreaPacket(int minX, int maxX, int minZ, int maxZ); 21 22 virtual void read(DataInputStream *dis); 23 virtual void write(DataOutputStream *dos); 24 virtual void handle(PacketListener *listener); 25 virtual int getEstimatedSize(); 26 27public: 28 static shared_ptr<Packet> create() { return shared_ptr<Packet>(new ChunkVisibilityAreaPacket()); } 29 virtual int getId() { return 155; } 30};