the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 37 lines 1.4 kB view raw
1#include "stdafx.h" 2#include "HugeExplosionSeedParticle.h" 3#include "..\Minecraft.World\Random.h" 4#include "..\Minecraft.World\net.minecraft.world.level.h" 5 6HugeExplosionSeedParticle::HugeExplosionSeedParticle(Level *level, double x, double y, double z, double xa, double ya, double za) : Particle(level,x,y,z,0,0,0) 7{ 8 life = 0; 9 10 lifeTime = 8; 11} 12 13void HugeExplosionSeedParticle::render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2) 14{ 15} 16 17void HugeExplosionSeedParticle::tick() 18{ 19 // Horrible hack to communicate with the level renderer, which is just attached as a listener to this level. This let's the particle 20 // rendering know to use this level (rather than try to work it out from the current player), and to not bother distance clipping particles 21 // which would again be based on the current player. 22 Minecraft::GetInstance()->animateTickLevel = level; 23 for (int i = 0; i < 6; i++) { 24 double xx = x + (random->nextDouble() - random->nextDouble()) * 4; 25 double yy = y + (random->nextDouble() - random->nextDouble()) * 4; 26 double zz = z + (random->nextDouble() - random->nextDouble()) * 4; 27 level->addParticle(eParticleType_largeexplode, xx, yy, zz, life / (float) lifeTime, 0, 0); 28 } 29 Minecraft::GetInstance()->animateTickLevel = NULL; 30 life++; 31 if (life == lifeTime) remove(); 32} 33 34int HugeExplosionSeedParticle::getParticleTexture() 35{ 36 return ParticleEngine::TERRAIN_TEXTURE; 37}