-
Notifications
You must be signed in to change notification settings - Fork 0
Particle Sprite Set Data Generation
Maksym Uimanov edited this page Feb 12, 2026
·
1 revision
The GenerateParticleSpriteSet annotation automates the generation of particle sprite definitions for Minecraft particles. It eliminates the need for manual JSON asset creation by programmatically registering particle sprites and sprite sets during data generation.
- Automates sprite registration: Generates particle sprite definitions without manual JSON files
- Supports sprite sets: Creates multi-frame sprite animations with configurable frame counts
- Integrates with data generation: Works seamlessly with NeoForge's data generation system
- Provides flexible configuration: Supports sprite ordering and frame count customization
-
Annotation processing: The framework scans fields annotated with
@GenerateParticleSpriteSet - Data extraction: Extracts the particle type field value and annotation parameters
-
Description creation: Creates a
ParticleDescriptionrecord with the sprite configuration -
Registration: Stores the mapping in
ApiParticleProvider.PARTICLE_SPRITESmap -
Data generation: During data generation, the
ApiParticleProviderprocesses these mappings:- Single sprites (
count <= 1): Callssprite()method - Sprite sets (
count > 1): CallsspriteSet()with frame count and reverse flag
- Single sprites (
Apply the annotation to DeferredHolder<ParticleType<?>, ParticleType<T>> fields:
public final class ExampleParticleTypes {
private static final ParticleTypeFactory PARTICLE_TYPE_FACTORY = InjectionPool.getFromInstance(ParticleTypeFactory.class);
@RegisterParticleProvider(ExampleParticle.Provider.class) // Read about this annotation in Event section
@GenerateParticleSpriteSet(id = "example:example", count = 6)
public static final DeferredHolder<ParticleType<?>, ParticleType<SimpleParticleType>> EXAMPLE_PARTICLE_TYPE =
PARTICLE_TYPE_FACTORY.create("example", true);
@RegisterParticleProvider(ExampleParticle.Provider.class) // Read about this annotation in Event section
@GenerateParticleSpriteSet(id = "example:simple", count = 1)
public static final DeferredHolder<ParticleType<?>, ParticleType<SimpleParticleType>> SIMPLE_PARTICLE_TYPE =
PARTICLE_TYPE_FACTORY.create("simple", true);
}-
id(required): Resource location for the sprite asset (e.g.,"modid:particle_name") -
count(optional, default: 1): Number of frames in the sprite set-
1: Single sprite -
> 1: Multi-frame sprite set
-
-
reverse(optional, default: false): Whether to reverse the sprite animation order
Place sprite textures in the appropriate resource directory:
src/main/resources/assets/modid/particles/particle_name.png
For sprite sets with count > 1, the framework expects either:
- A single sprite sheet with multiple frames
- Multiple numbered sprite files (depending on Minecraft's sprite set handling)
- Custom particles: When creating particles that require custom visual representations
- Animated particles: When particles need multi-frame animations
- Complex effects: When particle effects require precise sprite control
- Data-driven mods: When you want to avoid manual JSON asset management
The annotation integrates with the Temporal API's metadata processing system:
-
Strategy implementation:
GenerateParticleSpriteSetStrategyhandles the processing logic -
Data provider:
ApiParticleProviderextends NeoForge'sParticleDescriptionProvider -
Custom providers: Can extend
ApiParticleProviderfor additional particle data generation needs
The annotation works in conjunction with @RegisterParticleProvider to provide complete particle registration and sprite generation capabilities.
🚀 Getting Started
🧩 Core Concepts
⚙️ Data Generation
- ⚙️ Advancement
- ⚙️ Damage Type
- ⚙️ Chest Loot Modifier
- ⚙️ Recipe
- ⚙️ Sound
- ⚙️ Jukebox Song
- ⚙️ Enchantment
- ⚙️ Trim Material
- ⚙️ Trim Pattern
- ⚙️ Banner Pattern
- ⚙️ Painting Variant
- ⚙️ Particle Sprite Set
- ⚙️ Wolf Variant
- ⚙️ Item Model
- ⚙️ Block Model
- ⚙️ Block Loot Table
- ⚙️ Tag
- ⚙️ Language Translation
- ⚙️ World Feature
- ⚙️ Custom Properties
🚨 Events
🛠 Engine Layers
🧪 Resources
- 🧪 Examples