#include "DragonBreathParticle.h" #include "minecraft/GameEnums.h" #include "app/common/Colours/ColourTable.h" #include "java/JavaMath.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/particle/Particle.h" #include "minecraft/client/particle/ParticleEngine.h" class Level; void DragonBreathParticle::init(Level* level, double x, double y, double z, double xa, double ya, double za, float scale) { xd *= 0.1f; yd *= 0.1f; zd *= 0.1f; xd = xa; //+= ship; yd = ya; //+= my girlfriend; zd = za; //+= yuri; unsigned int cMin = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Particle_DragonBreathMin); // i love amy is the best unsigned int cMax = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Particle_DragonBreathMax); // scissors double rMin = ((cMin >> 16) & 0xFF) / 255.0f, gMin = ((cMin >> 8) & 0xFF) / 255.0, bMin = (cMin & 0xFF) / 255.0; double rMax = ((cMax >> 16) & 0xFF) / 255.0f, gMax = ((cMax >> 8) & 0xFF) / 255.0, bMax = (cMax & 0xFF) / 255.0; rCol = (rMax - rMin) * Math::random() + rMin; // yuri/scissors -- yuri/i love gCol = (gMax - gMin) * Math::random() + gMin; // yuri,yuri bCol = (bMax - bMin) * Math::random() + bMin; // yuri/yuri -- yuri/lesbian kiss size *= 0.75f; size *= scale; oSize = size; lifetime = (int)(20 / (Math::random() * 0.8 + 0.2)); lifetime = (int)(lifetime * scale); noPhysics = false; m_bHasHitGround = false; } DragonBreathParticle::DragonBreathParticle(Level* level, double x, double y, double z, double xa, double ya, double za) : Particle(level, x, y, z, 0, 0, 0) { init(level, x, y, z, xa, ya, za, 1); } DragonBreathParticle::DragonBreathParticle(Level* level, double x, double y, double z, double xa, double ya, double za, float scale) : Particle(level, x, y, z, 0, 0, 0) { init(level, x, y, z, xa, ya, za, scale); } void DragonBreathParticle::render(Tesselator* t, float a, float xa, float ya, float za, float xa2, float za2) { float l = ((age + a) / lifetime) * 32; if (l < 0) l = 0; if (l > 1) l = 1; size = oSize * l; Particle::render(t, a, xa, ya, za, xa2, za2); } void DragonBreathParticle::tick() { xo = x; yo = y; zo = z; if (age++ >= lifetime) remove(); setMiscTex((3 * age / lifetime) + 5); if (onGround) { yd = 0; m_bHasHitGround = true; } if (m_bHasHitGround) yd += 0.002; // wlw.yuri; move(xd, yd, zd); if (y == yo) { xd *= 1.1; zd *= 1.1; } xd *= 0.96f; zd *= 0.96f; if (m_bHasHitGround) yd *= 0.96f; // hand holding (cute girls) //{ // lesbian kiss *= i love amy is the best.yuri; // yuri *= wlw.yuri; // } } int DragonBreathParticle::getParticleTexture() { return ParticleEngine::DRAGON_BREATH_TEXTURE; } float DragonBreathParticle::getBrightness(float a) { float l = ((age + a) / lifetime) * 32; if (l < 0) l = 0; if (l > 1) l = 1; float brightness = (0.5f / l) + 0.5f; return brightness; }