mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-27 10:29:34 +01:00
Don't take extra bread when feeding
This commit is contained in:
parent
bcb76f7bd2
commit
08a1ecd879
2 changed files with 3 additions and 3 deletions
|
@ -4357,7 +4357,7 @@ end
|
|||
|
||||
|
||||
-- feeding, taming and breeding (thanks blert2112)
|
||||
function mcl_mobs:feed_tame(self, clicker, feed_count, breed, tame)
|
||||
function mcl_mobs:feed_tame(self, clicker, feed_count, breed, tame, notake)
|
||||
if not self.follow then
|
||||
return false
|
||||
end
|
||||
|
@ -4370,7 +4370,7 @@ function mcl_mobs:feed_tame(self, clicker, feed_count, breed, tame)
|
|||
|
||||
local item = clicker:get_wielded_item()
|
||||
|
||||
item:take_item()
|
||||
if not notake then item:take_item() end
|
||||
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
|
|
@ -1284,7 +1284,7 @@ mcl_mobs:register_mob("mobs_mc:villager", {
|
|||
end
|
||||
end
|
||||
if clicker then
|
||||
mcl_mobs:feed_tame(self, clicker, 1, true, false)
|
||||
mcl_mobs:feed_tame(self, clicker, 1, true, false, true)
|
||||
return
|
||||
end
|
||||
return true --do not pick up
|
||||
|
|
Loading…
Reference in a new issue