123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- local modname = minetest.get_current_modname()
- local modpath = minetest.get_modpath(modname)
- local S = minetest.get_translator(modname)
- dofile(modpath .. "/seeds.lua")
- dofile(modpath .. "/l_system_gen.lua")
- minetest.register_node(modname .. ":wood",
- {
- description = S("Wood"),
- drawtype = "normal",
- paramtype2 = "facedir",
- is_ground_content = false,
- tiles =
- {
- modname .. "_wood_slice.png",
- modname .. "_wood_slice.png",
- modname .. "_wood_sides.png",
- },
- sounds =
- {
- dig = "wood_low_dig",
- dug = "wood_low_dug",
- place = "wood_low_place",
- footstep = "wood_low_footstep",
- },
- groups = {choppy = 2},
- })
- minetest.register_node(modname .. ":leaves",
- {
- description = S("Leaves"),
- drawtype = "normal",
- tiles = {modname .. "_leaves.png"},
- groups = {oddly_breakable_by_hand = 3},
- is_ground_content = false,
- sounds =
- {
- footstep = "plant_footstep",
- dig = "plant_dig",
- dug = "plant_dug",
- place = "plant_place",
- }
- })
- if minetest.get_modpath("eg_mapgen")
- then
- --DECORATIONS
- --small tree
- minetest.register_decoration(
- {
- deco_type = "schematic",
- place_on = "eg_mapgen:grass",
- sidelen = 2,
- noise_params =
- {
- offset = -0.1,
- scale = 0.15,
- spread = {x = 200, y = 200, z = 200},
- seed = 5802903,
- octaves = 3,
- persist = 0.7,
- lacunarity = 8,
- },
- y_min = 1,
- schematic = modpath .. "/schematics/little_tree.mts",
- flags = "place_center_x, place_center_z",
- place_offset_y = 1,
- })
- --palm tree
- minetest.register_decoration(
- {
- deco_type = "schematic",
- place_on = "eg_mapgen:sand",
- sidelen = 8,
- noise_params =
- {
- offset = -0.1,
- scale = 0.15,
- spread = {x = 300, y = 300, z = 300},
- seed = 5782465,
- octaves = 3,
- persist = 0.7,
- lacunarity = 8,
- },
- y_min = 1,
- schematic = modpath .. "/schematics/palm_tree.mts",
- flags = "place_center_x, place_center_z",
- place_offset_y = 1,
- })
- --spruce tree
- minetest.register_decoration(
- {
- deco_type = "schematic",
- place_on = "eg_mapgen:grass",
- sidelen = 8,
- noise_params =
- {
- offset = -0.2,
- scale = 0.45,
- spread = {x = 500, y = 500, z = 500},
- seed = 2178584,
- octaves = 3,
- persist = 0.7,
- lacunarity = 16,
- },
- y_min = 70,
- schematic = modpath .. "/schematics/spruce.mts",
- flags = "place_center_x, place_center_z",
- place_offset_y = 1,
- })
- --tree tree
- minetest.register_decoration(
- {
- deco_type = "schematic",
- place_on = "eg_mapgen:grass",
- sidelen = 8,
- noise_params =
- {
- offset = -0.3,
- scale = 0.4,
- spread = {x = 500, y = 500, z = 500},
- seed = 5892841,
- octaves = 3,
- persist = 0.7,
- lacunarity = 8,
- },
- y_min = 1,
- schematic = modpath .. "/schematics/tree1.mts",
- flags = "place_center_x, place_center_z",
- place_offset_y = 1,
- })
- --thicker tree tree
- minetest.register_decoration(
- {
- deco_type = "schematic",
- place_on = "eg_mapgen:grass",
- sidelen = 16 ,
- noise_params =
- {
- offset = -0.3,
- scale = 0.4,
- spread = {x = 500, y = 500, z = 500},
- seed = 895682,
- octaves = 3,
- persist = 0.7,
- lacunarity = 8,
- },
- y_min = 1,
- schematic = modpath .. "/schematics/tree2.mts",
- flags = "place_center_x, place_center_z",
- place_offset_y = 1,
- })
- end
|