Fix sheep getting horny from eating grass
This commit is contained in:
parent
fce8fd605d
commit
1ebe4d44f6
@ -1722,7 +1722,7 @@ end
|
||||
|
||||
-- Feeding, taming and breeding (thanks blert2112)
|
||||
|
||||
function mobs:feed_tame(self, clicker, feed_count, breed)
|
||||
function mobs:feed_tame(self, clicker, feed_count, breed, effect)
|
||||
-- Feed a mob(mostly a wrapper to handle self.check_fed)
|
||||
|
||||
local item = nil
|
||||
@ -1747,8 +1747,9 @@ function mobs:feed_tame(self, clicker, feed_count, breed)
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
end
|
||||
mob_sound(self, self.sounds.eat, true)
|
||||
|
||||
if effect ~= false then
|
||||
mob_sound(self, self.sounds.eat, true)
|
||||
local mobpos = self.object:get_pos()
|
||||
minetest.add_particlespawner(
|
||||
{
|
||||
@ -1766,6 +1767,7 @@ function mobs:feed_tame(self, clicker, feed_count, breed)
|
||||
maxsize = 2,
|
||||
texture = "magicpuff.png"
|
||||
})
|
||||
end
|
||||
|
||||
self:check_fed(name, feed_count, breed)
|
||||
|
||||
|
@ -65,7 +65,7 @@ mobs:register_mob(
|
||||
on_replace = function(self, pos)
|
||||
minetest.set_node(pos, {name = self.replace_with})
|
||||
|
||||
if mobs:feed_tame(self, self.follow, 8, true) then
|
||||
if mobs:feed_tame(self, self.follow, 8, false, false) then
|
||||
if self.gotten == false then
|
||||
self.object:set_properties(
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user