diff --git a/mods/ENTITIES/mobs_mc/pig.lua b/mods/ENTITIES/mobs_mc/pig.lua index fede3f1119..d5228a2b06 100644 --- a/mods/ENTITIES/mobs_mc/pig.lua +++ b/mods/ENTITIES/mobs_mc/pig.lua @@ -171,7 +171,11 @@ mobs:register_mob("mobs_mc:pig", { on_breed = function(parent1, parent2) local pos = parent1.object:get_pos() - if mobs:spawn_child(pos, parent1.name) then + local child = mobs:spawn_child(pos, parent1.name) + if child then + local ent_c = child:get_luaentity() + ent_c.tamed = true + ent_c.owner = parent1.owner return false end end, diff --git a/mods/ENTITIES/mobs_mc/sheep.lua b/mods/ENTITIES/mobs_mc/sheep.lua index 9f6d95e85a..331d80c26f 100644 --- a/mods/ENTITIES/mobs_mc/sheep.lua +++ b/mods/ENTITIES/mobs_mc/sheep.lua @@ -248,6 +248,8 @@ mobs:register_mob("mobs_mc:sheep", { end child:set_properties({textures = ent_c.base_texture}) ent_c.initial_color_set = true + ent_c.tamed = true + ent_c.owner = parent1.owner return false end end,