minecraft:behavior.float_wander for you with a switch.Get GodCraftOverview
minecraft:behavior.float_wander 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 the mob drift around in the air to random spots, like a ghast.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
xz_dist | integer | 10 | How far sideways the next spot can be. Must be 1 or more. |
y_dist | integer | 7 | How far up or down the next spot can be. Must be 1 or more. |
y_offset | number | 0 | Blocks added to the height of the chosen spot. |
must_reach | boolean | false | If true, the spot must be reachable to be picked. |
random_reselect | boolean | false | If true, the mob may switch to a new spot before reaching the current one. |
use_home_position_restriction | boolean | true | If true, spots are kept inside the mob's home area. |
float_duration | FloatRange | {"max":0,"min":0} | Random range in seconds the mob drifts before doing something else. |
float_wander_has_move_control | boolean | true | If true, this goal claims movement, so it cannot run with other goals that move the mob. |
surface_xz_dist | integer | 8 | How far sideways to check for a surface near a spot. Only used with navigate_around_surface. |
surface_y_dist | integer | 8 | How far up and down to check for a surface near a spot. Only used with navigate_around_surface. |
additional_collision_buffer | boolean | false | If true, extra space is kept around the mob so it does not bump into blocks. |
navigate_around_surface | boolean | false | If true, the mob prefers spots close to solid blocks instead of open air or liquid. |
allow_navigating_through_liquids | boolean | false | If true, the mob may pass through liquids on the way. |
priority | integer | 0 | Lower numbers run first: when two goals compete, the one with the smaller priority wins.Range: 0 to … |
control_flags | Goal's control flags[] | none | Which body parts this goal takes over (move, look, jump), so goals using the same parts cannot run together. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:behavior.float_wander": {
"xz_dist": 10,
"y_dist": 7,
"y_offset": 0,
"must_reach": false,
"random_reselect": false,
"use_home_position_restriction": true,
"float_duration": {
"max": 0,
"min": 0
},
"float_wander_has_move_control": true
}
}