How Ownership Works in Bedrock
Ownership and the tamed state are two distinct concepts inside the Bedrock entity engine. The minecraft:is_tamed component is only a state flag. You can check for it in Molang using query.is_tamed or inside entity filters with the is_tamed test, and it triggers certain visual behaviors like collar rendering on wolves. However, adding minecraft:is_tamed via an entity event does not tell the game who the owner actually is.
True ownership is stored as a direct internal link to another entity's unique ID. Normally, this link is created when a player successfully uses an item with minecraft:tameable or mounts an entity using minecraft:tamemount. When you want to bypass the taming interaction and spawn an entity that is already loyal, you have to pass the owner reference at the exact moment of creation, or apply it via scripting.
Setting Up the Tamed Component Group
Before you can spawn your entity in a tamed state, its behavior file needs a component group that defines how a tamed version of that mob acts, alongside an event that activates that group. Even though minecraft:is_tamed does not set the owner by itself, you should still include it in this group so animations, Molang queries, and behavior filters recognize the mob as tamed.
For the mob to actually act like a pet, you must pair minecraft:is_tamed with owner-aware AI goals. The three standard goals are minecraft:behavior.follow_owner, minecraft:behavior.owner_hurt_by_target, and minecraft:behavior.owner_hurt_target. Without these goals in the component group, an entity that technically has an owner will still wander away and ignore combat.
| Component | What it does | Notes |
|---|---|---|
| minecraft:is_tamed | Marks the entity as tamed for filters and Molang queries. | Does not assign an owner by itself. |
| minecraft:behavior.follow_owner | Makes the mob pathfind toward and teleport to its owner. | Requires a valid owner link and a navigation component to run. |
| minecraft:behavior.owner_hurt_by_target | Targets any mob that attacks the owner. | Standard defensive pet behavior. |
| minecraft:behavior.owner_hurt_target | Targets any mob that the owner attacks. | Standard offensive pet behavior. |
{
"format_version": "1.20.80",
"minecraft:entity": {
"description": {
"identifier": "wiki:summoned_wolf",
"is_spawnable": true,
"is_summonable": true
},
"component_groups": {
"wiki:tamed_state": {
"minecraft:is_tamed": {},
"minecraft:behavior.follow_owner": {
"priority": 4,
"speed_multiplier": 1.0,
"start_distance": 10,
"stop_distance": 2
},
"minecraft:behavior.owner_hurt_by_target": {
"priority": 1
},
"minecraft:behavior.owner_hurt_target": {
"priority": 2
}
}
},
"components": {
"minecraft:type_family": {
"family": [ "wolf", "mob" ]
},
"minecraft:health": {
"value": 20,
"max": 20
},
"minecraft:movement": {
"value": 0.3
},
"minecraft:navigation.walk": {
"can_path_over_water": true,
"avoid_damage_blocks": true
},
"minecraft:movement.basic": {},
"minecraft:jump.static": {},
"minecraft:attack": {
"damage": 4
},
"minecraft:behavior.melee_attack": {
"priority": 3
}
},
"events": {
"wiki:on_summoned_tamed": {
"add": {
"component_groups": [
"wiki:tamed_state"
]
}
}
}
}
}Spawning via minecraft:spawn_entity
In pure JSON, the primary way to pass an owner to a newly created mob is through the minecraft:spawn_entity component. When an entity or player runs this component, the game knows which actor initiated the spawn and automatically links that actor as the owner or summoner of the newly created entity, provided the spawned entity immediately enters its tamed state via the spawn_event.
You can place minecraft:spawn_entity on a boss mob to make it summon minions that defend it, or you can attach it temporarily to a player via a player component group to let them summon a pet. Set min_wait_time and max_wait_time to 0 and single_use to true if you want an instant, one-time summon when the component group is added.
{
"format_version": "1.20.80",
"minecraft:entity": {
"description": {
"identifier": "wiki:necromancer",
"is_spawnable": true,
"is_summonable": true
},
"components": {
"minecraft:health": {
"value": 40
},
"minecraft:spawn_entity": {
"entities": [
{
"min_wait_time": 0,
"max_wait_time": 0,
"spawn_entity": "wiki:summoned_wolf",
"spawn_event": "wiki:on_summoned_tamed",
"num_to_spawn": 2,
"single_use": true
}
]
}
}
}
}Summoning from Projectiles
If you want an item like a throwing pokeball, a magic staff, or a custom spawn egg to spawn a tamed mob where it lands, you can use a projectile entity as a bridge. When a player shoots a projectile, the projectile stores the player as its owner. If that projectile then spawns a mob on impact, it can pass its owner reference down to the newly spawned mob.
Inside the projectile's minecraft:projectile component, configure the definition inside on_hit using the spawn_chance object. Make sure to set spawn_definition to your custom entity's identifier. Note that projectile spawn definitions typically trigger minecraft:entity_born or default initialization rather than a custom event name, so if you use this method, your summoned entity should apply its tamed component group inside the standard minecraft:entity_born event.
Spawning Tamed Entities with the Script API
When building custom items or command systems in modern packs, the @minecraft/server Script API is the cleanest way to spawn a tamed entity for a specific player. Instead of modifying player.json or shooting invisible projectiles, you can spawn the entity directly in the dimension and assign its owner in code.
To do this properly, your entity JSON must still have the minecraft:tameable component present on the entity at the time the script runs, plus the tamed AI goals inside the component group triggered by minecraft:tameable's tame_event. In your script, spawn the entity using dimension.spawnEntity, fetch its minecraft:tameable component with getComponent, and call the tame(player) method. This simultaneously sets the player as the owner, marks the entity as tamed, and fires the tame_event defined in your JSON.
import { world } from "@minecraft/server";
world.afterEvents.itemUse.subscribe((event) => {
const player = event.source;
const item = event.itemStack;
if (item.typeId === "wiki:wolf_whistle") {
const pet = player.dimension.spawnEntity("wiki:summoned_wolf", player.location);
const tameable = pet.getComponent("minecraft:tameable");
if (tameable) {
tameable.tame(player);
}
}
});Which versions this applies to
The JSON components (minecraft:is_tamed, minecraft:spawn_entity, and the owner AI goals) work in all stable Bedrock versions from 1.16.0 onward with no experimental toggles required. The Script API EntityTameableComponent.tame(player) method is stable in @minecraft/server 1.11.0 and later (Bedrock 1.21.0+).
When it does not work
| What you see | Why | The fix |
|---|---|---|
| Running /summon wiki:summoned_wolf ~ ~ ~ ~ ~ wiki:on_summoned_tamed spawns a mob that shows a collar or passes query.is_tamed, but refuses to follow any player. | The /summon command does not pass an owner actor to the spawned entity, even when run by a player. The entity has the minecraft:is_tamed component, but its internal owner ID is empty. | Spawn the entity through another actor using minecraft:spawn_entity, or spawn it via the Script API and call tame(player) on its minecraft:tameable component. |
| [Scripting][error]-TypeError: Cannot read properties of undefined (reading 'tame') | pet.getComponent("minecraft:tameable") returned undefined because the entity JSON does not currently have the minecraft:tameable component active in its base components or default component group. | Add "minecraft:tameable": { "tame_event": { "event": "wiki:on_summoned_tamed", "target": "self" } } to the base components of your entity JSON so the script can access the component immediately upon spawning. |
| The entity is tamed via script or spawn_entity, attacks the owner's targets, but stands completely still instead of following the owner. | minecraft:behavior.follow_owner relies on the entity's navigation and movement components to calculate paths. If those are missing or only exist in an untamed component group that got removed, the AI goal silently fails. | Ensure minecraft:movement, minecraft:movement.basic, and a navigation component such as minecraft:navigation.walk remain active on the entity when the tamed component group is added. |
Reference, straight from the game files
Read out of the game itself, so the ids match the version you are building for.
