diff --git a/mods/ENTITIES/mcl_mobs/api/api.lua b/mods/ENTITIES/mcl_mobs/api/api.lua index 235453918c..f748a09355 100644 --- a/mods/ENTITIES/mcl_mobs/api/api.lua +++ b/mods/ENTITIES/mcl_mobs/api/api.lua @@ -164,6 +164,7 @@ dofile(api_path .. "sound_handling.lua") dofile(api_path .. "death_logic.lua") dofile(api_path .. "mob_effects.lua") dofile(api_path .. "projectile_handling.lua") +dofile(api_path .. "breeding.lua") mobs.spawning_mobs = {} diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua index 5295060640..ff1b72df6b 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua @@ -698,7 +698,7 @@ mobs.mob_step = function(self, dtime) --despawn mechanism --don't despawned tamed mobs - if not self.tamed then + if not self.tamed and not self.bred then self.lifetimer = self.lifetimer - dtime if self.lifetimer <= 0 then self.lifetimer = self.lifetimer_reset diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/breeding.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/breeding.lua new file mode 100644 index 0000000000..e69de29bb2 diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/set_up.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/set_up.lua index 5f55d344a8..f4a050da21 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/set_up.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/set_up.lua @@ -7,7 +7,7 @@ mobs.mob_staticdata = function(self) --despawn mechanism --don't despawned tamed mobs - if not self.tamed then + if not self.tamed and not self.bred then if not mobs.check_for_player_within_area(self, 64) then --print("removing SERIALIZED!") self.object:remove() diff --git a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua index 9cc4e5d158..dfc98aad4c 100644 --- a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua +++ b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua @@ -50,7 +50,9 @@ local cow_def = { }, follow = mobs_mc.follow.cow, on_rightclick = function(self, clicker) - if mobs:feed_tame(self, clicker, 1, true, true) then return end + if mobs:feed_tame(self, clicker, 1, true, true) then + return + end if self.child then return