Mineuniverse
Log in Register
Mods

Data Criteria

Data-driven advancement criteria
by acikek
Claim this project
691 downloads
0 likes
Updated Jun 30, 2026
0 hypes

Data-driven advancement criteria.

 

Why?

 

Check out this page for an example of creating advancement criteria without this mod. See the the rest of the wiki for complete documentation.

 

Example

 

  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.

 

data/namespace/criteria/int_and_bool.json
{

  "parameters": [
    {
      "name": "number",
      "type": "datacriteria:int"

    },
    {
      "name": "possible",
      "type": "datacriteria:bool",
      "optional": true
    }
  ]
}


2. Use the criterion within an advancement file.

 
{
  // ...
  "criteria": {
    "test": {
      "trigger": "namespace:int_and_bool",
      "conditions": {
        "number": 5,
        // As 'possible' is optional, it's not required in the conditions
      }
    }
  }
  // ...
}

 

3. Trigger the criterion through DataCriteriaAPI.


DataCriteriaAPI.trigger(
    new Identifier("namespace:int_and_bool"),
    serverPlayer,
    // The parameters begin here
    10, true
);

 

 

License

 

MIT © 2022 spadeteam

No files available for download.

More from acikek

Calibrated Access
725,678
The Printer
64,722
Void Crafting
6,185
qCraft Reimagined
4,291
Purpeille
31,625
Pescatore
3,026

You Might Also Like

Vivecraft
A Minecraft VR mod on a loader of your choice!
9,988,339
Athena
A crossplatform (Forge/Fabric) solution to connected block textures for 1.19.4+
99,799,527
Lodestone
A collection of code used throughout projects under the Lodestar team.
9,914,417
TheDragonLib
A library for most of sokratis12GR's Mods
9,910,232
Multi Mob Library
A library mod containing essential files for Daveyx0's mob mods
9,892,767
FTB Library (Forge) (Legacy)
FTB Library is a library mod that is used for some of our mods.
98,265,314