Skip to content

Particle Manager

MCE626 edited this page May 4, 2019 · 6 revisions

Particle Manager will allow custom particles and render correctly without crashing on the server side!

Examples

ParticleManager.spawnParticle(world, pos.getX(), pos.getY(), pos.getZ(), new ParticleMagicFX(world, pos.getX() + rand.nextDouble(), pos.getY() + rand.nextDouble(), pos.getZ() + rand.nextDouble(), 0d, 0d, 0d), 1f, 1f, 1f, 0, 5, true);

Here spawnParticle takes in; world, x y and z coords, a particle class, then three floats for red, green and blue, a float for scaling the particle by, a max age for the particle as an integer, and lastly a boolean should you want it to cycle through a series of the same particle (like the explosion or smoke goes from large particle to smaller ones. Kinda like an animation.)

References