Fixed taming bug
This commit is contained in:
parent
bde00057e3
commit
66120e80b4
@ -43,7 +43,7 @@ mobs:register_mob("mobs:bunny", {
|
||||
replace_what = {"farming:carrot_7", "farming:carrot_8", "farming_plus:carrot"},
|
||||
replace_with = "air",
|
||||
on_rightclick = function(self, clicker)
|
||||
if not mobs:feed_tame(self, clicker, 4, true) then
|
||||
if not mobs:feed_tame(self, clicker, 4, true, true) then
|
||||
-- Monty Python tribute
|
||||
local item = clicker:get_wielded_item()
|
||||
if item:get_name() == "mobs:lava_orb" then
|
||||
|
@ -49,7 +49,7 @@ mobs:register_mob("mobs:chicken", {
|
||||
replace_what = {"air"},
|
||||
replace_with = "mobs:egg",
|
||||
on_rightclick = function(self, clicker)
|
||||
mobs:feed_tame(self, clicker, 8, true)
|
||||
mobs:feed_tame(self, clicker, 8, true, true)
|
||||
mobs:capture_mob(self, clicker, 30, 50, 80, false, nil)
|
||||
end,
|
||||
})
|
||||
|
2
cow.lua
2
cow.lua
@ -49,7 +49,7 @@ mobs:register_mob("mobs:cow", {
|
||||
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "farming:wheat_8"},
|
||||
replace_with = "air",
|
||||
on_rightclick = function(self, clicker)
|
||||
if not mobs:feed_tame(self, clicker, 8, true) then
|
||||
if not mobs:feed_tame(self, clicker, 8, true, true) then
|
||||
local tool = clicker:get_wielded_item()
|
||||
|
||||
-- milk cow with empty bucket
|
||||
|
@ -39,7 +39,7 @@ mobs:register_mob("mobs:kitten", {
|
||||
follow = {"mobs:rat", "ethereal:fish_raw"},
|
||||
view_range = 10,
|
||||
on_rightclick = function(self, clicker)
|
||||
mobs:feed_tame(self, clicker, 4, true)
|
||||
mobs:feed_tame(self, clicker, 4, true, true)
|
||||
mobs:capture_mob(self, clicker, 50, 50, 90, false, nil)
|
||||
end
|
||||
})
|
||||
|
2
npc.lua
2
npc.lua
@ -61,7 +61,7 @@ mobs:register_mob("mobs:npc", {
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if not mobs:feed_tame(self, clicker, 8, true) then
|
||||
if not mobs:feed_tame(self, clicker, 8, true, true) then
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
|
@ -58,7 +58,7 @@ for _, col in ipairs(all_colours) do
|
||||
end
|
||||
|
||||
--are we feeding?
|
||||
if mobs:feed_tame(self, clicker, 8, true) then
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||
--if full grow fuzz
|
||||
if self.gotten == false then
|
||||
self.object:set_properties({
|
||||
|
@ -42,7 +42,7 @@ mobs:register_mob("mobs:pumba", {
|
||||
punch_end = 100,
|
||||
},
|
||||
on_rightclick = function(self, clicker)
|
||||
mobs:feed_tame(self, clicker, 8, true)
|
||||
mobs:feed_tame(self, clicker, 8, true, true)
|
||||
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
||||
end,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user