From 6757b8f9000ff90b6fbbe22d410f4b14b74feed8 Mon Sep 17 00:00:00 2001 From: PrairieAstronomer Date: Fri, 1 Jul 2022 13:41:21 -0600 Subject: [PATCH] The Nether Advancement --- mods/HUD/mcl_achievements/init.lua | 6 ++++++ mods/ITEMS/mcl_portals/portal_nether.lua | 3 +++ 2 files changed, 9 insertions(+) diff --git a/mods/HUD/mcl_achievements/init.lua b/mods/HUD/mcl_achievements/init.lua index 53b3a453a..babd66aa3 100644 --- a/mods/HUD/mcl_achievements/init.lua +++ b/mods/HUD/mcl_achievements/init.lua @@ -192,6 +192,12 @@ awards.register_achievement("mcl:enterEndPortal", { icon = "mcl_end_end_stone.png", }) +awards.register_achievement("mcl:theNether", { + title = S("The Nether"), + description = S("Bring summer clothes.\nHint: Enter the Nether."), + icon = "mcl_nether_netherrack.png", +}) + -- Triggered in mcl_totems awards.register_achievement("mcl:postMortal", { title = S("Postmortal"), diff --git a/mods/ITEMS/mcl_portals/portal_nether.lua b/mods/ITEMS/mcl_portals/portal_nether.lua index 0d93e11d1..1dd34d007 100644 --- a/mods/ITEMS/mcl_portals/portal_nether.lua +++ b/mods/ITEMS/mcl_portals/portal_nether.lua @@ -427,6 +427,9 @@ local function finalize_teleport(obj, exit) mcl_worlds.dimension_change(obj, dim) minetest.sound_play("mcl_portals_teleport", {pos=exit, gain=0.5, max_hear_distance = 16}, true) log("action", "[mcl_portals] player "..name.." teleported to Nether portal at "..pos_to_string(exit)..".") + if dim == "nether" then + awards.unlock(obj:get_player_name(), "mcl:theNether") + end else log("action", "[mcl_portals] entity teleported to Nether portal at "..pos_to_string(exit)..".") end