-
Notifications
You must be signed in to change notification settings - Fork 0
Painting Variant Data Generation
The @GeneratePainting annotation is a data generation annotation that automatically creates painting variant 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 painting variant definitions without manual JSON files
- Dimension configuration: Defines the width and height of painting variants
-
Tag integration: Automatically adds paintings to the
minecraft:placeabletag - Integration with data providers: Seamlessly integrates with NeoForge's painting variant data generation system
-
Annotation processing: The annotation is processed by
GeneratePaintingStrategyduring the data generation phase -
Field extraction: The strategy extracts the
ResourceKey<PaintingVariant>from the annotated field -
Description creation: Creates a
PaintingVariantDescriptioncontaining the variant resource key and dimensions -
Provider registration: Automatically registers the painting variant with
ApiPaintingVariantProviderfor data generation -
Tag assignment: Automatically adds the painting to the
minecraft:placeabletag
Apply the annotation to static fields of type ResourceKey<PaintingVariant>:
public final class ModPaintings {
@GeneratePainting(width = 2, height = 1)
public static final ResourceKey<PaintingVariant> CUSTOM_PAINTING =
ResourceUtils.createKey(Registries.PAINTING_VARIANT, "custom_painting");
}- width (int, default 1): The width of the painting in block units
- height (int, default 1): The height of the painting in block units
The annotation integrates with the Temporal API's strategy system:
-
Strategy implementation:
GeneratePaintingStrategyhandles the processing logic -
Provider system: Uses
ApiPaintingVariantProviderfor data generation -
Transformer support: Compatible with
PaintingVariantTransformerfor additional processing -
Tag integration: Automatically adds paintings to the
minecraft:placeabletag
Use @GeneratePainting when:
- Creating custom painting variants for your mod
- Defining paintings with specific dimensions for different wall spaces
- Automating data generation for decorative content
- Ensuring consistent painting configuration across your mod
The annotation is particularly useful for mods with multiple paintings, as it centralizes painting configuration and eliminates manual JSON file management while providing control over painting dimensions. The automatic tag assignment ensures that all generated paintings are properly placeable in the game world.
🚀 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