diff --git a/mods/ENTITIES/mobs_mc/0_gameconfig.lua b/mods/ENTITIES/mobs_mc/0_gameconfig.lua index c92ccbba52..17451aeb66 100644 --- a/mods/ENTITIES/mobs_mc/0_gameconfig.lua +++ b/mods/ENTITIES/mobs_mc/0_gameconfig.lua @@ -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, -- Mobs Redo items "mobs:meat", "mobs:meat_raw" }, + villager = { "mcl_farming:bread" }, } -- Contents for replace_what diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 774cdb48cc..24fbaccbf6 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -1016,11 +1016,19 @@ mobs:register_mob("mobs_mc:villager", { die_end = 220, die_loop = false, }, + follow = mobs_mc.follow.villager, view_range = 16, fear_height = 4, jump = true, walk_chance = DEFAULT_WALK_CHANCE, 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 local name = clicker:get_player_name() self._trading_players[name] = true