Minecraft:Predicate: Difference between revisions
More actions
Sync: updated from Minecraft |
Sync: updated from Minecraft |
||
| Line 14: | Line 14: | ||
{{Data pack directory|predicate|<nowiki><name>.json</nowiki>}} | {{Data pack directory|predicate|<nowiki><name>.json</nowiki>}} | ||
== Usage == | == Usage == | ||
| Line 26: | Line 24: | ||
* {{Cmd|execute}}: A subcommand, <code>/execute if predicate</code>, can invoke a predicate file or an in-line predicate definition to either return a result or to decide whether to continue with a subcommand chain. The predicate is invoked once at the current contextual position of execution. | * {{Cmd|execute}}: A subcommand, <code>/execute if predicate</code>, can invoke a predicate file or an in-line predicate definition to either return a result or to decide whether to continue with a subcommand chain. The predicate is invoked once at the current contextual position of execution. | ||
=== Other predicates === | === Other predicates {{Until|26.3}} === | ||
The condition type <code>minecraft:reference</code> invokes a predicate file and returns the result to the invoker. | The condition type <code>minecraft:reference</code> invokes a predicate file and returns the result to the invoker. | ||
| Line 68: | Line 66: | ||
<div class="treeview" style="margin-block-end: 1em;"> | <div class="treeview" style="margin-block-end: 1em;"> | ||
* | * {{nbt|compound}}: The root element of the predicate. | ||
** {{nbt|string|type}}: The [[Minecraft:resource location]] of the condition type to check. | ** {{nbt|string|type}}: The [[Minecraft:resource location]] of the condition type to check. | ||
** Other parts of the predicate, specified below. In lists each element must evaluate to true for the predicate to pass. | ** Other parts of the predicate, specified below. In lists each element must evaluate to true for the predicate to pass. | ||
| Line 77: | Line 75: | ||
<div class="treeview" id="condition_all_of" style="margin-block-end: 1em;"> | <div class="treeview" id="condition_all_of" style="margin-block-end: 1em;"> | ||
* '''all_of''' — Evaluates a list of predicates and passes if all of them pass. Invokable from <b><span style="color:#00af89">any context</span></b>. | * '''all_of''' — Evaluates a list of predicates and passes if all of them pass. Invokable from <b><span style="color:#00af89">any context</span></b>. | ||
** {{nbt| | ** {{Nbt|string}}{{Nbt|list}}{{nbt|compound|terms}}: An inline value, a single namespaced ID, a list of inline values, a list of namespaced IDs, or a hash-prefixed tag ID of a {{cd|minecraft:predicate}} type. | ||
*** {{nbt| | *** {{nbt|string}}{{nbt|compound|A predicate}}, following this structure recursively. | ||
</div> | </div> | ||
<div class="treeview" id="condition_alternative" style="margin-block-end: 1em;"> | <div class="treeview" id="condition_alternative" style="margin-block-end: 1em;"> | ||
* '''any_of''' — Evaluates a list of predicates and passes if any one of them passes. Invokable from <b><span style="color:#00af89">any context</span></b>. | * '''any_of''' — Evaluates a list of predicates and passes if any one of them passes. Invokable from <b><span style="color:#00af89">any context</span></b>. | ||
** {{nbt| | ** {{Nbt|string}}{{Nbt|list}}{{nbt|compound|terms}}: An inline value, a single namespaced ID, a list of inline values, a list of namespaced IDs, or a hash-prefixed tag ID of a {{cd|minecraft:predicate}} type. | ||
*** {{nbt| | *** {{nbt|string}}{{nbt|compound|A predicate}}, following this structure recursively. Note that ''any_of'' only applies to {{nbt|list|terms}}, nested lists are ''all_of''. | ||
</div> | </div> | ||
| Line 100: | Line 98: | ||
<div class="treeview" id="condition_entity_properties" style="margin-block-end: 1em;"> | <div class="treeview" id="condition_entity_properties" style="margin-block-end: 1em;"> | ||
* '''entity_properties''' — Checks properties of an entity. Invokable from <b><span style="color:#00af89">any context</span></b>. | * '''entity_properties''' — Checks properties of an entity. Invokable from <b><span style="color:#00af89">any context</span></b>. | ||
** {{nbt|string|entity}}: The entity to check. Specifies an entity from [[Minecraft:loot context]]. Can be {{Loot entity target}} | ** {{nbt|string|entity}}: The entity to check. Specifies an entity from [[Minecraft:loot context]]. Can be {{Loot entity target}} | ||
** {{nbt|compound|predicate}}: Predicate applied to entity, uses same structure as advancements. | ** {{nbt|compound|predicate}}: Predicate applied to entity, uses same structure as advancements. | ||
*** {{nbt inherit/conditions/entity|indent=***}} | *** {{nbt inherit/conditions/entity|indent=***}} | ||
| Line 110: | Line 108: | ||
** {{nbt|compound|scores}}: Scores to check. All specified scores must pass for the condition to pass. | ** {{nbt|compound|scores}}: Scores to check. All specified scores must pass for the condition to pass. | ||
*** {{nbt|compound|A score}}: Key name is the objective while the value specifies a range of score values required for the condition to pass. | *** {{nbt|compound|A score}}: Key name is the objective while the value specifies a range of score values required for the condition to pass. | ||
**** {{nbt|int}}{{nbt|compound|min}}: An inline value or a namespaced ID of a {{cd|minecraft: | **** {{Nbt|string}}{{nbt|int}}{{nbt|compound|min}}: An inline value or a namespaced ID of a {{cd|minecraft:context_int_provider}} type. Minimum score. Optional. | ||
**** {{nbt|int}}{{nbt|compound|max}}: An inline value or a namespaced ID of a {{cd|minecraft: | **** {{Nbt|string}}{{nbt|int}}{{nbt|compound|max}}: An inline value or a namespaced ID of a {{cd|minecraft:context_int_provider}} type. Maximum score. Optional. | ||
*** {{nbt|int|A score}}: Shorthand version of the other syntax above, to check the score against a single | *** {{Nbt|string}}{{nbt|int|A score}}: A single int or a namespaced ID of a {{cd|minecraft:context_int_provider}} type. Shorthand version of the other syntax above, to check the score against a single int only. Key name is the objective while the value is the required score. | ||
</div> | </div> | ||
<div class="treeview" id="condition_float_value_check" style="margin-block-end: 1em;"> | <div class="treeview" id="condition_float_value_check" style="margin-block-end: 1em;"> | ||
* '''float_value_check''' — Compares a float against another float or range of floats. Invokable from <b><span style="color:#00af89">any context</span></b>. | * '''float_value_check''' — Compares a float against another float or range of floats. Invokable from <b><span style="color:#00af89">any context</span></b>. | ||
** {{nbt|float}}{{nbt|compound|value}}: An inline value or a namespaced ID of a {{cd|minecraft:context_float_provider}} type. The number to test. | ** {{Nbt|string}}{{nbt|float}}{{nbt|compound|value}}: An inline value or a namespaced ID of a {{cd|minecraft:context_float_provider}} type. The number to test. | ||
** {{nbt|compound|test}}: The range of floats to compare {{nbt| | ** {{nbt|compound|test}}: The range of floats to compare {{Nbt|string}}{{nbt|float}}{{nbt|compound|value}} against. | ||
*** {{nbt|float}}{{nbt|compound|min}}: An inline value or a namespaced ID of a {{cd|minecraft:context_float_provider}} type. The minimum value. | *** {{Nbt|string}}{{nbt|float}}{{nbt|compound|min}}: An inline value or a namespaced ID of a {{cd|minecraft:context_float_provider}} type. The minimum value. | ||
*** {{nbt|float}}{{nbt|compound|max}}: An inline value or a namespaced ID of a {{cd|minecraft:context_float_provider}} type. The maximum value. | *** {{Nbt|string}}{{nbt|float}}{{nbt|compound|max}}: An inline value or a namespaced ID of a {{cd|minecraft:context_float_provider}} type. The maximum value. | ||
** {{ | ** {{Nbt|string}}{{nbt|float|test}}: A single float or a namespaced ID of a {{cd|minecraft:context_float_provider}} type. Shorthand version of {{nbt|compound|test}} above, used to compare {{Nbt|string}}{{nbt|float}}{{nbt|compound|value}} against a single float only. | ||
</div> | </div> | ||
<div class="treeview" id="condition_int_value_check" style="margin-block-end: 1em;"> | <div class="treeview" id="condition_int_value_check" style="margin-block-end: 1em;"> | ||
* '''int_value_check''' — Compares an int against another int or range of ints. Invokable from <b><span style="color:#00af89">any context</span></b>. | * '''int_value_check''' — Compares an int against another int or range of ints. Invokable from <b><span style="color:#00af89">any context</span></b>. | ||
** {{nbt|int}}{{nbt|compound|value}}: An inline value or a namespaced ID of a {{cd|minecraft:context_int_provider}} type. The number to test. | ** {{Nbt|string}}{{nbt|int}}{{nbt|compound|value}}: An inline value or a namespaced ID of a {{cd|minecraft:context_int_provider}} type. The number to test. | ||
** {{nbt|compound|test}}: The range of numbers to compare {{nbt|int}}{{nbt|compound|value}} against. | ** {{nbt|compound|test}}: The range of numbers to compare {{Nbt|string}}{{nbt|int}}{{nbt|compound|value}} against. | ||
*** {{nbt|int}}{{nbt|compound|min}}: An inline value or a namespaced ID of a {{cd|minecraft:context_int_provider}} type. The minimum value. | *** {{Nbt|string}}{{nbt|int}}{{nbt|compound|min}}: An inline value or a namespaced ID of a {{cd|minecraft:context_int_provider}} type. The minimum value. | ||
*** {{nbt|int}}{{nbt|compound|max}}: An inline value or a namespaced ID of a {{cd|minecraft:context_int_provider}} type. The maximum value. | *** {{Nbt|string}}{{nbt|int}}{{nbt|compound|max}}: An inline value or a namespaced ID of a {{cd|minecraft:context_int_provider}} type. The maximum value. | ||
** {{ | ** {{Nbt|string}}{{nbt|int|test}}: A single int or a namespaced ID of a {{cd|minecraft:context_int_provider}} type. Shorthand version of {{nbt|compound|test}} above, used to compare {{Nbt|string}}{{nbt|int}}{{nbt|compound|value}} against a single int only. | ||
</div> | </div> | ||
<div class="treeview" id="condition_inverted" style="margin-block-end: 1em;"> | <div class="treeview" id="condition_inverted" style="margin-block-end: 1em;"> | ||
* '''inverted''' — Inverts another predicate condition. Invokable from <b><span style="color:#00af89">any context</span></b>. | * '''inverted''' — Inverts another predicate condition. Invokable from <b><span style="color:#00af89">any context</span></b>. | ||
** {{nbt|compound|term}}: An inline value or a namespaced ID of a {{cd|minecraft:predicate}} type. | ** {{Nbt|string}}{{nbt|compound|term}}: An inline value or a namespaced ID of a {{cd|minecraft:predicate}} type. | ||
</div> | </div> | ||
| Line 168: | Line 166: | ||
<div class="treeview" id="condition_random_chance" style="margin-block-end: 1em;"> | <div class="treeview" id="condition_random_chance" style="margin-block-end: 1em;"> | ||
* '''random_chance''' — Generates a random number between 0.0 and 1.0, and checks if it is less than a specified value. Invokable from <b><span style="color:#00af89">any context</span></b>. | * '''random_chance''' — Generates a random number between 0.0 and 1.0, and checks if it is less than a specified value. Invokable from <b><span style="color:#00af89">any context</span></b>. | ||
** {{nbt|float}}{{nbt|compound|chance}}: An inline value or a namespaced ID of a {{cd|minecraft: | ** {{Nbt|string}}{{nbt|float}}{{nbt|compound|chance}}: An inline value or a namespaced ID of a {{cd|minecraft:context_float_provider}} type. Success rate as a number 0.0 – 1.0. | ||
</div> | </div> | ||
| Line 192: | Line 190: | ||
** {{nbt|string|clock}}: {{json ref|world clock}} to check the time of. | ** {{nbt|string|clock}}: {{json ref|world clock}} to check the time of. | ||
** {{nbt|compound|value}}: The time to compare the day time against. | ** {{nbt|compound|value}}: The time to compare the day time against. | ||
*** {{nbt|int}}{{nbt|compound|min}}: An inline value or a namespaced ID of a {{cd|minecraft: | *** {{Nbt|string}}{{nbt|int}}{{nbt|compound|min}}: An inline value or a namespaced ID of a {{cd|minecraft:context_int_provider}} type. The minimum value. | ||
*** {{nbt|int}}{{nbt|compound|max}}: An inline value or a namespaced ID of a {{cd|minecraft: | *** {{Nbt|string}}{{nbt|int}}{{nbt|compound|max}}: An inline value or a namespaced ID of a {{cd|minecraft:context_int_provider}} type. The maximum value. | ||
** {{nbt|int|value}}: Shorthand version of {{nbt|compound|value}} above, used to check for a single value only | ** {{Nbt|string}}{{nbt|int|value}}: A single int or a namespaced ID of a {{cd|minecraft:context_int_provider}} type. Shorthand version of {{nbt|compound|value}} above, used to check for a single value only. | ||
** {{nbt|int|period}}: If present, the day time is first reduced modulo the given number before being checked against {{nbt| | ** {{nbt|int|period}}: If present, the day time is first reduced modulo the given number before being checked against {{Nbt|string}}{{nbt|int}}{{nbt|compound|value}}. For example, setting this to 24000 causes the checked time to be equal to the current daytime. | ||
</div> | </div> | ||
Revision as of 11:15, 27 September 2026
Template:For Template:Exclusive
A predicate (also known as a loot condition) is a data structure commonly used throughout data packs and commands, invoked to check boolean conditions either in the world or within a given Minecraft:loot context. Predicates do not change data or affect the world, they only check information (that they have access to) and return either a pass or a fail. They can be defined and registered in Minecraft:data packs, or they can be directly defined "in-line" in various places. They can be used throughout the game such as in commands, Minecraft:loot tables, and Minecraft:advancements. In practical terms, predicates are a flexible way for data packs to encode "if this, then that" logic without needing custom code.
Predicate files are standalone Minecraft:JSON files in data packs containing the definition for a predicate. The file path indicates the Minecraft:namespaced identifier used to reference it.
This article describes how predicates are defined and invoked, and also describes the JSON structure of a predicate.
Definition
A predicate file is defined with the Minecraft:JSON format.
Predicate files are part of the data pack directory structure, highlighted below:
Usage
Predicates and predicate files can be invoked in several different manners from other data pack files:
Commands
Minecraft:Commands or functions can invoke predicate files in two ways:
- Minecraft:Target selectors: The selector argument
predicate=checks predicate files as a filter for entity selection. The predicate file is invoked once per entity that needs filtering, each time being at the entity's location. - Template:Cmd: A subcommand,
/execute if predicate, can invoke a predicate file or an in-line predicate definition to either return a result or to decide whether to continue with a subcommand chain. The predicate is invoked once at the current contextual position of execution.
Other predicates Template:Until
The condition type minecraft:reference invokes a predicate file and returns the result to the invoker.
Presence in other files
In addition to predicate files, predicates themselves are used in other locations within other data pack files such as advancements and loot tables.
Examples
Below are a few simple predicate examples for context.
Example 1: Check if player is holding a diamond sword
{
"type": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"items": ["minecraft:diamond_sword"]
}
}
}
}
Example 2: Only run if it’s daytime
{
"type": "minecraft:time_check",
"value": { "min": 0, "max": 12000 },
"period": 24000
}
Example 3: Nested example using any_of
{
"type": "minecraft:any_of",
"terms": [
{ "type": "minecraft:random_chance", "chance": 0.25 },
{ "type": "minecraft:weather_check", "raining": true }
]
}These snippets can be placed inside Template:Cd within a data pack, then referenced using commands such as:
/execute if predicate my_pack:daytime_check run say Good morning!
JSON format
This section describes the JSON format of a predicate.
- Template:Nbt: The root element of the predicate.
- Template:Nbt: The Minecraft:resource location of the condition type to check.
- Other parts of the predicate, specified below. In lists each element must evaluate to true for the predicate to pass.
The possible values for Template:Nbt and associated extra contents:
- all_of — Evaluates a list of predicates and passes if all of them pass. Invokable from any context.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value, a single namespaced ID, a list of inline values, a list of namespaced IDs, or a hash-prefixed tag ID of a Template:Cd type.
- Template:NbtTemplate:Nbt, following this structure recursively.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value, a single namespaced ID, a list of inline values, a list of namespaced IDs, or a hash-prefixed tag ID of a Template:Cd type.
- any_of — Evaluates a list of predicates and passes if any one of them passes. Invokable from any context.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value, a single namespaced ID, a list of inline values, a list of namespaced IDs, or a hash-prefixed tag ID of a Template:Cd type.
- Template:NbtTemplate:Nbt, following this structure recursively. Note that any_of only applies to Template:Nbt, nested lists are all_of.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value, a single namespaced ID, a list of inline values, a list of namespaced IDs, or a hash-prefixed tag ID of a Template:Cd type.
- damage_source_properties — Checks properties of the damage source. Requires origin and damage source provided by Minecraft:loot context, and always fails if not provided.
- Template:Nbt: Predicate applied to the damage source.
- enchantment_active_check — Checks if the enchantment has been active. Requires enchantment active status provided by Minecraft:loot context, and always fails if not provided. It is therefore only usable from the Template:Cd loot context.
- Template:Nbt: Whether to check for an active (Template:Cd) or inactive (Template:Cd) enchantment.
- entity_properties — Checks properties of an entity. Invokable from any context.
- Template:Nbt: The entity to check. Specifies an entity from Minecraft:loot context. Can be Template:Loot entity target
- Template:Nbt: Predicate applied to entity, uses same structure as advancements.
- entity_scores — Checks the Minecraft:scoreboard scores of an entity. Requires the specified entity provided by Minecraft:loot context, and always fails if not provided.
- Template:Nbt: The entity to check. Specifies an entity from Minecraft:loot context. Can be Template:Loot entity target.
- Template:Nbt: Scores to check. All specified scores must pass for the condition to pass.
- Template:Nbt: Key name is the objective while the value specifies a range of score values required for the condition to pass.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value or a namespaced ID of a Template:Cd type. Minimum score. Optional.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value or a namespaced ID of a Template:Cd type. Maximum score. Optional.
- Template:NbtTemplate:Nbt: A single int or a namespaced ID of a Template:Cd type. Shorthand version of the other syntax above, to check the score against a single int only. Key name is the objective while the value is the required score.
- Template:Nbt: Key name is the objective while the value specifies a range of score values required for the condition to pass.
- float_value_check — Compares a float against another float or range of floats. Invokable from any context.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value or a namespaced ID of a Template:Cd type. The number to test.
- Template:Nbt: The range of floats to compare Template:NbtTemplate:NbtTemplate:Nbt against.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value or a namespaced ID of a Template:Cd type. The minimum value.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value or a namespaced ID of a Template:Cd type. The maximum value.
- Template:NbtTemplate:Nbt: A single float or a namespaced ID of a Template:Cd type. Shorthand version of Template:Nbt above, used to compare Template:NbtTemplate:NbtTemplate:Nbt against a single float only.
- int_value_check — Compares an int against another int or range of ints. Invokable from any context.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value or a namespaced ID of a Template:Cd type. The number to test.
- Template:Nbt: The range of numbers to compare Template:NbtTemplate:NbtTemplate:Nbt against.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value or a namespaced ID of a Template:Cd type. The minimum value.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value or a namespaced ID of a Template:Cd type. The maximum value.
- Template:NbtTemplate:Nbt: A single int or a namespaced ID of a Template:Cd type. Shorthand version of Template:Nbt above, used to compare Template:NbtTemplate:NbtTemplate:Nbt against a single int only.
- inverted — Inverts another predicate condition. Invokable from any context.
- Template:NbtTemplate:Nbt: An inline value or a namespaced ID of a Template:Cd type.
- killed_by_player — Checks if there is a Template:Cd entity provided by Minecraft:loot context. Requires Template:Cd entity provided by Minecraft:loot context, and always fails if not provided.
- location_check — Checks the current location against location criteria. Requires origin provided by Minecraft:loot context, and always fails if not provided.
- Template:Nbt: An optional x offset to the location.
- Template:Nbt: An optional y offset to the location.
- Template:Nbt: An optional z offset to the location.
- Template:Nbt: Predicate applied to location, uses same structure as advancements.
- match_block — Matches block state and optionally block entity data and components (if present).
- Template:NbtTemplate:Nbt: Optional; Can be a single block ID, a list of namespaced block IDs, or a hash-prefixed block tag to match.
- Template:Nbt: Optional; The block state property keys to values to match.
- Template:Nbt: Optional; Minecraft:Block entity NBT to match. See Minecraft:Block entity format. Match will fail if the field is present, but the block entity is not available in context.
- Template:Nbt: Optional; Map of exact components to match. Match will fail if the field is present, but the block entity is not available in context.
- Template:Nbt: Optional; Map of component predicates to match. Match will fail if the field is present, but the block entity is not available in context.
- match_tool — Checks tool used to mine the block. Requires tool provided by Minecraft:loot context, and always fails if not provided.
- Template:Nbt: Predicate applied to item, uses same structure as advancements.
- random_chance — Generates a random number between 0.0 and 1.0, and checks if it is less than a specified value. Invokable from any context.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value or a namespaced ID of a Template:Cd type. Success rate as a number 0.0 – 1.0.
- random_chance_with_enchanted_bonus — Generates a random number between 0.0 and 1.0, and checks if it is less than the value determined using the level of a given enchantment. Requires
attackerentity provided by Minecraft:loot context, and if not provided, the enchantment level is regarded as 0.- Template:Nbt: The success rate to use when the enchantment is not present; 0.0–1.0.
- Template:NbtTemplate:Nbt: Minecraft:level-based value. The success rate based on the level when then enchantment is present; 0.0–1.0.
- Template:Nbt: Template:Json ref/enchantment. The enchantment whose level to use for the chance calculation. If the enchantment is not present, uses Template:Cd as level.
- survives_explosion — Returns success with Template:Cd probability. Requires explosion radius provided by Minecraft:loot context, and always success if not provided.
- table_bonus — Passes with probability picked from a list, indexed by enchantment power. Requires tool provided by Minecraft:loot context. If not provided, the enchantment level is regarded as 0.
- Template:Nbt: Minecraft:Resource location of enchantment.
- Template:Nbt: List of probabilities for enchantment power, indexed from 0.
- time_check — Compares the current day time (or rather,
24000 * day count + day time) against given values. Invokable from any context.- Template:Nbt: Template:Json ref to check the time of.
- Template:Nbt: The time to compare the day time against.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value or a namespaced ID of a Template:Cd type. The minimum value.
- Template:NbtTemplate:NbtTemplate:Nbt: An inline value or a namespaced ID of a Template:Cd type. The maximum value.
- Template:NbtTemplate:Nbt: A single int or a namespaced ID of a Template:Cd type. Shorthand version of Template:Nbt above, used to check for a single value only.
- Template:Nbt: If present, the day time is first reduced modulo the given number before being checked against Template:NbtTemplate:NbtTemplate:Nbt. For example, setting this to 24000 causes the checked time to be equal to the current daytime.
- weather_check — Checks the current game weather. Invokable from any context.
- Template:Nbt: If true, the condition passes only if it is raining or thundering.
- Template:Nbt: If true, the condition passes only if it is thundering.
History
See also
- Minecraft:Data pack – where predicates are defined and stored
- Minecraft:Loot table – one of the most common predicate users
- Minecraft:Advancement – another system that embeds predicates
- Minecraft:Execute – command subcomponent that can run predicates
External links
Template:Navbox Java Edition technical
Minecraft:de:Prädikate Minecraft:fr:Prédicat Minecraft:ja:プレディケート Minecraft:pt:Predicado Minecraft:zh:谓词