the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2#include "TilePos.h"
3#include "Player.h"
4
5class Random;
6class Level;
7
8class Explosion
9{
10public:
11 bool fire;
12 bool destroyBlocks;
13
14private:
15 int size;
16
17 Random *random;
18 Level *level;
19
20public:
21 double x, y, z;
22 shared_ptr<Entity> source;
23 float r;
24
25 unordered_set<TilePos, TilePosKeyHash, TilePosKeyEq> toBlow;
26
27private:
28 typedef unordered_map<shared_ptr<Player>, Vec3 * , PlayerKeyHash, PlayerKeyEq> playerVec3Map;
29 playerVec3Map hitPlayers;
30
31public:
32 Explosion(Level *level, shared_ptr<Entity> source, double x, double y, double z, float r);
33 ~Explosion();
34
35public:
36 void explode();
37
38public:
39 void finalizeExplosion(bool generateParticles, vector<TilePos> *toBlowDirect = NULL); // 4J - added toBlow parameter
40 playerVec3Map *getHitPlayers();
41 Vec3 *getHitPlayerKnockback( shared_ptr<Player> player );
42 shared_ptr<LivingEntity> getSourceMob();
43};