diff --git a/mods/HUD/mcl_achievements/init.lua b/mods/HUD/mcl_achievements/init.lua index 049b4d4ac9..99845120cc 100644 --- a/mods/HUD/mcl_achievements/init.lua +++ b/mods/HUD/mcl_achievements/init.lua @@ -291,6 +291,13 @@ awards.register_achievement("mcl:maxed_beacon", { icon = "beacon_achievement_icon.png", }) +-- Triggered in mcl_end +awards.register_achievement("mcl:theEndAgain", { + title = S("The End... Again..."), + description = S("Respawn the Ender Dragon."), + icon = "mcl_end_crystal_item.png", +}) + -- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.) if non_pc_achievements then diff --git a/mods/HUD/mcl_achievements/locale/template.txt b/mods/HUD/mcl_achievements/locale/template.txt index 9e829e6e6d..09cee8606d 100644 --- a/mods/HUD/mcl_achievements/locale/template.txt +++ b/mods/HUD/mcl_achievements/locale/template.txt @@ -81,3 +81,5 @@ Beaconator= Use a fully powered beacon.= The Next Generation= Hold the Dragon Egg.@nHint: Pick up the egg from the ground and have it in your inventory.= +The End... Again...= +Respawn the Ender Dragon.= diff --git a/mods/ITEMS/mcl_end/end_crystal.lua b/mods/ITEMS/mcl_end/end_crystal.lua index d6f488b330..b7882a155d 100644 --- a/mods/ITEMS/mcl_end/end_crystal.lua +++ b/mods/ITEMS/mcl_end/end_crystal.lua @@ -1,5 +1,7 @@ local S = minetest.get_translator(minetest.get_current_modname()) +local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false) + local vector = vector local explosion_strength = 6 @@ -68,6 +70,11 @@ local function spawn_crystal(pos) for _,o in pairs(minetest.get_objects_inside_radius(pos,64)) do local l = o:get_luaentity() if l and l.name == "mobs_mc:enderdragon" then return end + if not peaceful then + if o:is_player() then + awards.unlock(o:get_player_name(), "mcl:theEndAgain") + end + end end for _, crystal in pairs(crystals) do crystal_explode(crystal)