the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2using namespace std;
3
4class Particle;
5class Level;
6class Textures;
7class Entity;
8class Random;
9using namespace std;
10
11class ParticleEngine
12{
13private:
14 static ResourceLocation PARTICLES_LOCATION;
15 static const int MAX_PARTICLES_PER_LAYER = 200; // 4J - reduced from 4000
16 static const int MAX_DRAGON_BREATH_PARTICLES = 1000;
17 static const int MAX_FIREWORK_SPARK_PARTICLES = 2000;
18
19public:
20 static const int MISC_TEXTURE = 0;
21 static const int TERRAIN_TEXTURE = 1;
22 static const int ITEM_TEXTURE = 2;
23 static const int ENTITY_PARTICLE_TEXTURE = 3;
24 static const int DRAGON_BREATH_TEXTURE = 4; // 4J Added
25 static const int TEXTURE_COUNT = 5;
26
27 // Brought forward from Java 1.8
28 static const int TRANSLUCENT_LIST = 0;
29 static const int OPAQUE_LIST = 1;
30 static const int LIST_COUNT = 2;
31
32protected:
33 Level *level;
34private:
35 deque<shared_ptr<Particle> > particles[3][TEXTURE_COUNT][LIST_COUNT]; // 4J made three arrays to cope with simultaneous two dimensions
36 Textures *textures;
37 Random *random;
38
39public:
40 ParticleEngine(Level *level, Textures *textures);
41 ~ParticleEngine();
42 void add(shared_ptr<Particle> p);
43 void tick();
44 void render(shared_ptr<Entity> player, float a, int list);
45 void renderLit(shared_ptr<Entity> player, float a, int list);
46 void setLevel(Level *level);
47 void destroy(int x, int y, int z, int tid, int data);
48 void crack(int x, int y, int z, int face);
49
50 // 4J - Brought forward from Java 1.8
51 void markTranslucent(shared_ptr<Particle> particle);
52 void markOpaque(shared_ptr<Particle> particle);
53 void moveParticleInList(shared_ptr<Particle> particle, int source, int destination);
54
55 wstring countParticles();
56};