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
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour