-
Notifications
You must be signed in to change notification settings - Fork 0
Tag Data Generation
The Temporal API provides a comprehensive set of annotations for automatically registering tags during data generation. These annotations eliminate the need for manual JSON tag file creation by programmatically adding objects to existing or custom tags.
- Automates tag registration: Adds objects to tags without manual JSON files
- Supports multiple tag types: Covers all major Minecraft registry types
- Integrates with data generation: Works seamlessly with NeoForge's data generation system
- Enables custom tags: Supports both vanilla and custom tag creation
- Annotation processing: The framework scans fields annotated with tag annotations
-
Tag resolution: Resolves tag identifiers to appropriate
TagKeyinstances - Registration: Adds the annotated object to the specified tags
- Data generation: During data generation, tag JSON files are automatically generated
Adds blocks to specified block tags.
@AddBlockTag({"minecraft:mineable/pickaxe", "minecraft:needs_diamond_tool"})
public static final DeferredBlock<?> EXAMPLE_ORE = BLOCK_FACTORY.create("example_ore", BlockPropertiesFactory.stone());Parameters:
-
value(required): Array of tag resource locations to add the block to
Adds items to specified item tags.
@AddItemTag({"example:repairs_example_armor", "minecraft:trim_materials"})
public static final DeferredItem<?> EXAMPLE_INGOT = ITEM_FACTORY.create("example_ingot");Parameters:
-
value(required): Array of tag resource locations to add the item to
Adds entity types to specified entity tags.
Parameters:
-
value(required): Array of tag resource locations to add the entity type to
Adds cat variants to specified cat variant tags.
@AddCatVariantTag("minecraft:default_spawns")
public static final DeferredHolder<CatVariant, CatVariant> EXAMPLE = CAT_VARIANT_FACTORY.create("example");Parameters:
-
value(required): Array of tag resource locations to add the cat variant to
Adds biomes to specified biome tags.
Parameters:
-
value(required): Array of tag resource locations to add the biome to
Adds structures to specified structure tags.
Parameters:
-
value(required): Array of tag resource locations to add the structure to
Adds enchantments to specified enchantment tags.
Parameters:
-
value(required): Array of tag resource locations to add the enchantment to
Adds game events to specified game event tags.
Parameters:
-
value(required): Array of tag resource locations to add the game event to
Adds damage types to specified damage type tags.
Parameters:
-
value(required): Array of tag resource locations to add the damage type to
Adds fluids to specified fluid tags.
Parameters:
-
value(required): Array of tag resource locations to add the fluid to
Adds instruments to specified instrument tags.
@AddInstrumentTag("example:example")
public static final DeferredHolder<Instrument, Instrument> EXAMPLE = INSTRUMENT_FACTORY.create("example", ExampleSounds.EXAMPLE_SOUND, 10, 15f);Parameters:
-
value(required): Array of tag resource locations to add the instrument to
Adds painting variants to specified painting variant tags.
Parameters:
-
value(required): Array of tag resource locations to add the painting variant to
Adds point of interest types to specified POI tags.
Parameters:
-
value(required): Array of tag resource locations to add the POI type to
Adds banner patterns to specified banner pattern tags.
Parameters:
-
value(required): Array of tag resource locations to add the banner pattern to
Registers a class as a tag container for dynamic tag resolution (it is mandatory for use inside any other data generation annotation).
@AddTagContainer(TagContainerType.ITEM)
public final class ExampleItemTags {
public static final TagKey<Item> REPAIRS_EXAMPLE_ARMOR = TagUtils.createItem("repairs_example_armor");
}Parameters:
-
value(required): Type of tag container (ITEM,BLOCK,BIOME,ENCHANTMENT)
Available container types:
-
ITEM: Item tag container -
BLOCK: Block tag container -
BIOME: Biome tag container -
ENCHANTMENT: Enchantment tag container
Tags follow Minecraft's standard resource location format:
namespace:tag_name
Examples:
-
"minecraft:mineable/pickaxe"- Vanilla tag -
"example:custom_tag"- Custom tag
- Tool requirements: Use appropriate mining tags for blocks
- Mechanical behavior: Use tags for game mechanics (trimming, fuel, etc.)
- Entity grouping: Use entity tags for mob behavior and spawning
- World generation: Use biome and structure tags for world features
- Custom categories: Create custom tags for mod-specific grouping
- Compatibility: Use Forge tags for cross-mod compatibility
The annotation system integrates with Temporal API's metadata processing:
- Tag resolution: Automatic tag key creation and resolution
- Container management: Dynamic tag container registration
- Cross-mod support: Built-in support for Forge tags
- Custom tags: Automatic creation of custom tag files
Each annotation maps to a specific tag registration strategy that handles the tag addition logic, allowing for easy extension and customization of the tag registration system.
🚀 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