Data Criteria
No reviews yet
Data-driven advancement criteria
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
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
- 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
Why?
Check out this page for an example of creating advancement criteria without this mod. See 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
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources