From f2375abc471357aeb444bb98d73af32106d3a5ae Mon Sep 17 00:00:00 2001 From: Code-Sploit Date: Wed, 14 Apr 2021 13:07:25 +0000 Subject: [PATCH] Add netherite tools --- mods/ITEMS/mcl_farming/hoes.lua | 21 +++++ mods/ITEMS/mcl_tools/init.lua | 86 +++++++++++++++++- .../textures/default_tool_netheriteaxe.png | Bin 0 -> 184 bytes .../textures/default_tool_netheritepick.png | Bin 0 -> 188 bytes .../textures/default_tool_netheriteshovel.png | Bin 0 -> 161 bytes .../textures/default_tool_netheritesword.png | Bin 0 -> 210 bytes 6 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 mods/ITEMS/mcl_tools/textures/default_tool_netheriteaxe.png create mode 100644 mods/ITEMS/mcl_tools/textures/default_tool_netheritepick.png create mode 100644 mods/ITEMS/mcl_tools/textures/default_tool_netheriteshovel.png create mode 100644 mods/ITEMS/mcl_tools/textures/default_tool_netheritesword.png diff --git a/mods/ITEMS/mcl_farming/hoes.lua b/mods/ITEMS/mcl_farming/hoes.lua index d2250eb70..9a8883609 100644 --- a/mods/ITEMS/mcl_farming/hoes.lua +++ b/mods/ITEMS/mcl_farming/hoes.lua @@ -272,4 +272,25 @@ minetest.register_craft({ {"mcl_core:stick", ""}, {"mcl_core:stick", ""} } +}) + +minetest.register_tool("mcl_farming:hoe_netherite", { + description = S("Netherite Hoe"), + _tt_help = hoe_tt.."\n"..S("Uses: @1", uses.netherite), + _doc_items_longdesc = hoe_longdesc, + _doc_items_usagehelp = hoe_usagehelp, + inventory_image = "farming_tool_netheritehoe.png", + wield_scale = mcl_vars.tool_wield_scale, + on_place = hoe_on_place_function(uses.netherite), + groups = { tool=1, hoe=1, enchantability=10 }, + tool_capabilities = { + full_punch_interval = 0.25, + damage_groups = { fleshy = 4, }, + punch_attack_uses = uses.netherite, + }, + _repair_material = "mcl_nether:netherite_ingot", + _mcl_toollike_wield = true, + _mcl_diggroups = { + hoey = { speed = 8, level = 5, uses = 2031 } + }, }) diff --git a/mods/ITEMS/mcl_tools/init.lua b/mods/ITEMS/mcl_tools/init.lua index cbee8e3d0..aadf90e0d 100644 --- a/mods/ITEMS/mcl_tools/init.lua +++ b/mods/ITEMS/mcl_tools/init.lua @@ -177,7 +177,28 @@ minetest.register_tool("mcl_tools:pick_diamond", { }, }) -local function make_grass_path(itemstack, placer, pointed_thing) +minetest.register_tool("mcl_tools:pick_netherite", { + description = S("Netherite Pickaxe"), + _doc_items_longdesc = pickaxe_longdesc, + inventory_image = "default_tool_netheritepick.png", + wield_scale = wield_scale, + groups = { tool=1, pickaxe=1, dig_speed_class=5, enchantability=10 }, + tool_capabilities = { + -- 1/1.2 + full_punch_interval = 0.83333333, + max_drop_level=5, + damage_groups = {fleshy=6}, + punch_attack_uses = 1016, + }, + sound = { breaks = "default_tool_breaks" }, + _repair_material = "mcl_nether:netherite_ingot", + _mcl_toollike_wield = true, + _mcl_diggroups = { + pickaxey = { speed = 8, level = 5, uses = 2031 } + }, +}) + +local make_grass_path = function(itemstack, placer, pointed_thing) -- Use pointed node's on_rightclick function first, if present local node = minetest.get_node(pointed_thing.under) if placer and not placer:get_player_control().sneak then @@ -353,6 +374,28 @@ minetest.register_tool("mcl_tools:shovel_diamond", { }, }) +minetest.register_tool("mcl_tools:shovel_netherite", { + description = S("Netherite Shovel"), + _doc_items_longdesc = shovel_longdesc, + _doc_items_usagehelp = shovel_use, + inventory_image = "default_tool_netheriteshovel.png", + wield_scale = wield_scale, + groups = { tool=1, shovel=1, dig_speed_class=5, enchantability=10 }, + tool_capabilities = { + full_punch_interval = 1, + max_drop_level=5, + damage_groups = {fleshy=5}, + punch_attack_uses = 1016, + }, + on_place = make_grass_path, + sound = { breaks = "default_tool_breaks" }, + _repair_material = "mcl_nether:netherite_ingot", + _mcl_toollike_wield = true, + _mcl_diggroups = { + shovely = { speed = 8, level = 5, uses = 2031 } + }, +}) + -- Axes local function make_stripped_trunk(itemstack, placer, pointed_thing) if pointed_thing.type ~= "node" then return end @@ -485,6 +528,27 @@ minetest.register_tool("mcl_tools:axe_diamond", { }, }) +minetest.register_tool("mcl_tools:axe_netherite", { + description = S("Netherite Axe"), + _doc_items_longdesc = axe_longdesc, + inventory_image = "default_tool_netheriteaxe.png", + wield_scale = wield_scale, + groups = { tool=1, axe=1, dig_speed_class=5, enchantability=10 }, + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=5, + damage_groups = {fleshy=10}, + punch_attack_uses = 1016, + }, + on_place = make_stripped_trunk, + sound = { breaks = "default_tool_breaks" }, + _repair_material = "mcl_nether:netherite_ingot", + _mcl_toollike_wield = true, + _mcl_diggroups = { + axey = { speed = 8, level = 5, uses = 2031 } + }, +}) + -- Swords minetest.register_tool("mcl_tools:sword_wood", { description = S("Wooden Sword"), @@ -587,6 +651,26 @@ minetest.register_tool("mcl_tools:sword_diamond", { swordy_cobweb = { speed = 8, level = 5, uses = 1562 } }, }) +minetest.register_tool("mcl_tools:sword_netherite", { + description = S("Netherite Sword"), + _doc_items_longdesc = sword_longdesc, + inventory_image = "default_tool_netheritesword.png", + wield_scale = wield_scale, + groups = { weapon=1, sword=1, dig_speed_class=5, enchantability=10 }, + tool_capabilities = { + full_punch_interval = 0.625, + max_drop_level=5, + damage_groups = {fleshy=9}, + punch_attack_uses = 2032, + }, + sound = { breaks = "default_tool_breaks" }, + _repair_material = "mcl_nether:netherite_ingot", + _mcl_toollike_wield = true, + _mcl_diggroups = { + swordy = { speed = 8, level = 5, uses = 1562 }, + swordy_cobweb = { speed = 8, level = 5, uses = 1562 } + }, +}) --Shears minetest.register_tool("mcl_tools:shears", { diff --git a/mods/ITEMS/mcl_tools/textures/default_tool_netheriteaxe.png b/mods/ITEMS/mcl_tools/textures/default_tool_netheriteaxe.png new file mode 100644 index 0000000000000000000000000000000000000000..322bf45130946f4750019b2329efac3edcf6dc18 GIT binary patch literal 184 zcmV;p07w6cP)x($w%1%&>StT{F;7K{th3y3!Wq#2|Eq|x8Tj&uV+KwnXbGR?)V z&R|UxX$J90)|_BsM4FArnyoFZ>8u%~5rmx`oXNKtIl#yQAk7pRKn?%^??+lk=UVA3 P00000NkvXXu0mjff08-? literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_tools/textures/default_tool_netheritesword.png b/mods/ITEMS/mcl_tools/textures/default_tool_netheritesword.png new file mode 100644 index 0000000000000000000000000000000000000000..4bc0809b12478fa4d29150871df6b303dec9cebe GIT binary patch literal 210 zcmV;@04@KCP)bD)bKd744Cf;59@k~PPM#ey}1Xq=j{ zg(`>-(rBcv{@>rm4!_MXn_z~Jq#50>AR45JB+bYMfH29Lu>~5*n)MZx{wJ6ifi=Rs zK(rws&Bd