the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 37 lines 1.0 kB view raw
1#pragma once 2using namespace std; 3 4#include "TilePos.h" 5#include "Packet.h" 6 7class ExplodePacket : public Packet, public enable_shared_from_this<ExplodePacket> 8{ 9public: 10 double x, y, z; 11 float r; 12 vector<TilePos> toBlow; // 4J - was an unorderedset but doesn't require any features of that apart from making it match the ctor toBlow type 13 bool m_bKnockbackOnly; 14 15 private: 16 float knockbackX; 17 float knockbackY; 18 float knockbackZ; 19 20 public: 21 22 ExplodePacket(); 23 ExplodePacket(double x, double y, double z, float r, unordered_set<TilePos, TilePosKeyHash, TilePosKeyEq> *toBlow, Vec3 *knockback, bool knockBackOnly); 24 25 virtual void read(DataInputStream *dis); 26 virtual void write(DataOutputStream *dos); 27 virtual void handle(PacketListener *listener); 28 virtual int getEstimatedSize(); 29 30 float getKnockbackX(); 31 float getKnockbackY(); 32 float getKnockbackZ(); 33 34public: 35 static shared_ptr<Packet> create() { return shared_ptr<Packet>(new ExplodePacket()); } 36 virtual int getId() { return 60; } 37};