Minetest Mod - Charcoal Add Charcoal to Minetest
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.4 KiB

--[[
Charcoal Mod
]]
charcoal = {
mod = "charcoal",
version = "1.1",
path = minetest.get_modpath("charcoal"),
}
local modname = "charcoal"
-- Logging
minetest.log("action", "[MOD] charcoal mod loaded")
-- charcoal:charcoal_lump
minetest.register_craftitem("charcoal:charcoal_lump", {
description = "Charcoal",
inventory_image = "charcoal_lump.png",
})
minetest.register_craft({
type = "cooking",
output = "charcoal:charcoal_lump",
recipe = "group:tree",
})
minetest.register_craft({
type = "cooking",
output = "charcoal:charcoal_lump",
recipe = "group:wood",
})
minetest.register_craft({
type = "fuel",
recipe = "charcoal:charcoal_lump",
burntime = 40,
})
minetest.register_craft({
output = "default:torch",
recipe = {
{"charcoal:charcoal_lump"},
{"default:stick"},
}
})
minetest.register_craft({
type = "shapeless",
output = "charcoal:charcoal_lump 9",
recipe = {"charcoal:charcoal_block"},
})
-- charcoal:charcoal_block
minetest.register_craftitem("charcoal:charcoal_block", {
description = "Charcoal Block",
inventory_image = "charcoal_block.png"
})
minetest.register_node("charcoal:charcoal_block", {
description = "Charcoal Block",
tiles = {"charcoal_block.png"},
is_ground_content = false,
groups = {cracky = 3, stone = 1},
})
minetest.register_craft({
output = "charcoal:charcoal_block",
recipe = {
{"charcoal:charcoal_lump", "charcoal:charcoal_lump", "charcoal:charcoal_lump"},
{"charcoal:charcoal_lump", "charcoal:charcoal_lump", "charcoal:charcoal_lump"},
{"charcoal:charcoal_lump", "charcoal:charcoal_lump", "charcoal:charcoal_lump"},
}
})
minetest.register_craft({
type = "fuel",
recipe = "charcoal:charcoal_block",
burntime = 100,
})
-- charcoal:charcoal_stair
minetest.register_node("charcoal:charcoal_stair", {
description = "Charcoal Stair",
tiles = {"charcoal_block.png"},
is_ground_content = false,
drawtype = "nodebox",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
},
}
})
minetest.register_craft({
output = "charcoal:charcoal_stair",
recipe = {
{"charcoal:charcoal_block", "", ""},
{"charcoal:charcoal_block", "charcoal:charcoal_block", ""},
{"charcoal:charcoal_block", "charcoal:charcoal_block", "charcoal:charcoal_block"},
}
})