From f84063ad0a9a89eeb44c70b6ef93a93d801c0714 Mon Sep 17 00:00:00 2001 From: PrairieAstronomer Date: Mon, 25 Jul 2022 11:48:38 -0600 Subject: [PATCH] Withering Heights Advancement --- mods/ENTITIES/mcl_wither_spawning/init.lua | 6 ++++++ mods/HUD/mcl_achievements/init.lua | 6 ++++++ mods/HUD/mcl_achievements/locale/template.txt | 2 ++ 3 files changed, 14 insertions(+) diff --git a/mods/ENTITIES/mcl_wither_spawning/init.lua b/mods/ENTITIES/mcl_wither_spawning/init.lua index a8f7f108d1..74cd1e6e27 100644 --- a/mods/ENTITIES/mcl_wither_spawning/init.lua +++ b/mods/ENTITIES/mcl_wither_spawning/init.lua @@ -38,6 +38,12 @@ local function wither_spawn(pos) if check_schem(p, schem) then remove_schem(p, schem) minetest.add_entity(vector.add(p, {x = 0, y = 1, z = 0, [d] = 1}), "mobs_mc:wither") + local objects = minetest.get_objects_inside_radius(pos, 20) + for _, players in ipairs(objects) do + if players:is_player() then + awards.unlock(players:get_player_name(), "mcl:witheringHeights") + end + end end end end diff --git a/mods/HUD/mcl_achievements/init.lua b/mods/HUD/mcl_achievements/init.lua index 55e64b9b75..a70ee5b403 100644 --- a/mods/HUD/mcl_achievements/init.lua +++ b/mods/HUD/mcl_achievements/init.lua @@ -231,6 +231,12 @@ awards.register_achievement("mcl:tacticalFishing", { icon = "pufferfish_bucket.png", }) +awards.register_achievement("mcl:witheringHeights", { + title = S("Withering Heights"), + description = S("Summon the wither from the dead."), + icon = "mcl_mobitems_nether_star.png", +}) + -- Triggered in mcl_fishing awards.register_achievement("mcl:fishyBusiness", { title = S("Fishy Business"), diff --git a/mods/HUD/mcl_achievements/locale/template.txt b/mods/HUD/mcl_achievements/locale/template.txt index cb97e5d000..4bbe5db3e9 100644 --- a/mods/HUD/mcl_achievements/locale/template.txt +++ b/mods/HUD/mcl_achievements/locale/template.txt @@ -63,6 +63,8 @@ Not Quite "Nine" Lives= Charge a Respawn Anchor to the maximum.= What A Deal!= Successfully trade with a Villager.= +Withering Heights= +Summon the wither from the dead.= Fishy Business= Catch a fish.@nHint: Catch a fish, salmon, clownfish, or pufferfish.= Country Lode,@nTake Me Home=