Fix frame iterator resetting mid run, improved logging
Frame iterator was resetting every run due to a shared iterator between runs, this is now unique per run. Include frame keys for logging, log the frame spawning in debug logs.
This commit is contained in:
@@ -150,7 +150,7 @@ public class ParticleConfig {
|
||||
* @return A ParticleSet created from the ParticleData
|
||||
*/
|
||||
public ParticleSet convertToParticleSet(ParticleData particleData) {
|
||||
log.info("Converting ParticleData to ParticleSet for {}", particleData.getParticleName());
|
||||
log.info("Converting ParticleData to ParticleSet for [{}]", particleData.getParticleName());
|
||||
List<Frame> loadedFrames = new ArrayList<>();
|
||||
double randomOffset = particleData.getRandomOffset();
|
||||
|
||||
@@ -175,7 +175,11 @@ public class ParticleConfig {
|
||||
aParticleList.add(new AParticle(x, y + 0.2, z, randomOffset, particleBuilder));
|
||||
}
|
||||
|
||||
loadedFrames.add(new Frame(aParticleList));
|
||||
loadedFrames.add(new Frame(entry.getKey(), aParticleList));
|
||||
}
|
||||
|
||||
if (Config.DEBUG) {
|
||||
log.info("Loaded {} frames for [{}]", loadedFrames.size(), particleData.getParticleName());
|
||||
}
|
||||
|
||||
// Create and return the ParticleSet
|
||||
|
||||
Reference in New Issue
Block a user