Icommon Api Wiki › Guides › Use Resource and Datapack Metadata API
Use Resource and Datapack Metadata API
Understanding Metadata
The iCommon API Mod includes a Resource/Datapack Metadata API that lets mods read and manage information about datapacks and resource packs. This is useful for mods that need to detect which packs are loaded or access pack-specific data.
What You Can Do
Mods using this API can:
- Detect which datapacks are active in your world
- Read metadata from pack.mcmeta files
- Organize custom content by pack
- Ensure compatibility between multiple datapacks
Practical Use
If you're using a mod that depends on datapacks, the iCommon API helps that mod:
- Automatically load custom features from your active packs
- Avoid conflicts when multiple packs define similar content
- Report which packs are missing or incompatible
For Datapack Creators
If you're making datapacks for mods built on iCommon, ensure your pack.mcmeta file is properly formatted. The API will read this metadata to understand your pack's purpose and requirements. Refer to your specific mod's datapack documentation for custom metadata fields it may recognize.