From e26464b70435e81f965ac0a8e9c9470c995732e1 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 16 Nov 2024 09:10:33 -0600 Subject: [PATCH] Add initial craft recipe for hammers --- mods/ITEMS/vl_weaponry/init.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/mods/ITEMS/vl_weaponry/init.lua b/mods/ITEMS/vl_weaponry/init.lua index b5a31083c..81b5f8fec 100644 --- a/mods/ITEMS/vl_weaponry/init.lua +++ b/mods/ITEMS/vl_weaponry/init.lua @@ -121,6 +121,13 @@ local uses = { diamond = 1562, netherite = 2031, } +local materials = { + wood = "group:wood", + stone = "group:cobble", + iron = "mcl_core:iron_ingot", + gold = "mcl_core:gold_ingot", + diamond = "mcl_core:diamond", +} local SPEAR_RANGE = 4.5 @@ -260,6 +267,18 @@ minetest.register_tool("vl_weaponry:hammer_netherite", { shovely = { speed = 6, level = 6, uses = uses.netherite } }, }) +local s = "mcl_core:stick" +local b = "" +for t,m in pairs(materials) do + minetest.register_craft({ + output = "vl_weaponry:hammer_"..t, + recipe = { + { m, b, m }, + { m, s, m }, + { b, s, b }, + } + }) +end --Spears minetest.register_tool("vl_weaponry:spear_wood", {