Allows the mob to give items it has to others.
Share Items Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| entity_types | not set | Array of Entity Types items | List of entities this mob will share items with | Villager: [{"filters":{"test":"is_family","subject":"other","value":"villager"}}] |
| goal_radius | 0.5 | Decimal number | Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot | |
| max_dist | 0 | Decimal number | Maximum distance in blocks this mob will look for entities to share items with | |
| priority | not set | Integer number | As priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal. | |
| speed_multiplier | 1 | Decimal number | Movement speed multiplier of the mob when using this AI Goal |
Entity Types
List of entities this mob will share items with.
Entity Types Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| cooldown | 0 | Decimal number | The amount of time in seconds that the mob has to wait before selecting a target of the same type again | |
| filters | not set | Minecraft filter | Conditions that make this entry in the list valid | |
| max_dist | 16 | Decimal number | Maximum distance this mob can be away to be a valid choice | |
| must_see | false | Boolean true/false | If true, the mob has to be visible to be a valid choice | |
| must_see_forget_duration | 3 | Decimal number | Determines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more | |
| reevaluate_description | false | Boolean true/false | If true, the mob will stop being targeted if it stops meeting any conditions. | |
| sprint_speed_multiplier | 1 | Decimal number | Multiplier for the running speed. A value of 1.0 means the speed is unchanged | |
| walk_speed_multiplier | 1 | Decimal number | Multiplier for the walking speed. A value of 1.0 means the speed is unchanged |
Samples
Villager
"minecraft:behavior.share_items": {
"priority": 8,
"max_dist": 3,
"goal_radius": 2,
"speed_multiplier": 0.5,
"entity_types": [
{
"filters": {
"test": "is_family",
"subject": "other",
"value": "villager"
}
}
]
}
Villager v2
"minecraft:behavior.share_items": {
"priority": 10,
"max_dist": 3,
"goal_radius": 2,
"speed_multiplier": 0.5,
"entity_types": [
{
"filters": {
"test": "is_family",
"subject": "other",
"value": "villager"
}
}
]
}
Beachager
"minecraft:behavior.share_items": {
"priority": 9,
"max_dist": 3,
"goal_radius": 2,
"speed_multiplier": 0.5,
"entity_types": [
{
"filters": {
"test": "is_family",
"subject": "other",
"value": "villager"
}
}
]
}