the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 77 lines 2.4 kB view raw
1#pragma once 2#include "Particle.h" 3#include "..\Minecraft.World\CompoundTag.h" 4 5class ParticleEngine; 6 7class FireworksParticles 8{ 9public: 10 11 class FireworksStarter : public Particle 12 { 13 public: 14 virtual eINSTANCEOF GetType() { return eType_FIREWORKSSTARTERPARTICLE; } 15 16 private: 17 int life; 18 ParticleEngine *engine; 19 ListTag<CompoundTag> *explosions; 20 bool twinkleDelay; 21 22 public: 23 FireworksStarter(Level *level, double x, double y, double z, double xd, double yd, double zd, ParticleEngine *engine, CompoundTag *infoTag); 24 virtual void render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2); 25 virtual void tick(); 26 bool isFarAwayFromCamera(); 27 void createParticle(double x, double y, double z, double xa, double ya, double za, intArray rgbColors, intArray fadeColors, bool trail, bool flicker); 28 void createParticleBall(double baseSpeed, int steps, intArray rgbColors, intArray fadeColors, bool trail, bool flicker); 29 void createParticleShape(double baseSpeed, coords2DArray coords, intArray rgbColors, intArray fadeColors, bool trail, bool flicker, bool flat); 30 void createParticleBurst(intArray rgbColors, intArray fadeColors, bool trail, bool flicker); 31 32 public: 33 int getParticleTexture(); 34 }; 35 36 class FireworksSparkParticle : public Particle 37 { 38 public: 39 virtual eINSTANCEOF GetType() { return eType_FIREWORKSSPARKPARTICLE; } 40 41 private: 42 int baseTex; 43 bool trail; 44 bool flicker; 45 ParticleEngine *engine; 46 47 float fadeR; 48 float fadeG; 49 float fadeB; 50 bool hasFade; 51 52 public: 53 FireworksSparkParticle(Level *level, double x, double y, double z, double xa, double ya, double za, ParticleEngine *engine); 54 void setTrail(bool trail); 55 void setFlicker(bool flicker); 56 using Particle::setColor; 57 void setColor(int rgb); 58 void setFadeColor(int rgb); 59 virtual AABB *getCollideBox(); 60 virtual bool isPushable(); 61 virtual void render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2); 62 virtual void tick(); 63 virtual void setBaseTex(int baseTex); 64 virtual int getLightColor(float a); 65 virtual float getBrightness(float a); 66 }; 67 68 class FireworksOverlayParticle : public Particle 69 { 70 public: 71 virtual eINSTANCEOF GetType() { return eType_FIREWORKSOVERLAYPARTICLE; } 72 73 FireworksOverlayParticle(Level *level, double x, double y, double z); 74 75 void render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2); 76 }; 77};