minecraft:navigation.hover for you with a switch.Get GodCraftOverview
minecraft:navigation.hover is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets the mob plan paths through the air while staying aloft, like a bee, so it does not drop out of the sky. Pair it with a matching movement component.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
avoid_damage_blocks | Boolean | "false" | If true, paths go around blocks that hurt, such as cactus or magma. |
avoid_portals | Boolean | "false" | If true, paths stay away from portals like nether portals. |
avoid_sun | Boolean | "false" | If true, paths prefer shaded spots over places in direct sunlight. |
avoid_water | Boolean | "false" | If true, paths stay out of water. |
blocks_to_avoid | List | none | Blocks the mob should never step into while following a path. |
can_breach | Boolean | "false" | If true, the mob can leap up out of the water surface. |
can_break_doors | Boolean | "false" | If true, closed doors count as passable because the mob will break them. |
can_jump | Boolean | "true" | If true, paths can climb up one-block steps by jumping. |
can_open_doors | Boolean | "false" | If true, closed doors count as passable because the mob will open them. |
can_open_iron_doors | Boolean | "false" | If true, closed iron doors also count as passable. |
can_pass_doors | Boolean | "true" | If true, paths can go through doorways. |
can_path_from_air | Boolean | "false" | If true, the mob can start a new path while still in the air. |
can_path_over_lava | Boolean | "false" | If true, paths can cross the top of lava. |
can_path_over_water | Boolean | "false" | If true, paths can cross the top of water. |
can_sink | Boolean | "true" | If true, the mob sinks in water instead of floating. |
can_swim | Boolean | "false" | If true, paths can go anywhere through water and the mob uses its swim animation there. |
can_walk | Boolean | "true" | If true, the mob can walk on dry land. |
can_walk_in_lava | Boolean | "false" | If true, the mob moves through lava as if it were solid ground. |
is_amphibious | Boolean | "false" | If true, the mob can walk along the bottom under water. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:navigation.hover": {
"avoid_damage_blocks": "false",
"avoid_portals": "false",
"avoid_sun": "false",
"avoid_water": "false",
"blocks_to_avoid": {},
"can_breach": "false",
"can_break_doors": "false",
"can_jump": "true"
}
}