65 lines
1.2 KiB
Lua
65 lines
1.2 KiB
Lua
local modname = minetest.get_current_modname()
|
|
|
|
blockgame.register_node(modname .. ":log", {
|
|
description = "Log",
|
|
tiles = {
|
|
modname .. "_log_top.png",
|
|
modname .. "_log_top.png",
|
|
modname .. "_log.png",
|
|
},
|
|
groups = {
|
|
woody = 1,
|
|
},
|
|
})
|
|
blockgame.register_node(modname .. ":log_alive", {
|
|
description = "Growing Log",
|
|
tiles = {
|
|
modname .. "_log_top_alive.png",
|
|
modname .. "_log_top_alive.png",
|
|
modname .. "_log_alive.png",
|
|
},
|
|
groups = {
|
|
woody = 1,
|
|
planty = 1,
|
|
},
|
|
drop = modname .. ":log",
|
|
})
|
|
|
|
blockgame.reg_simple_node("sapling", "Sapling", {
|
|
planty = 1,
|
|
})
|
|
|
|
local function reg_leaves (name, desc, groups, drop)
|
|
blockgame.register_node(modname .. ":" .. name, {
|
|
description = desc,
|
|
drawtype = "glasslike",
|
|
tiles = {
|
|
modname .. "_" .. name .. ".png",
|
|
},
|
|
paramtype = "light",
|
|
sunlight_propagates = true,
|
|
groups = groups,
|
|
drop = drop,
|
|
})
|
|
end
|
|
|
|
reg_leaves("leaves", "Leaves", {
|
|
planty = 1,
|
|
air_flowable = 1,
|
|
})
|
|
reg_leaves("leaves_alive", "Growing Leaves", {
|
|
planty = 1,
|
|
air_flowable = 1,
|
|
}, modname .. ":leaves")
|
|
reg_leaves("leaves_decomposing", "Decomposing Leaves", {
|
|
planty = 1,
|
|
air_flowable = 1,
|
|
})
|
|
|
|
blockgame.reg_simple_node("nut", "Nut", {
|
|
woody = 1,
|
|
})
|
|
|
|
blockgame.reg_simple_node("root", "Root", {
|
|
woody = 1,
|
|
})
|