Does anyone have an up to date solution to this? I've tried what was explained in wiki.bedrock.dev, but neither methods worked.
https://wiki.bedrock.dev/entities/spawning-tamed-entities.html
#Taming an entity on spawn
1 messages · Page 1 of 1 (latest)
Hmm. How exactly is it not working? Is it not tamed at all, or is it having some other kind of issues? As I've followed the tutorial issue and it spawns tamed just fine, but has some problems with tracking the owner.
Though one thing that I did notice that its essential to give the projectile that spawns the entity the arrow runtime identjfier
When I tried it, it runs the event fine and also has the component group with the taming stuff, including following the owner. However it ignores the owner entirely
Ah. I've been having a similar issue. I'm not entirely sure what the cause is. I don't think it's a problem with the spawning method, as it works just fine to spawn a wolf. I'll let you know if I'm able to resolve it
Ok, I figured it out. For some reason, you need to have the minecraft:is_tamed component in the entity for it to work correctly
I had that too. :/
Oh, strange. Can you send the entity's file? I guess we're having different issues
Can't do that, but maybe I could see yours?
Sure. Here's what I have:```json
{
"format_version": "1.20.40",
"minecraft:entity": {
"description": {
"identifier": "enderquest:ender_ally",
"is_spawnable": false,
"is_summonable": true,
"is_experimental": false
},
"components": {
"minecraft:is_tamed": {
},
"minecraft:behavior.follow_owner": {
"priority": 6,
"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
},
"minecraft:behavior.nearest_attackable_target": {
"priority": 5,
"must_see": true,
"entity_types": [
{
"filters": { "test" : "is_family", "subject" : "other", "value" : "enderman"},
"max_dist": 16
}
]
},
"minecraft:balloonable": {
"mass": 0.8
},
"minecraft:is_hidden_when_invisible": {
},
"minecraft:type_family": {
"family": [ "endermite", "mob" ]
},
"minecraft:breathable": {
"total_supply": 15,
"suffocate_time": 0
},
"minecraft:collision_box": {
"width": 0.4,
"height": 0.3
},
"minecraft:health": {
"value": 8,
"max": 8
},
"minecraft:hurt_on_condition": {
"damage_conditions": [
{
"filters": { "test": "in_lava", "subject": "self", "operator": "==", "value": true },
"cause": "lava",
"damage_per_tick": 4
}
]
},
"minecraft:movement": {
"value": 0.3
},
"minecraft:navigation.walk": {
"can_path_over_water": true,
"avoid_damage_blocks": true
},
"minecraft:movement.basic": {
},
"minecraft:jump.static": {
},
"minecraft:can_climb": {
},
"minecraft:attack": {
"damage": 4
},
"minecraft:despawn": {
"despawn_from_distance": {}
},
"minecraft:behavior.float": {
"priority": 0
},
"minecraft:behavior.melee_attack": {
"priority": 5
},
"minecraft:behavior.random_stroll": {
"priority": 8,
"speed_multiplier": 1.0
},
"minecraft:behavior.look_at_player": {
"priority": 6,
"target_distance": 6.0,
"probability": 0.02
},
"minecraft:behavior.hurt_by_target": {
"priority": 3
},
"minecraft:physics": {
},
"minecraft:pushable": {
"is_pushable": true,
"is_pushable_by_piston": true
},
"minecraft:conditional_bandwidth_optimization": {
}
}
}
}
Ok I'll check that out later