only show breed infotext if mob can breed
* backported commit e8adf9b244770854f06efc3182f4b804d14d3947
from e8adf9b244
This commit is contained in:
parent
320ca97164
commit
0a86398377
4
api.lua
4
api.lua
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user