1 local S
= minetest
.get_translator("hades_trees")
3 minetest
.register_node("hades_trees:birch_sapling", {
4 description
= S("Birch Sapling"),
5 _tt_help
= S("Needs Dirt and light to grow"),
6 drawtype
= "plantlike",
7 tiles
= {"default_sapling_birch.png"},
8 inventory_image
= "default_sapling_birch.png",
9 wield_image
= "default_sapling_birch.png",
14 fixed
= {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
16 groups
= {dig_immediate
=3,flammable
=2,attached_node
=1, sapling
=1},
17 sounds
= hades_sounds
.node_sound_defaults(),
20 minetest
.register_node("hades_trees:birch_tree", {
21 description
= S("Birch Tree Trunk"),
23 tiles
= {"default_tree_birch_top.png", "default_tree_birch_top.png", "default_tree_birch.png"},
24 is_ground_content
= false,
29 {-0.35,-0.5,-0.4,0.35,0.5,0.4},
30 {-0.4,-0.5,-0.35, 0.4,0.5,0.35},
31 {-0.25,-0.5,-0.45,0.25,0.5,0.45},
32 {-0.45,-0.5,-0.25, 0.45,0.5,0.25},
33 {-0.15,-0.5,-0.5,0.15,0.5,0.5},
34 {-0.5,-0.5,-0.15, 0.5,0.5,0.15},
37 groups
= {tree
= 1, choppy
= 2, oddly_breakable_by_hand
= 1, flammable
= 2},
38 sounds
= hades_sounds
.node_sound_wood_defaults(),
41 minetest
.register_node("hades_trees:birch_leaves", {
42 description
= S("Birch Leaves"),
43 drawtype
= "allfaces_optional",
44 tiles
= {"default_leaves_birch.png"},
47 is_ground_content
= false,
49 groups
= {snappy
=3, leafdecay
=3, flammable
=2, leaves
=1, porous
=1},
54 -- player will get sapling with 1/20 chance
55 items
= {'hades_trees:birch_sapling'},
59 -- player will get leaves only if he get no saplings,
60 -- this is because max_items is 1
61 items
= {'hades_trees:birch_leaves'},
65 sounds
= hades_sounds
.node_sound_leaves_defaults(),
68 minetest
.register_node("hades_trees:birch_bark", {
69 description
= S("Birch Bark"),
70 paramtype2
= "facedir",
71 tiles
= { "default_tree_birch.png" },
72 is_ground_content
= false,
73 groups
= { choppy
= 3, oddly_breakable_by_hand
= 1, flammable
= 2 },
74 sounds
= hades_sounds
.node_sound_wood_defaults(),
77 minetest
.register_abm({
78 nodenames
= {"hades_trees:birch_sapling"},
81 action
= function(pos
, node
)
82 hades_trees
:generate_birchtree(pos
, "hades_trees:birch_tree", "hades_trees:birch_leaves", {"hades_core:dirt", "hades_core:dirt_with_grass"})