【发布时间】:2021-02-09 21:34:31
【问题描述】:
我已经遵循了几个教程,并让“player is_sprinting:true”谓词起作用。所以我知道我的新数据包正在工作。
在任何地方都没有位置谓词的示例。视频、wiki,什么都没有。
我转到生成器并生成整个谓词,导出整个文件,将其放在正确的文件夹中,当我在我的 tick.mc 函数中键入路径时,Visual Studio Code 正确链接到它(最后不得不创建一个新项目并重新启动我的计算机,以使新项目不会自动填充旧项目的路径...由于某种原因)。
它不会检测玩家何时在 0 0 0 的 100 以内。它什么也不做。这是我尝试过的:
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"type": "minecraft:player",
"location": {
"position": {
"x": 0,
"y": 0,
"z": 0
}
},
"distance": {
"absolute": {
"min": 0,
"max": 100
}
}
}
}
还有……
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"type": "minecraft:player",
"distance": {
"absolute": {
"min": 0,
"max": 100
}
}
}
}
还有……
{
"condition": "minecraft:location_check",
"predicate": {
"position": {
"x": {
"min": -100,
"max": 100
},
"y": {
"min": -100,
"max": 100
},
"z": {
"min": -100,
"max": 100
}
}
}
}
全部结合:
execute as @a if predicate test:homezone run say hi
或者:
execute as @a[predicate=test:homezone] run say hi
我的玩家正站在一张新地图中,位于 0,0,0 处,没有其他功能在运行。我有什么问题?
【问题讨论】:
标签: json minecraft predicate minecraft-forge