use of io.xol.chunkstories.api.particles.ParticleDataWithVelocity in project chunkstories by Hugobros3.
the class ClientParticlesRenderer method spawnParticleAtPositionWithVelocity.
public void spawnParticleAtPositionWithVelocity(String particleTypeName, Vector3dc location, Vector3dc velocity) {
ParticleTypeHandler particleType = store.getParticleType(particleTypeName);
if (particleType == null || location == null)
return;
ParticleData particleData = particleType.createNew(world, (float) (double) location.x(), (float) (double) location.y(), (float) (double) location.z());
if (velocity != null && particleData instanceof ParticleDataWithVelocity)
((ParticleDataWithVelocity) particleData).setVelocity(new Vector3f((float) velocity.x(), (float) velocity.y(), (float) velocity.z()));
addParticle(particleType, particleData);
}
Aggregations