Particle groups aren't cleared on resource reload
When resource packs are reloaded, particles are also cleared in ParticleEngine as shown below in reload.
this.particles.clear(); profilerFiller2.startTick(); profilerFiller2.push("upload"); this.textureAtlas.reload(preparations); profilerFiller2.popPush("bindSpriteSets");
However, this doesn't clear tracked particles, such as for the spore blossom, so no more particles in that specific group are able to be spawned until the world is reloaded.

Clearing trackedParticleCounts when the particles are cleared solves the problem.
this.particles.clear(); + this.trackedParticleCounts.clear(); profilerFiller2.startTick(); profilerFiller2.push("upload"); this.textureAtlas.reload(preparations); profilerFiller2.popPush("bindSpriteSets");
The result of this fix is spore blossoms as well as any other particles (future, modded, etc.) still being able to emit particles after a resource reload.
Environment
Operating System: Windows 10 (amd64) version 10.0
Java Version: 17.0.1, Oracle Corporation
JVM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
Linked Issues
Created Issue:
Particle groups aren't cleared on resource reload
When resource packs are reloaded, particles are also cleared in ParticleEngine as shown below in reload.
this.particles.clear(); profilerFiller2.startTick(); profilerFiller2.push("upload"); this.textureAtlas.reload(preparations); profilerFiller2.popPush("bindSpriteSets");
However, this doesn't clear tracked particles, such as for the spore blossom, so no more particles in that specific group are able to be spawned until the world is reloaded.
Clearing trackedParticleCounts when the particles are cleared solves the problem.
this.particles.clear(); + this.trackedParticleCounts.clear(); profilerFiller2.startTick(); profilerFiller2.push("upload"); this.textureAtlas.reload(preparations); profilerFiller2.popPush("bindSpriteSets");The result of this fix is spore blossoms as well as any other particles (future, modded, etc.) still being able to emit particles after a resource reload.
Environment
Operating System: Windows 10 (amd64) version 10.0
Java Version: 17.0.1, Oracle Corporation
JVM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
relates to
relates to
Does MC-223248 describe your issue?
relates to