forked from VoxeLibre/VoxeLibre
enable simple villager breeding
This commit is contained in:
parent
11265b60de
commit
354d17a14c
|
@ -169,6 +169,7 @@ mobs_mc.follow = {
|
||||||
dog = { mobs_mc.items.rabbit_raw, mobs_mc.items.rabbit_cooked, mobs_mc.items.mutton_raw, mobs_mc.items.mutton_cooked, mobs_mc.items.beef_raw, mobs_mc.items.beef_cooked, mobs_mc.items.chicken_raw, mobs_mc.items.chicken_cooked, mobs_mc.items.rotten_flesh,
|
dog = { mobs_mc.items.rabbit_raw, mobs_mc.items.rabbit_cooked, mobs_mc.items.mutton_raw, mobs_mc.items.mutton_cooked, mobs_mc.items.beef_raw, mobs_mc.items.beef_cooked, mobs_mc.items.chicken_raw, mobs_mc.items.chicken_cooked, mobs_mc.items.rotten_flesh,
|
||||||
-- Mobs Redo items
|
-- Mobs Redo items
|
||||||
"mobs:meat", "mobs:meat_raw" },
|
"mobs:meat", "mobs:meat_raw" },
|
||||||
|
villager = { "mcl_farming:bread" },
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Contents for replace_what
|
-- Contents for replace_what
|
||||||
|
|
|
@ -1016,11 +1016,19 @@ mobs:register_mob("mobs_mc:villager", {
|
||||||
die_end = 220,
|
die_end = 220,
|
||||||
die_loop = false,
|
die_loop = false,
|
||||||
},
|
},
|
||||||
|
follow = mobs_mc.follow.villager,
|
||||||
view_range = 16,
|
view_range = 16,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
jump = true,
|
jump = true,
|
||||||
walk_chance = DEFAULT_WALK_CHANCE,
|
walk_chance = DEFAULT_WALK_CHANCE,
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
|
if clicker:get_wielded_item():get_name() == "mcl_farming:bread" then
|
||||||
|
if mobs:feed_tame(self, clicker, 1, true, true) then return end
|
||||||
|
if mobs:protect(self, clicker) then return end
|
||||||
|
end
|
||||||
|
if self.child then
|
||||||
|
return
|
||||||
|
end
|
||||||
-- Initiate trading
|
-- Initiate trading
|
||||||
local name = clicker:get_player_name()
|
local name = clicker:get_player_name()
|
||||||
self._trading_players[name] = true
|
self._trading_players[name] = true
|
||||||
|
|
Loading…
Reference in New Issue