From 1a45ad19d4fa627e147bd385665e37942f6147fb Mon Sep 17 00:00:00 2001
From: Serhiy Zahoriya <serhiy.int@gmail.com>
Date: Sat, 11 Jan 2020 22:06:24 +0100
Subject: [PATCH] Alloy furnace: Accept only unique ItemStacks from tubes (#523)

---
 technic/machines/register/extractor_recipes.lua |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/technic/machines/register/extractor_recipes.lua b/technic/machines/register/extractor_recipes.lua
index 1de0ba0..ba43df5 100644
--- a/technic/machines/register/extractor_recipes.lua
+++ b/technic/machines/register/extractor_recipes.lua
@@ -15,6 +15,7 @@
 	-- register recipes with the same crafting ratios as `dye` provides
 	local dye_recipes = {
 		{"technic:coal_dust",                 "dye:black 2"},
+		{"default:blueberries",               "dye:violet 2"},
 		{"default:grass_1",                   "dye:green 1"},
 		{"default:dry_shrub",                 "dye:brown 1"},
 		{"default:junglegrass",               "dye:green 2"},
@@ -36,13 +37,21 @@
 	-- overwrite the existing crafting recipes
 	local dyes = {"white", "red", "yellow", "blue", "violet", "orange"}
 	for _, color in ipairs(dyes) do
-		minetest.register_craft({
-		        type = "shapeless",
-		        output = "dye:"..color.." 1",
-		        recipe = {"group:flower,color_"..color},
+		minetest.clear_craft({
+			type = "shapeless",
+			recipe = {"group:flower,color_"..color},
 		})
-
+		minetest.register_craft({
+			type = "shapeless",
+			output = "dye:"..color.." 1",
+			recipe = {"group:flower,color_"..color},
+		})
 	end
+
+	minetest.clear_craft({
+		type = "shapeless",
+		recipe = {"group:coal"},
+	})
 	minetest.register_craft({
 		type = "shapeless",
 		output = "dye:black 1",
@@ -50,6 +59,10 @@
 	})
 
 	if unifieddyes then
+		minetest.clear_craft({
+			type = "shapeless",
+			recipe = {"default:cactus"},
+		})
 		minetest.register_craft({
 			type = "shapeless",
 			output = "dye:green 1",

--
Gitblit v1.8.0