minecraft:behavior.float_tempt for you with a switch.Get GodCraftOverview
minecraft:behavior.float_tempt is an entity component: it goes in the components object of a custom mob, or in one of its component groups. AI goal that makes a floating mob follow a player holding an item it likes, moving straight through the air. Made for mobs with minecraft:navigation.float.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
can_get_scared | Boolean | "false" | If true, the mob stops following when the player moves too fast nearby. |
can_tempt_vertically | Boolean | "false" | If true, height difference to the player is counted too. |
can_tempt_while_ridden | Boolean | "false" | If true, the mob can be tempted even with a rider on it. |
items | Array | "[]" | Items that tempt the mob. |
sound_interval | Range [a, b] | "[0.0, 0.0]" | Random range of ticks between tempt sounds. |
speed_multiplier | Decimal | "1.0" | Speed multiplier while following. |
stop_distance | Decimal | "1.5" | How close the mob gets before it stops following. |
tempt_sound | String | none | Sound played while the mob is tempted. |
within_radius | Decimal | "0.0" | How close, in blocks, the player must be to tempt the mob. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:behavior.float_tempt": {
"can_get_scared": "false",
"can_tempt_vertically": "false",
"can_tempt_while_ridden": "false",
"items": "[]",
"sound_interval": "[0.0, 0.0]",
"speed_multiplier": "1.0",
"stop_distance": "1.5",
"tempt_sound": ""
}
}