minecraft:behavior.transport_items for you with a switch.Get GodCraftOverview
minecraft:behavior.transport_items is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Makes the mob carry items from one kind of container to another, like the copper golem moving items out of copper chests into other chests.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
source_container_types | Block Descriptor[] | none | Which container blocks the mob takes items from. |
destination_container_types | Block Descriptor[] | none | Which container blocks the mob puts items into. |
max_stack_size | integer | 64 | Most items the mob takes from a container at once.Range: 1 to 64 |
interaction_time | number | 3 | Seconds the mob spends at a container each visit.Range: 0 to … |
allow_simultaneous_interaction | boolean | false | Controls whether the mob waits for a container to be free when another entity is using it. |
search_strategy | enum | "random" | How the mob picks a container: the nearest one or a random one in range.One of: nearest, random |
search_distance | Vec2 | [64,32] | How far sideways and up or down the mob looks for containers. |
max_visited_containers | integer | 16 | How many containers the mob tries before it takes a break and starts over.Range: 0 to … |
initial_cooldown | integer | 0 | How long the mob waits after spawning, or after getting this goal, before it starts.Range: 0 to … |
idle_cooldown | integer | 20 | Seconds the goal pauses when no suitable container can be found.Range: 0 to … |
place_strategy | enum | "any" | When to drop items into a container: always if there is room, only if it already holds the same item, or if it holds the same item or is empty.One of: any, with_matching, with_matching_or_empty |
allowed_items | Item Descriptor[] | none | The only items the mob may carry. Leave this and disallowed_items empty to allow everything. |
disallowed_items | Item Descriptor[] | none | Items the mob may not carry. Use either this or allowed_items, not both. |
priority | integer | 0 | Decides which goal wins when several want to run: lower numbers run first.Range: 0 to … |
control_flags | Goal's control flags[] | none | Lists the body parts this goal takes control of (such as move, look or jump), so goals that need the same part don't run together. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:behavior.transport_items": {
"source_container_types": [],
"destination_container_types": [],
"max_stack_size": 64,
"interaction_time": 3,
"allow_simultaneous_interaction": false,
"search_strategy": "random",
"search_distance": [
64,
32
],
"max_visited_containers": 16
}
}