Entity Documentation - minecraft:behavior.target_when_pushed
minecraft:behavior.target_when_pushed
compels an entity to target the entity that pushed it.
Parameters
Name | Default Value | Type | Description |
---|---|---|---|
entity_types | not set | JSON Object | List of entity types that this mob considers valid targets. |
percent_chance | 5.0 | Decimal | Probability that the entity will target the entity that pushed it. |
priority | not set | Integer | The higher the priority, the sooner this behavior will be executed as a goal. |
Example
"minecraft:behavior.target_when_pushed": {
"priority": 1,
"percent_chance": 5.0,
"entity_types": [
{
"filters": {
"all_of": [
{ "test" : "is_family", "subject" : "other", "value" : "monster" },
{ "test" : "is_family", "subject" : "other", "operator": "!=", "value" : "creeper" }
]
}
}
]
}
Vanilla entities examples
iron_golem
"minecraft:behavior.target_when_pushed": {
"priority": 1,
"percent_chance": 5.0,
"entity_types": [
{
"filters": {
"all_of": [
{ "test" : "is_family", "subject" : "other", "value" : "monster" },
{ "test" : "is_family", "subject" : "other", "operator": "!=", "value" : "creeper" }
]
}
}
]
}
Vanilla entities using minecraft:behavior.target_when_pushed
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈