From bc23cd800e70fce588742f42cb0da9b39fa906a3 Mon Sep 17 00:00:00 2001 From: Code-Sploit Date: Wed, 14 Apr 2021 11:42:28 +0000 Subject: [PATCH] Add code for netherite armor --- mods/ITEMS/mcl_armor/init.lua | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/mods/ITEMS/mcl_armor/init.lua b/mods/ITEMS/mcl_armor/init.lua index bce597b7f1..1e348b44f1 100644 --- a/mods/ITEMS/mcl_armor/init.lua +++ b/mods/ITEMS/mcl_armor/init.lua @@ -83,6 +83,21 @@ minetest.register_tool("mcl_armor:helmet_diamond",{ on_secondary_use = armor.on_armor_use, }) +minetest.register_tool("mcl_armor:helmet_netherite",{ + description = S("Netherite Helmet"), + _doc_items_longdesc = longdesc, + _doc_items_usagehelp = usage, + inventory_image = "mcl_armor_inv_helmet_netherite.png", + groups = {armor_head=1, mcl_armor_points=3, mcl_armor_uses=364, mcl_armor_toughness=2, enchantability=10 }, + _repair_material = "mcl_netherite:netherite_ingot", + sounds = { + _mcl_armor_equip = "mcl_armor_equip_diamond", + _mcl_armor_unequip = "mcl_armor_unequip_diamond", + }, + on_place = armor.on_armor_use, + on_secondary_use = armor.on_armor_use, +}) + minetest.register_tool("mcl_armor:helmet_chain", { description = S("Chain Helmet"), _doc_items_longdesc = longdesc, @@ -160,6 +175,21 @@ minetest.register_tool("mcl_armor:chestplate_diamond",{ on_secondary_use = armor.on_armor_use, }) +minetest.register_tool("mcl_armor:chestplate_netherite",{ + description = S("Netherite Chestplate"), + _doc_items_longdesc = longdesc, + _doc_items_usagehelp = usage, + inventory_image = "mcl_armor_inv_chestplate_netherite.png", + groups = {armor_torso=1, mcl_armor_points=8, mcl_armor_uses=592, mcl_armor_toughness=2, enchantability=10 }, + _repair_material = "mcl_netherite:netherite_ingot", + sounds = { + _mcl_armor_equip = "mcl_armor_equip_diamond", + _mcl_armor_unequip = "mcl_armor_unequip_diamond", + }, + on_place = armor.on_armor_use, + on_secondary_use = armor.on_armor_use, +}) + minetest.register_tool("mcl_armor:chestplate_chain", { description = S("Chain Chestplate"), _doc_items_longdesc = longdesc, @@ -237,6 +267,21 @@ minetest.register_tool("mcl_armor:leggings_diamond",{ on_secondary_use = armor.on_armor_use, }) +minetest.register_tool("mcl_armor:leggings_netherite",{ + description = S("Netherite Leggings"), + _doc_items_longdesc = longdesc, + _doc_items_usagehelp = usage, + inventory_image = "mcl_armor_inv_leggings_netherite.png", + groups = {armor_legs=1, mcl_armor_points=6, mcl_armor_uses=496, mcl_armor_toughness=2, enchantability=10 }, + _repair_material = "mcl_netherite:netherite_ingot", + sounds = { + _mcl_armor_equip = "mcl_armor_equip_diamond", + _mcl_armor_unequip = "mcl_armor_unequip_diamond", + }, + on_place = armor.on_armor_use, + on_secondary_use = armor.on_armor_use, +}) + minetest.register_tool("mcl_armor:leggings_chain", { description = S("Chain Leggings"), _doc_items_longdesc = longdesc, @@ -328,6 +373,21 @@ minetest.register_tool("mcl_armor:boots_chain", { on_secondary_use = armor.on_armor_use, }) +minetest.register_tool("mcl_armor:boots_netherite", { + description = S("Netherite Boots"), + _doc_items_longdesc = longdesc, + _doc_items_usagehelp = usage, + inventory_image = "mcl_armor_inv_boots_netherite.png", + groups = {armor_feet=1, mcl_armor_points=1, mcl_armor_uses=481, enchantability=1 }, + _repair_material = "mcl_netherite:netherite_ingot", + sounds = { + _mcl_armor_equip = "mcl_armor_equip_chainmail", + _mcl_armor_unequip = "mcl_armor_unequip_chainmail", + }, + on_place = armor.on_armor_use, + on_secondary_use = armor.on_armor_use, +}) + -- Register Craft Recipies local craft_ingreds = {