介绍
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
常见问题
Data Criteria 支持哪些 Minecraft 版本?
Data Criteria 支持 Minecraft Java 版 1.18.2–1.20.1,共 8 个版本,可用的加载器:Fabric / Quilt。下载时注意选择和你游戏版本一致的文件。
Data Criteria 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Quilt,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
spadeteam 的其他作品
查看全部 →
Calibrated Access
A balanced solution for remote block interaction
Purpeille
Endgame resource expansion; ancient technology; a journey of allegiance
The Printer
Duplicate items at the cost of experience and time
Ochetgenyo
Decorate your walls with an ancient language
评论
登录后评论和评分