dannydark wrote:It would be nice to see this mod updated to use the new L-System treegen.
conifer_tree1={
axiom="FFFAF[&&-F][&&+F][&&---F][&&+++F]FF",
rules_a="FF[FF][&&-FBF][&&+FBF][&&---FBF][&&+++FBF]F/A",
rules_b="[-FB][+FB]",
trunk="conifers:trunk",
leaves="conifers:leaves",
angle=45,
iterations=7,
random_level=4,
thin_trunks=true
}
conifer_tree2={
axiom="FFFAF[&&-F][&&+F][&&---F][&&+++F]FF",
rules_a="FF[FF][&&-FBF][&&+FBF][&&---FBF][&&+++FBF]F/A",
rules_b="[-FB][+FB]",
trunk="conifers:trunk",
leaves="conifers:leaves_special",
angle=45,
iterations=7,
random_level=4,
thin_trunks=true
}
minetest.register_craftitem("treetest:conifer", {
description = "Conifer tree spawner",
inventory_image = "default_stick.png",
on_use = function(itemstack, user, pointed_thing)
--print(dump(pointed_thing))
if pointed_thing.type == "node" then
local pos = pointed_thing.above
if math.random(1, 2) > 1.5 then
minetest.env:spawn_tree(pos,conifer_tree1)
else
minetest.env:spawn_tree(pos,conifer_tree2)
end
end
end,
})
minetest.register_node(":conifers:trunk", {
description = "Conifer trunk",
tile_images = {
"conifers_trunktop.png",
"conifers_trunktop.png",
"conifers_trunk.png",
"conifers_trunk.png",
"conifers_trunk.png",
"conifers_trunk.png"
},
paramtype = "facedir_simple",
is_ground_content = true,
groups = {
tree = 1,
snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 1,
flammable = 2
},
sounds = default.node_sound_wood_defaults()
})
minetest.register_node(":conifers:leaves", {
description = "Conifer leaves",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tile_images = { "conifers_leaves.png" },
paramtype = "light",
groups = {
snappy = 3,
leafdecay = 3,
flammable = 2
},
drop = {
max_items = 1,
items = {
{
-- player will get sapling with 1/20 chance
items = {'conifers:sapling'},
rarity = 20,
},
{
-- player will get leaves only if he get no saplings,
-- this is because max_items is 1
items = {'conifers:leaves'},
}
}
},
sounds = default.node_sound_leaves_defaults()
})
minetest.register_node(":conifers:leaves_special", {
description = "Bright conifer leaves",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tile_images = { "conifers_leaves_special.png" },
paramtype = "light",
groups = {
snappy = 3,
leafdecay = 3,
flammable = 2
},
drop = {
max_items = 1,
items = {
{
-- player will get sapling with 1/20 chance
items = {'conifers:sapling'},
rarity = 20,
},
{
-- player will get leaves only if he get no saplings,
-- this is because max_items is 1
items = {'conifers:leaves'},
}
}
},
sounds = default.node_sound_leaves_defaults()
})
jojoa1997 wrote:But conifers should be straight.
Users browsing this forum: No registered users and 6 guests