Entity Documentation - minecraft:behavior.move_towards_target
minecraft:behavior.move_towards_target
compels an entity to move towards a target.
Important
minecraft:behavior.move_towards_target
requires a target in order to work properly. Target can be determined by using one of the following behaviors:
Parameters
Name | Default Value | Type | Description |
---|---|---|---|
priority | not set | Integer | The higher the priority, the sooner this behavior will be executed as a goal. |
within_radius | 0.0 | Decimal | Defines the radius in blocks that the mob tries to be from the target. A value of 0 means it tries to occupy the same block as the target. |
Example
"minecraft:behavior.move_towards_target":{
"priority": 1,
"within_radius": 0.75,
"speed_multiplier": 1.25
}
Vanilla entities examples
iron_golem
"minecraft:behavior.move_towards_target": {
"priority": 2,
"speed_multiplier": 0.9,
"within_radius": 32
}
Vanilla entities using minecraft:behavior.move_towards_target
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈