2023-10-11 07:17:21 +00:00
|
|
|
local modname = minetest.get_current_modname()
|
|
|
|
|
2023-10-13 07:31:55 +00:00
|
|
|
blockgame.register_node(modname .. ":log", {
|
2023-10-11 16:26:48 +00:00
|
|
|
description = "Log",
|
|
|
|
tiles = {
|
|
|
|
modname .. "_log_top.png",
|
|
|
|
modname .. "_log_top.png",
|
|
|
|
modname .. "_log.png",
|
|
|
|
},
|
|
|
|
groups = {
|
|
|
|
woody = 1,
|
|
|
|
},
|
2023-10-11 07:17:21 +00:00
|
|
|
})
|
2023-10-13 07:31:55 +00:00
|
|
|
blockgame.register_node(modname .. ":log_alive", {
|
2023-10-17 07:43:25 +00:00
|
|
|
description = "Living Log",
|
2023-10-11 16:23:09 +00:00
|
|
|
tiles = {
|
2023-10-11 16:26:48 +00:00
|
|
|
modname .. "_log_top_alive.png",
|
|
|
|
modname .. "_log_top_alive.png",
|
2023-10-11 16:23:09 +00:00
|
|
|
modname .. "_log_alive.png",
|
|
|
|
},
|
|
|
|
groups = {
|
|
|
|
woody = 1,
|
|
|
|
planty = 1,
|
|
|
|
},
|
|
|
|
drop = modname .. ":log",
|
|
|
|
})
|
2023-10-11 07:17:21 +00:00
|
|
|
|
2023-10-17 07:43:25 +00:00
|
|
|
blockgame.register_node(modname .. ":sapling", {
|
|
|
|
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",
|
2023-10-11 07:17:21 +00:00
|
|
|
})
|
|
|
|
|
2023-10-17 07:44:42 +00:00
|
|
|
local function reg_leaves (name, desc, drop, groups)
|
|
|
|
groups = groups or {}
|
|
|
|
groups.planty = 1
|
|
|
|
groups.air_flowable = 1
|
2023-10-16 18:32:52 +00:00
|
|
|
blockgame.register_node(modname .. ":" .. name, {
|
|
|
|
description = desc,
|
|
|
|
drawtype = "glasslike",
|
|
|
|
tiles = {
|
|
|
|
modname .. "_" .. name .. ".png",
|
|
|
|
},
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
groups = groups,
|
|
|
|
drop = drop,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2023-10-17 07:44:42 +00:00
|
|
|
reg_leaves("leaves", "Leaves")
|
|
|
|
reg_leaves("leaves_alive", "Growing Leaves", modname .. ":leaves")
|
|
|
|
reg_leaves("leaves_decomposing", "Decomposing Leaves")
|
2023-10-11 07:17:21 +00:00
|
|
|
|
|
|
|
blockgame.reg_simple_node("nut", "Nut", {
|
|
|
|
woody = 1,
|
|
|
|
})
|
|
|
|
|
|
|
|
blockgame.reg_simple_node("root", "Root", {
|
|
|
|
woody = 1,
|
|
|
|
})
|
2023-10-17 07:45:49 +00:00
|
|
|
blockgame.reg_simple_node("root_alive", "Growing Root", {
|
|
|
|
woody = 1,
|
|
|
|
})
|