68e005814f
saplings now only check for groups, not specific nodes, when determining whether they are supported. the previously checked nodes are now in the new group that's being checked.
41 lines
754 B
Lua
41 lines
754 B
Lua
local modname = minetest.get_current_modname()
|
|
|
|
local function reg_log (name, def)
|
|
def = def or {}
|
|
|
|
def.description = def.description or "Log"
|
|
|
|
local texture = def.texture or name
|
|
def.tiles = blockgame.underride(def.tiles, {
|
|
modname .. "_" .. texture .. "_top.png",
|
|
modname .. "_" .. texture .. "_top.png",
|
|
modname .. "_" .. texture .. ".png",
|
|
})
|
|
|
|
def.groups = blockgame.underride(def.groups, {
|
|
woody = 1,
|
|
supports_leaves = 1,
|
|
})
|
|
|
|
blockgame.register_node(name, def)
|
|
end
|
|
|
|
reg_log("log", {
|
|
groups = {
|
|
supports_leaves = 0,
|
|
},
|
|
})
|
|
reg_log("log_alive", {
|
|
groups = {
|
|
planty = 1,
|
|
supports_sapling = 1,
|
|
},
|
|
texture = "log",
|
|
drop = modname .. ":log",
|
|
})
|
|
reg_log("sapling", {
|
|
groups = {
|
|
planty = 1,
|
|
},
|
|
drop = modname .. ":log",
|
|
})
|