-
Notifications
You must be signed in to change notification settings - Fork 0
Trim Pattern Data Generation
Maksym Uimanov edited this page Feb 12, 2026
·
1 revision
The @GenerateTrimPattern annotation is a data generation annotation that automatically creates armor trim pattern definitions for Minecraft mods using the Temporal API. It eliminates the need for manual JSON configuration by generating the necessary data providers at runtime.
- Automatic data generation: Creates trim pattern definitions without manual JSON files
- Template association: Links trim patterns to their smithing template items
- Decal configuration: Controls whether the pattern renders as a decal overlay
- Integration with data providers: Seamlessly integrates with NeoForge's trim pattern data generation system
-
Annotation processing: The annotation is processed by
GenerateTrimPatternStrategyduring the data generation phase -
Field extraction: The strategy extracts the
ResourceKey<TrimPattern>from the annotated field -
Description creation: Creates a
TrimPatternDescriptioncontaining the template item and decal setting -
Provider registration: Automatically registers the trim pattern with
ApiTrimPatternProviderfor data generation
Apply the annotation to static fields of type ResourceKey<TrimPattern>:
public final class ModTrimPatterns {
@GenerateTrimPattern(
item = "mymod:custom_smithing_template",
decal = false
)
public static final ResourceKey<TrimPattern> CUSTOM_TRIM_PATTERN =
ResourceUtils.createKey(Registries.TRIM_PATTERN, "custom_pattern");
}- item (String): The smithing template item resource location that represents this trim pattern
- decal (boolean, default false): Whether the pattern should render as a decal overlay instead of a normal trim pattern
The annotation integrates with the Temporal API's strategy system:
-
Strategy implementation:
GenerateTrimPatternStrategyhandles the processing logic -
Provider system: Uses
ApiTrimPatternProviderfor data generation -
Transformer support: Compatible with
TrimPatternTransformerfor additional processing
Use @GenerateTrimPattern when:
- Creating custom armor trim patterns for your mod
- Defining patterns with specific smithing template requirements
- Creating decal-style overlays for armor customization
- Automating data generation for armor pattern content
The annotation is particularly useful for mods with multiple trim patterns, as it centralizes pattern configuration and eliminates manual JSON file management while providing control over how patterns are rendered and applied to armor pieces.
🚀 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