minecraft:behavior.find_underwater_treasure for you with a switch.Get GodCraftOverview
minecraft:behavior.find_underwater_treasure 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 swim toward the nearest ocean ruin or shipwreck, like a dolphin leading players to treasure.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
speed_multiplier | number | 1 | Speed multiplier while swimming to the treasure. |
search_range | integer | 0 | How far the mob searches for a treasure chest in a ruin or shipwreck. |
stop_distance | number | 2 | How far the mob swims before it stops. |
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.find_underwater_treasure": {
"speed_multiplier": 1,
"search_range": 0,
"stop_distance": 2,
"priority": 0,
"control_flags": []
}
}