Entity Documentation - minecraft:behavior.tempt
minecraft:behavior.tempt
compels an entity to be tempted by a set item.
Parameters
Name | Default Value | Type | Description |
---|---|---|---|
can_get_scared | false | Boolean | If true, the mob can stop being tempted if the player moves too fast while close to this mob. |
can_tempt_vertically | false | Boolean | If true, vertical distance to the player will be considered when tempting. |
can_tempt_while_ridden | false | Boolean | If true, the mob can be tempted even if it has a passenger riding it. |
items | List | List of items this mob is tempted by | |
priority | not set | Integer | The higher the priority, the sooner this behavior will be executed as a goal. |
sound_interval | [0.0, 0.0] | Range [a, b] | Range of random ticks to wait between tempt sounds. |
speed_multiplier | 1.0 | Decimal | Movement speed multiplier of the mob when using this AI Goal. |
tempt_sound | String | Sound to play while the mob is being tempted. | |
within_radius | 0.0 | Decimal | Distance in blocks this mob can get tempted by a player holding an item they like. |
Example
"minecraft:behavior.tempt":{
"priority": 2,
"can_get_scared":true,
"can_tempt_vertically": false,
"can_tempt_while_ridden": true,
"speed_multiplier": 1.3,
"within_radius": 5.0,
"items":["carrot"]
}
Vanilla entities examples
strider
"minecraft:behavior.tempt": {
"priority": 5,
"speed_multiplier": 1.2,
"items": [
"warped_fungus",
"warped_fungus_on_a_stick"
],
"can_tempt_while_ridden": true,
"tempt_sound": "tempt",
"sound_interval": {
"range_min": 2.0,
"range_max": 5.0
}
}
Vanilla entities using minecraft:behavior.tempt
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示