Simplify wooden planks crafting

This commit is contained in:
NO11 2021-05-10 10:06:34 +00:00
parent 6ffb7f525a
commit 9fa51dc6b9

View File

@ -4,84 +4,45 @@
-- Crafting definition
--
local craft_oak_planks = function(subname)
local craft_planks = function(output, input)
minetest.register_craft({
output = "mcl_core:wood 4",
output = "mcl_core:"..output.."wood 4",
recipe = {
{"mcl_core:"..subname},
}
})
end
local craft_dark_oak_planks = function(subname)
minetest.register_craft({
output = "mcl_core:darkwood 4",
recipe = {
{"mcl_core:"..subname},
}
})
end
local craft_jungle_planks = function(subname)
minetest.register_craft({
output = "mcl_core:junglewood 4",
recipe = {
{"mcl_core:"..subname},
}
})
end
local craft_acacia_planks = function(subname)
minetest.register_craft({
output = "mcl_core:acaciawood 4",
recipe = {
{"mcl_core:"..subname},
}
})
end
local craft_spruce_planks = function(subname)
minetest.register_craft({
output = "mcl_core:sprucewood 4",
recipe = {
{"mcl_core:"..subname},
}
})
end
local craft_birch_planks = function(subname)
minetest.register_craft({
output = "mcl_core:birchwood 4",
recipe = {
{"mcl_core:"..subname},
{"mcl_core:"..input},
}
})
end
craft_oak_planks("tree")
craft_oak_planks("tree_bark")
craft_oak_planks("stripped_oak")
craft_oak_planks("stripped_oak_bark")
craft_planks("", "tree")
craft_planks("", "tree_bark")
craft_planks("", "stripped_oak")
craft_planks("", "stripped_oak_bark")
craft_dark_oak_planks("darktree")
craft_dark_oak_planks("darktree_bark")
craft_dark_oak_planks("stripped_dark_oak")
craft_dark_oak_planks("stripped_dark_oak_bark")
craft_planks("dark", "darktree")
craft_planks("dark", "darktree_bark")
craft_planks("dark", "stripped_dark_oak")
craft_planks("dark", "stripped_dark_oak_bark")
craft_jungle_planks("jungletree")
craft_jungle_planks("jungletree_bark")
craft_jungle_planks("stripped_jungle")
craft_jungle_planks("stripped_jungle_bark")
craft_planks("jungle", "jungletree")
craft_planks("jungle", "jungletree_bark")
craft_planks("jungle", "stripped_jungle")
craft_planks("jungle", "stripped_jungle_bark")
craft_acacia_planks("acaciatree")
craft_acacia_planks("acaciatree_bark")
craft_acacia_planks("stripped_acacia")
craft_acacia_planks("stripped_acacia_bark")
craft_planks("acacia", "acaciatree")
craft_planks("acacia", "acaciatree_bark")
craft_planks("acacia", "stripped_acacia")
craft_planks("acacia", "stripped_acacia_bark")
craft_spruce_planks("sprucetree")
craft_spruce_planks("sprucetree_bark")
craft_spruce_planks("stripped_spruce")
craft_spruce_planks("stripped_spruce_bark")
craft_planks("spruce", "sprucetree")
craft_planks("spruce", "sprucetree_bark")
craft_planks("spruce", "stripped_spruce")
craft_planks("spruce", "stripped_spruce_bark")
craft_planks("birch", "birchtree")
craft_planks("birch", "birchtree_bark")
craft_planks("birch", "stripped_birch")
craft_planks("birch", "stripped_birch_bark")
craft_birch_planks("birchtree")
craft_birch_planks("birchtree_bark")
craft_birch_planks("stripped_birch")
craft_birch_planks("stripped_birch_bark")
minetest.register_craft({
type = 'shapeless',