2022-05-01 03:10:23 +02:00
|
|
|
local function register_raw_ore(description, n)
|
2022-07-25 17:53:37 +02:00
|
|
|
local ore = description:lower()
|
|
|
|
local n = n or ""
|
|
|
|
local raw_ingot = "mcl_raw_ores:raw_"..ore
|
|
|
|
local texture = "mcl_raw_ores_raw_"..ore
|
2022-05-04 11:07:04 +02:00
|
|
|
|
2022-07-25 17:53:37 +02:00
|
|
|
minetest.register_craftitem(raw_ingot, {
|
2022-05-04 11:07:04 +02:00
|
|
|
description = ("Raw "..description),
|
|
|
|
_doc_items_longdesc = ("Raw "..ore..". Mine a"..n.." "..ore.." ore to get it."),
|
|
|
|
inventory_image = texture..".png",
|
2022-07-25 17:53:37 +02:00
|
|
|
groups = { craftitem = 1, blast_furnace_smeltable = 1 },
|
|
|
|
})
|
2022-05-04 11:07:04 +02:00
|
|
|
|
2022-07-25 17:53:37 +02:00
|
|
|
minetest.register_node(raw_ingot.."_block", {
|
|
|
|
description = ("Block of Raw "..description),
|
|
|
|
_doc_items_longdesc = ("A block of raw "..ore.." is mostly a decorative block but also useful as a compact storage of raw "..ore.."."),
|
|
|
|
tiles = { texture.."_block.png" },
|
|
|
|
is_ground_content = false,
|
|
|
|
groups = { pickaxey = 2, building_block = 1, blast_furnace_smeltable = 1 },
|
|
|
|
sounds = mcl_sounds.node_sound_metal_defaults(),
|
|
|
|
_mcl_blast_resistance = 6,
|
|
|
|
_mcl_hardness = 5,
|
|
|
|
})
|
2022-05-04 11:07:04 +02:00
|
|
|
|
2022-07-25 17:53:37 +02:00
|
|
|
minetest.register_craft({
|
|
|
|
output = raw_ingot.."_block",
|
|
|
|
recipe = {
|
|
|
|
{ raw_ingot, raw_ingot, raw_ingot },
|
|
|
|
{ raw_ingot, raw_ingot, raw_ingot },
|
|
|
|
{ raw_ingot, raw_ingot, raw_ingot },
|
|
|
|
},
|
|
|
|
})
|
2022-05-04 11:07:04 +02:00
|
|
|
|
2022-07-25 17:53:37 +02:00
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
output = "mcl_core:"..ore.."_ingot",
|
|
|
|
recipe = raw_ingot,
|
|
|
|
cooktime = 10,
|
|
|
|
})
|
2022-05-04 11:07:04 +02:00
|
|
|
|
2022-07-25 17:53:37 +02:00
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
output = "mcl_core:"..ore.."block",
|
|
|
|
recipe = raw_ingot.."_block",
|
|
|
|
cooktime = 20,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = raw_ingot.." 9",
|
|
|
|
recipe = {
|
|
|
|
{ raw_ingot.."_block" },
|
|
|
|
},
|
|
|
|
})
|
2022-05-01 03:10:23 +02:00
|
|
|
end
|
2022-05-04 11:07:04 +02:00
|
|
|
|
2022-05-01 03:10:23 +02:00
|
|
|
register_raw_ore("Iron", "n")
|
|
|
|
register_raw_ore("Gold")
|