diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index d623e7ca98..13a50b601e 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -985,6 +985,11 @@ local trade_inventory = { elseif listname == "output" then if not trader_exists(player:get_player_name()) then return 0 + -- Begin Award Code + -- May need to be moved if award gets unlocked in the wrong cases. + elseif trader_exists(player:get_player_name()) then + awards.unlock(player:get_player_name(), "mcl:whatAdeal") + -- End Award Code end -- Only allow taking full stack local count = stack:get_count() diff --git a/mods/HUD/mcl_achievements/init.lua b/mods/HUD/mcl_achievements/init.lua index efcbe2ed73..8d8cd6c1b6 100644 --- a/mods/HUD/mcl_achievements/init.lua +++ b/mods/HUD/mcl_achievements/init.lua @@ -194,6 +194,13 @@ awards.register_achievement("mcl:sweetDreams", { icon = "mcl_beds_bed_red.png", }) +-- Triggered in mobs_mc +awards.register_achievement("mcl:whatAdeal", { + title = S("What A Deal!"), + description = S("Successfully trade with a Villager."), + icon = "mcl_core_emerald.png", +}) + -- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.) if non_pc_achievements then