Add crafting mod

This commit is contained in:
rubenwardy 2018-04-18 23:30:38 +01:00
parent 8c67155cdb
commit 52f2b617cc
No known key found for this signature in database
GPG key ID: A1E29D52FF81513C
5 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1 @@
crafting

View file

@ -0,0 +1,73 @@
local sword_ores = {
{"wood", "default:wood"},
{"stone", "default:cobble"},
{"steel", "default:steel_ingot"},
{"bronze", "default:bronze_ingot"},
{"mese", "default:mese_crystal"},
{"diamond", "default:diamond"},
}
local lim_ores = {
{"wood", "default:wood"},
{"stone", "default:cobble"},
{"steel", "default:steel_ingot"},
}
for _, orex in pairs(sword_ores) do
crafting.register_recipe({
type = "inv",
output = "default:sword_" .. orex[1],
items = { "default:stick", orex[2] .. " 2" },
always_known = true,
level = 1,
})
end
for _, orex in pairs(lim_ores) do
crafting.register_recipe({
type = "inv",
output = "default:shovel_" .. orex[1],
items = { "default:stick 2", orex[2] },
always_known = true,
level = 1,
})
end
for _, orex in pairs(lim_ores) do
crafting.register_recipe({
type = "inv",
output = "default:axe_" .. orex[1],
items = { "default:stick 2", orex[2] .. " 2" },
always_known = true,
level = 1,
})
end
crafting.register_recipe({
type = "inv",
output = "default:furnace",
items = { "default:cobble 10" },
always_known = true,
level = 1,
})
crafting.register_recipe({
type = "inv",
output = "doors:door_steel",
items = { "default:steel 6", },
always_known = true,
level = 1,
})
crafting.register_recipe({
type = "inv",
output = "default:wood 4",
items = { "group:tree", },
always_known = true,
level = 1,
})
crafting.register_recipe({
type = "inv",
output = "default:stick 4",
items = { "default:wood", },
always_known = true,
level = 1,
})