From 1c219487d3f4dd03c01ff9aa1f298c7c18c7e189 Mon Sep 17 00:00:00 2001
From: sfence <sfence.software@gmail.com>
Date: Wed, 14 Apr 2021 16:20:20 +0200
Subject: [PATCH] Add support for craftguide mod recipe registration (#584)

---
 technic_chests/mithril_chest.lua |   41 ++++++++++++++++++++++-------------------
 1 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/technic_chests/mithril_chest.lua b/technic_chests/mithril_chest.lua
index bd2b981..40ea95c 100644
--- a/technic_chests/mithril_chest.lua
+++ b/technic_chests/mithril_chest.lua
@@ -1,26 +1,29 @@
-minetest.register_craft({
-	output = 'technic:mithril_chest 1',
-	recipe = {
-		{'moreores:mithril_ingot','moreores:mithril_ingot','moreores:mithril_ingot'},
-		{'moreores:mithril_ingot','technic:gold_chest','moreores:mithril_ingot'},
-		{'moreores:mithril_ingot','moreores:mithril_ingot','moreores:mithril_ingot'},
-	}
-})
+if minetest.get_modpath("moreores") then
+	minetest.register_craft({
+		output = 'technic:mithril_chest 1',
+		recipe = {
+			{'moreores:mithril_ingot','moreores:mithril_ingot','moreores:mithril_ingot'},
+			{'moreores:mithril_ingot','technic:gold_chest','moreores:mithril_ingot'},
+			{'moreores:mithril_ingot','moreores:mithril_ingot','moreores:mithril_ingot'},
+		}
+	})
+
+	minetest.register_craft({
+		output = 'technic:mithril_locked_chest 1',
+		recipe = {
+			{'moreores:mithril_ingot','moreores:mithril_ingot','moreores:mithril_ingot'},
+			{'moreores:mithril_ingot','technic:gold_locked_chest','moreores:mithril_ingot'},
+			{'moreores:mithril_ingot','moreores:mithril_ingot','moreores:mithril_ingot'},
+		}
+	})
+end
 
 minetest.register_craft({
 	output = 'technic:mithril_locked_chest 1',
+	type = "shapeless",
 	recipe = {
-		{'moreores:mithril_ingot','moreores:mithril_ingot','moreores:mithril_ingot'},
-		{'moreores:mithril_ingot','technic:gold_locked_chest','moreores:mithril_ingot'},
-		{'moreores:mithril_ingot','moreores:mithril_ingot','moreores:mithril_ingot'},
-	}
-})
-
-minetest.register_craft({
-	output = 'technic:mithril_locked_chest 1',
-	recipe = {
-		{'default:steel_ingot'},
-		{'technic:mithril_chest'},
+		'basic_materials:padlock',
+		'technic:mithril_chest',
 	}
 })
 

--
Gitblit v1.8.0