only show breed infotext if mob can breed

* backported commit e8adf9b244770854f06efc3182f4b804d14d3947
  from e8adf9b244
main
general 2024-03-30 03:37:53 -04:00
parent 320ca97164
commit 0a86398377
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ local use_mc2 = minetest.get_modpath("mcl_core")
-- Global -- Global
mobs = { mobs = {
mod = "redo", mod = "redo",
version = "20231005", version = "20231011",
translate = S, intllib = S, translate = S, intllib = S,
invis = minetest.global_exists("invisibility") and invisibility or {}, invis = minetest.global_exists("invisibility") and invisibility or {},
node_ice = "default:ice", node_ice = "default:ice",
@ -4806,7 +4806,7 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame)
-- feed and tame -- feed and tame
self.food = (self.food or 0) + 1 self.food = (self.food or 0) + 1
self._breed_countdown = feed_count - self.food self._breed_countdown = breed and (feed_count - self.food)
if self.food >= feed_count then if self.food >= feed_count then