Examples will be shown in JSON format (with comments using //
, but you shouldn't copy them). If mod that uses it uses different/incompatible format,
check its page for information on how to remap it.
{
"type": "all",
"values": [
/* List of predicates */
]
}
Returns true if all contained predicates have success value of true.
{
"type": "any",
"values": [
/* List of predicates */
]
}
Returns true if at least one contained predicates have success value of true.
{
"type": "equal", // "less_than", "less_or_equal", "more_than" or "more_or_equal"
// A string (text in quotes), a number or predicate definition
"value_1": "",
// Same as "value_1"
"value_2": ""
}
Checks if value_1 (static or result of predicate) is equal to/less_than/more_than value_2. Depends on type.
{
"type": "negate",
// Predicate definition
"value": {
"type": "..."
}
}
Negates success value of provided predicate.
{
"type": "operator",
// Operator level of player
"operator": 4
}
Checks if player has required operator level.
{
"type": "statistic",
// (Optional) Statistic type to check agains (defaults to "minecraft:custom")
"stat_type": "minecraft:custom",
// Key of the statistic, an identifier
"key": ""
}
Checks and returns value of player's statistic with success value of true if it's higher than 0. Should be used with other predicates.
See https://minecraft.wiki/w/Statistics#Statistic_types_and_names
{
"type": "entity",
// Vanilla predicate definition
"value": {
/* More json here */
}
}
Checks using Vanilla (advancement) predicates.
See https://minecraft.wiki/w/Template:Nbt_inherit/conditions/entity
{
"type": "permission",
// Permission key required by player
"permission": "...",
// (Optional) Alternative operator level (number)
"operator": 4
}
Checks if player has specified permission.
{
"type": "permission_option",
// Option key
"option": "..."
}
Checks if player has specified option set by permission mod. Should be used with others for more specific checks (see Comparator predicates).
{
"type": "placeholder",
// Placeholder value with arguments, without `%`, for example "player:displayname"
"placeholder": "...",
// (Optional) Boolean, making it return raw value (if provides string, it won't be formatted). Defaults to false
"raw": false
}
Returns value of provided placeholder, to be used with other comparators.
{
// [X] needs to be replaced with entity, player, world, game_profile
"type": "has_[X]"
}
Checks if Entity/Player/World/Game Profile is present.
{
"type": "starts_with",
// A string (text in quotes), a number or predicate definition
"input": "",
"argument": "",
}
Checks if input starts with argument (converted to strings)
{
"type": "ends_with",
// A string (text in quotes), a number or predicate definition
"input": "",
"argument": "",
}
Checks if input starts with argument (converted to strings)