Adding support for the wood mod

This commit is contained in:
Jordan Leppert 2021-12-08 10:42:51 +00:00
parent 62cab1b1d9
commit 443c9b8c33
2 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
name = moretrees
depends = default, biome_lib, vessels
optional_depends = doors, stairs, moreblocks, farming
optional_depends = doors, stairs, moreblocks, farming, wood_types
min_minetest_version = 5.2.0

View File

@ -292,6 +292,15 @@ for i in ipairs(moretrees.treelist) do
sounds = default.node_sound_wood_defaults(),
})
-- Register this wood type with the `wood_types` mod, so all mods can easily use it automatically
if minetest.get_modpath("wood_types") then
wood_types.register_wood(
"moretrees:"..treename.."_planks",
treename,
moretrees.treedesc[treename].planks,
{"moretrees_"..treename.."_wood.png"})
end
minetest.register_node("moretrees:"..treename.."_sapling", {
description = moretrees.treedesc[treename].sapling,
drawtype = "plantlike",