Data Criteria
by spadeteam
Data Criteria lets datapack authors define custom advancement criteria in JSON, which can then be used inside advancement files and triggered from code.
What it does
Authors create a criterion file under data/namespace/criteria, list its parameters with their names and types, and then reference that criterion from an advancement file. The mod ships with int and bool criteria as examples. Code can fire a criterion through the DataCriteriaAPI, which lets a mod or datapack react to events that vanilla does not track. Fabric API is required, and the mod is published for Fabric and Quilt for 1.18.2 – 1.20.1.
Key features
Data-driven criteria
Criteria are declared in JSON files, so datapacks can add new advancement conditions without Java code.
Typed parameters
Each criterion lists its parameters in order, with a name and type for every one, and optional parameters must come at the end of the group.
API trigger
Code calls DataCriteriaAPI to trigger a criterion, which then counts toward any advancement that uses it.
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Requirements
Dependencies declared by the latest file for each loader.
Required 1
Questions
Does Data Criteria need Fabric API?
In the catalog
Data Criteria is one of 3,514 Library mods on ModsFinder, and one of 2,348 Library mods for Fabric. 34,764 mods support Minecraft 1.20.1.
More from spadeteam
Similar mods
What the author says
1 - Create a criterion file. parameters is an ordered list of parameter names and types to pass in and check for. Make sure to group optional parameters at the end. 2 - Use the criterion within an advancement file.
Official listing
- Modrinth page
- modrinth.com/mod/data-criteria
- Owner
- spadeteam
- Published
- 2022-12-21
- Updated on Modrinth
- 2023-07-17
- Facts verified
- 2026-10-15
