forked from VoxeLibre/VoxeLibre
Don't take extra bread when feeding
This commit is contained in:
parent
bcb76f7bd2
commit
08a1ecd879
|
@ -4357,7 +4357,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
-- feeding, taming and breeding (thanks blert2112)
|
-- 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
|
if not self.follow then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -4370,7 +4370,7 @@ function mcl_mobs:feed_tame(self, clicker, feed_count, breed, tame)
|
||||||
|
|
||||||
local item = clicker:get_wielded_item()
|
local item = clicker:get_wielded_item()
|
||||||
|
|
||||||
item:take_item()
|
if not notake then item:take_item() end
|
||||||
|
|
||||||
clicker:set_wielded_item(item)
|
clicker:set_wielded_item(item)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1284,7 +1284,7 @@ mcl_mobs:register_mob("mobs_mc:villager", {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if clicker then
|
if clicker then
|
||||||
mcl_mobs:feed_tame(self, clicker, 1, true, false)
|
mcl_mobs:feed_tame(self, clicker, 1, true, false, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
return true --do not pick up
|
return true --do not pick up
|
||||||
|
|
Loading…
Reference in New Issue