Don't take extra bread when feeding

This commit is contained in:
cora 2022-07-08 02:03:18 +02:00
parent bcb76f7bd2
commit 08a1ecd879
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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