diff --git a/biome_arnhem_land.lua b/biome_arnhem_land.lua new file mode 100644 index 0000000..0a816ea --- /dev/null +++ b/biome_arnhem_land.lua @@ -0,0 +1,109 @@ +-- mods/australia/biome_arnhem_land.lua + +minetest.register_biome({ + name = "arnhem_land", + --node_dust = "", + node_top = "default:dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = 4, + y_max = 35, + heat_point = 60, + humidity_point = 80, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"arnhem_land"}, + y_min = 4, + y_max = 35, + decoration = "default:grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(-0.03, 0.09, 5) +register_grass_decoration(-0.015, 0.075, 4) +register_grass_decoration(0, 0.06, 3) +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + + + +-- +-- Trees +-- + + -- Darwin Woollybutt +aus.schematics.darwin_woollybutt_tree = {} +local max_r = 4 +local ht = 5 +local fruit = nil +local limbs = nil +local tree = "australia:darwin_woollybutt_tree" +local leaves = "australia:darwin_woollybutt_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(6, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.darwin_woollybutt_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 8, + y_max = 35, + fill_ratio = (max_r-r+1)/10000, + biomes = {"arnhem_land"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- River Oak +aus.schematics.river_oak_small_tree = {} +local max_r = 4 +local ht = 6 +local fruit = nil +local limbs = false +local tree = "australia:river_oak_tree" +local leaves = "australia:river_oak_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.river_oak_small_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 12, + y_max = 35, + fill_ratio = (max_r-r+1)/12000, + biomes = {"arnhem_land"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_australian_alps.lua b/biome_australian_alps.lua new file mode 100644 index 0000000..4cc801d --- /dev/null +++ b/biome_australian_alps.lua @@ -0,0 +1,91 @@ +-- mods/australia/biome_australian_alps.lua + +minetest.register_biome({ + name = "australian_alps", + node_dust = "default:snow", + node_top = "default:snowblock", + depth_top = 2, + node_filler = "default:dirt_with_snow", + depth_filler = 1, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = 150, + y_max = 31000, + heat_point = 10, + humidity_point = 50, +}) + + + +-- +-- Logs +-- + + -- Snow Gum Log +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:snowblock"}, + sidelen = 16, + noise_params = { + offset = 0.0018, + scale = 0.0011, + spread = {x = 250, y = 250, z = 250}, + seed = 34, + octaves = 3, + persist = 0.66 + }, + biomes = {"australian_alps"}, + y_min = 150, + y_max = 170, + schematic = { + size = {x = 3, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "australia:snow_gum_tree", param2 = 12, prob = 191}, + {name = "australia:snow_gum_tree", param2 = 12}, + {name = "australia:snow_gum_tree", param2 = 12, prob = 127}, + {name = "air", prob = 0}, + {name = "flowers:mushroom_brown", prob = 63}, + {name = "air", prob = 0}, + }, + }, + flags = "place_center_x", + rotation = "random", +}) + + + +-- +-- Trees +-- + + -- Snow Gum +aus.schematics.snow_gum_tree = {} +local max_r = 4 +local ht = 4 +local fruit = nil +local limbs = nil +local tree = "australia:snow_gum_tree" +local leaves = "australia:snow_gum_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(1, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.snow_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:snowblock"}, + y_min = 150, + y_max = 180, + fill_ratio = (max_r-r+1)/2500, + biomes = {"australian_alps"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_central_australia.lua b/biome_central_australia.lua new file mode 100644 index 0000000..455d816 --- /dev/null +++ b/biome_central_australia.lua @@ -0,0 +1,232 @@ +-- mods/australia/biome_central_australia.lua + +minetest.register_biome({ + name = "central_australia", + --node_dust = "", + node_top = "australia:red_dirt", + depth_top = 1, + node_filler = "australia:red_stone", + depth_filler = 2, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = 36, + y_max = 31000, + heat_point = 80, + humidity_point = 25, +}) + + + +-- +-- Decorations +-- + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"australia:red_dirt"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"central_australia"}, + y_min = 36, + y_max = 190, + decoration = "default:dry_grass_"..length, + }) +end + + -- Dry grasses +register_dry_grass_decoration(0.05, 0.01, 3) +register_dry_grass_decoration(0.07, -0.01, 2) +register_dry_grass_decoration(0.09, -0.03, 1) + + + -- Mitchell Grass +minetest.register_decoration({ + deco_type = "simple", + place_on = {"australia:red_dirt"}, + sidelen = 80, + fill_ratio = 0.05, + biomes = {"central_australia"}, + y_min = 37, + y_max = 180, + decoration = "australia:mitchell_grass", +}) + + -- Spinifex +minetest.register_decoration({ + deco_type = "simple", + place_on = {"australia:red_dirt"}, + sidelen = 80, + fill_ratio = 0.05, + biomes = {"central_australia"}, + y_min = 37, + y_max = 170, + decoration = "australia:spinifex", +}) + + + +-- +-- Trees +-- + + -- Coolabah Tree +aus.schematics.coolabah_tree = {} +local max_r = 5 +local ht = 7 +local fruit = nil +local limbs = nil +local tree = "australia:coolabah_tree" +local leaves = "australia:coolabah_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.coolabah_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:red_dirt"}, + y_min = 36, + y_max = 140, + fill_ratio = (max_r-r+1)/20000, + biomes = {"central_australia"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Desert Oak +aus.schematics.desert_oak_tree = {} +local max_r = 8 +local ht = 5 +local fruit = nil +local limbs = nil +local tree = "australia:desert_oak_tree" +local leaves = "australia:desert_oak_leaves" +for r = 6,max_r do + local schem = aus.generate_tree_schematic(6, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.desert_oak_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:red_dirt"}, + y_min = 36, + y_max = 140, + fill_ratio = (max_r-r+1)/15000, + biomes = {"central_australia"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Desert Quandong +aus.schematics.quandong_tree = {} +local max_r = 4 +local ht = 4 +local fruit = "australia:quandong" +local limbs = false +local tree = "australia:quandong_tree" +local leaves = "australia:quandong_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.quandong_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:red_dirt"}, + y_min = 36, + y_max = 130, + fill_ratio = (max_r-r+1)/15000, + biomes = {"central_australia"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Wirewood +aus.schematics.wirewood_tree = {} +local max_r = 4 +local ht = 4 +local fruit = nil +local limbs = false +local tree = "australia:wirewood_tree" +local leaves = "australia:wirewood_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.wirewood_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:red_dirt"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/12000, + biomes = {"central_australia"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- River Red Gum +aus.schematics.river_red_gum_tree = {} +local max_r = 13 +local ht = 13 +local fruit = nil +local limbs = nil +local tree = "australia:river_red_gum_tree" +local leaves = "australia:river_red_gum_leaves" +for r = 10,max_r do + local schem = aus.generate_giant_tree_schematic(7, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.river_red_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:red_dirt"}, + y_min = 36, + y_max = 140, + fill_ratio = (max_r-r+1)/20000, + biomes = {"central_australia"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Sugar Gum +aus.schematics.sugar_gum_tree = {} +local max_r = 11 +local ht = 10 +local fruit = nil +local limbs = nil +local tree = "australia:sugar_gum_tree" +local leaves = "australia:sugar_gum_leaves" +for r = 9,max_r do + local schem = aus.generate_tree_schematic(8, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.sugar_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:red_dirt"}, + y_min = 36, + y_max = 140, + fill_ratio = (max_r-r+1)/20000, + biomes = {"central_australia"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_eastern_coasts.lua b/biome_eastern_coasts.lua new file mode 100644 index 0000000..0ee8d34 --- /dev/null +++ b/biome_eastern_coasts.lua @@ -0,0 +1,466 @@ +-- mods/australia/biome_eastern_coasts.lua + +minetest.register_biome({ + name = "eastern_coasts", + --node_dust = "", + node_top = "default:dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = 4, + y_max = 35, + heat_point = 35, + humidity_point = 60, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"eastern_coasts"}, + y_min = 4, + y_max = 35, + decoration = "default:grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(-0.03, 0.09, 5) +register_grass_decoration(-0.015, 0.075, 4) +register_grass_decoration(0, 0.06, 3) +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + + + -- Waratah +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 80, + fill_ratio = 0.005, + biomes = {"eastern_coasts"}, + y_min = 6, + y_max = 35, + schematic = { + size = { x = 2, y = 3, z = 2}, + data = { + { name = "ignore", param1 = 0, param2 = 0 }, + { name = "australia:waratah", param1 = 255, param2 = 0 }, + { name = "australia:waratah", param1 = 255, param2 = 0 }, + { name = "australia:waratah", param1 = 255, param2 = 0 }, + { name = "ignore", param1 = 0, param2 = 0 }, + { name = "australia:waratah", param1 = 255, param2 = 0 }, + { name = "australia:waratah", param1 = 255, param2 = 0 }, + { name = "australia:waratah", param1 = 255, param2 = 0 }, + { name = "ignore", param1 = 0, param2 = 0 }, + { name = "australia:waratah", param1 = 255, param2 = 0 }, + { name = "australia:waratah", param1 = 255, param2 = 0 }, + { name = "australia:waratah", param1 = 255, param2 = 0 }, + { name = "ignore", param1 = 0, param2 = 0 }, + { name = "australia:waratah", param1 = 255, param2 = 0 }, + { name = "australia:waratah", param1 = 255, param2 = 0 }, + { name = "australia:waratah", param1 = 255, param2 = 0 }, + }, + }, + flags = "force_placement", +}) + + + +-- +-- Trees +-- + + -- Black Wattle +aus.schematics.black_wattle_tree = {} +local max_r = 6 +local ht = 8 +local fruit = nil +local limbs = false +local tree = "australia:black_wattle_tree" +local leaves = "australia:black_wattle_leaves" +for r = 5,max_r do + local schem = aus.generate_tree_schematic(4, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.black_wattle_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 7, + y_max = 35, + fill_ratio = (max_r-r+1)/15000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Australian Cherry +aus.schematics.cherry_tree = {} +local max_r = 3 +local fruit = "australia:cherry" +local tree = "australia:cherry_tree" +local leaves = "australia:cherry_leaves" +for r = 2,max_r do + local schem = aus.generate_conifer_schematic(3, 2, tree, leaves, fruit) + push(aus.schematics.cherry_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 7, + y_max = 35, + fill_ratio = (max_r-r+1)/15000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Coast Banksia (big) +aus.schematics.coast_banksia_big_tree = {} +local max_r = 6 +local ht = 7 +local fruit = nil +local limbs = false +local tree = "australia:coast_banksia_tree" +local leaves = "australia:coast_banksia_leaves" +for r = 5,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.coast_banksia_big_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 12, + y_max = 35, + fill_ratio = (max_r-r+1)/15000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Coast Banksia (small) +aus.schematics.coast_banksia_small_tree = {} +local max_r = 4 +local ht = 4 +local fruit = nil +local limbs = false +local tree = "australia:coast_banksia_tree" +local leaves = "australia:coast_banksia_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(1, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.coast_banksia_small_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 6, + y_max = 10, + fill_ratio = (max_r-r+1)/12000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Coolabah Tree +aus.schematics.coolabah_tree = {} +local max_r = 5 +local ht = 7 +local fruit = nil +local limbs = nil +local tree = "australia:coolabah_tree" +local leaves = "australia:coolabah_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.coolabah_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:dirt_with_grass"}, + y_min = 7, + y_max = 35, + fill_ratio = (max_r-r+1)/20000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Illawarra Flame Tree +aus.schematics.illawarra_flame_tree = {} +local max_r = 6 +local ht = 5 +local fruit = nil +local limbs = false +local tree = "australia:illawarra_flame_tree" +local leaves = "australia:illawarra_flame_leaves" +for r = 5,max_r do + local schem = aus.generate_tree_schematic(4, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.illawarra_flame_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 7, + y_max = 35, + fill_ratio = (max_r-r+1)/15000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Lemon Myrtle +aus.schematics.lemon_myrtle_tree = {} +local max_r = 3 +local ht = 4 +local fruit = nil +local limbs = false +local tree = "australia:lemon_myrtle_tree" +local leaves = "australia:lemon_myrtle_leaves" +for r = 2,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.lemon_myrtle_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 7, + y_max = 35, + fill_ratio = (max_r-r+1)/15000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Lilly Pilly +aus.schematics.lilly_pilly_tree = {} +local max_r = 5 +local ht = 8 +local fruit = "australia:lilly_pilly_berries" +local limbs = false +local tree = "australia:lilly_pilly_tree" +local leaves = "australia:lilly_pilly_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(1, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.lilly_pilly_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 7, + y_max = 35, + fill_ratio = (max_r-r+1)/12000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Macadamia Tree +aus.schematics.macadamia_tree = {} +local max_r = 6 +local ht = 6 +local fruit = "australia:macadamia" +local limbs = nil +local tree = "australia:macadamia_tree" +local leaves = "australia:macadamia_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.macadamia_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 8, + y_max = 35, + fill_ratio = (max_r-r+1)/15000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Moreton Bay Fig +aus.schematics.moreton_bay_fig_tree = {} +local max_r = 13 +local ht = 12 +local fruit = "australia:moreton_bay_fig" +local limbs = nil +local tree = "australia:moreton_bay_fig_tree" +local leaves = "australia:moreton_bay_fig_leaves" +for r = 11,max_r do + local schem = aus.generate_giant_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.moreton_bay_fig_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 8, + y_max = 35, + fill_ratio = (max_r-r+1)/15000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Paperbark Tree +aus.schematics.paperbark_tree = {} +local max_r = 5 +local ht = 8 +local fruit = nil +local limbs = nil +local tree = "australia:paperbark_tree" +local leaves = "australia:paperbark_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(4, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.paperbark_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 7, + y_max = 35, + fill_ratio = (max_r-r+1)/15000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- River Oak +aus.schematics.river_oak_big_tree = {} +local max_r = 5 +local ht = 9 +local fruit = nil +local limbs = false +local tree = "australia:river_oak_tree" +local leaves = "australia:river_oak_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.river_oak_big_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 25, + y_max = 35, + fill_ratio = (max_r-r+1)/15000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- River Red Gum +aus.schematics.river_red_gum_tree = {} +local max_r = 13 +local ht = 13 +local fruit = nil +local limbs = nil +local tree = "australia:river_red_gum_tree" +local leaves = "australia:river_red_gum_leaves" +for r = 10,max_r do + local schem = aus.generate_giant_tree_schematic(7, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.river_red_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 25, + y_max = 35, + fill_ratio = (max_r-r+1)/20000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Scribbly Gum +aus.schematics.scribbly_gum_tree = {} +local max_r = 5 +local ht = 5 +local fruit = nil +local limbs = nil +local tree = "australia:scribbly_gum_tree" +local leaves = "australia:scribbly_gum_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(4, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.scribbly_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 7, + y_max = 35, + fill_ratio = (max_r-r+1)/12000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Tea Tree +aus.schematics.tea_tree_tree = {} +local max_r = 3 +local ht = 4 +local fruit = nil +local limbs = false +local tree = "australia:tea_tree_tree" +local leaves = "australia:tea_tree_leaves" +for r = 2,max_r do + local schem = aus.generate_tree_schematic(1, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.tea_tree_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 7, + y_max = 35, + fill_ratio = (max_r-r+1)/12000, + biomes = {"eastern_coasts"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_far_north_queensland.lua b/biome_far_north_queensland.lua new file mode 100644 index 0000000..bdbe967 --- /dev/null +++ b/biome_far_north_queensland.lua @@ -0,0 +1,255 @@ +-- mods/australia/biome_far_north_queensland.lua + +minetest.register_biome({ + name = "far_north_queensland", + --node_dust = "", + node_top = "default:dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = 4, + y_max = 35, + heat_point = 75, + humidity_point = 90, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"far_north_queensland"}, + y_min = 5, + y_max = 35, + decoration = "default:grass_"..length, + }) +end + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"far_north_queensland"}, + y_min = 22, + y_max = 35, + decoration = "default:dry_grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(-0.03, 0.09, 5) +register_grass_decoration(-0.015, 0.075, 4) +register_grass_decoration(0, 0.06, 3) +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + + -- Dry grasses +register_dry_grass_decoration(0.01, 0.05, 5) +register_dry_grass_decoration(0.03, 0.03, 4) + + + +-- +-- Trees +-- + + -- Daintree Stringybark +aus.schematics.daintree_stringybark_tree = {} +local max_r = 7 +local ht = 10 +local fruit = nil +local limbs = nil +local tree = "australia:daintree_stringybark_tree" +local leaves = "australia:daintree_stringybark_leaves" +for r = 6,max_r do + local schem = aus.generate_tree_schematic(9, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.daintree_stringybark_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 25, + y_max = 35, + fill_ratio = (max_r-r+1)/12000, + biomes = {"far_north_queensland"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Darwin Woollybutt +aus.schematics.darwin_woollybutt_tree = {} +local max_r = 4 +local ht = 5 +local fruit = nil +local limbs = nil +local tree = "australia:darwin_woollybutt_tree" +local leaves = "australia:darwin_woollybutt_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(6, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.darwin_woollybutt_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 25, + y_max = 35, + fill_ratio = (max_r-r+1)/12000, + biomes = {"far_north_queensland"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Australian Fan Palm +aus.schematics.fan_palm_tree = {} +local max_ht = 9 +local r = 3 +local tree = "australia:fan_palm_tree" +local leaves = "australia:fan_palm_leaves" +for h = 9,max_ht do + local schem = aus.generate_fanpalm_tree_schematic(max_ht, r, tree, leaves) + push(aus.schematics.fan_palm_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + fill_ratio = (max_ht-r+1)/300, + biomes = {"far_north_queensland"}, + y_min = 5, + y_max = 20, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Lemon Eucalyptus +aus.schematics.lemon_eucalyptus_tree = {} +local max_r = 5 +local ht = 7 +local fruit = nil +local limbs = nil +local tree = "australia:lemon_eucalyptus_tree" +local leaves = "australia:lemon_eucalyptus_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(8, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.lemon_eucalyptus_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 20, + y_max = 35, + fill_ratio = (max_r-r+1)/12000, + biomes = {"far_north_queensland"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Lilly Pilly +aus.schematics.lilly_pilly_tree = {} +local max_r = 5 +local ht = 8 +local fruit = "australia:lilly_pilly_berries" +local limbs = false +local tree = "australia:lilly_pilly_tree" +local leaves = "australia:lilly_pilly_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(1, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.lilly_pilly_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 20, + y_max = 35, + fill_ratio = (max_r-r+1)/12000, + biomes = {"far_north_queensland"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Merbau +aus.schematics.merbau_tree = {} +local max_ht = 12 +local ht = 8 +local r = 8 +local tree = "australia:merbau_tree" +local leaves = "australia:merbau_leaves" +for h = 8,max_ht do + local schem = aus.generate_rainforest_tree_schematic(max_ht, r, tree, leaves) + push(aus.schematics.merbau_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + fill_ratio = (max_ht-r+1)/6000, + biomes = {"far_north_queensland"}, + y_min = 6, + y_max = 25, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- River Oak +aus.schematics.river_oak_big_tree = {} +local max_r = 5 +local ht = 9 +local fruit = nil +local limbs = false +local tree = "australia:river_oak_tree" +local leaves = "australia:river_oak_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.river_oak_big_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 25, + y_max = 35, + fill_ratio = (max_r-r+1)/12000, + biomes = {"far_north_queensland"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_flinders_lofty.lua b/biome_flinders_lofty.lua new file mode 100644 index 0000000..bd4b2cd --- /dev/null +++ b/biome_flinders_lofty.lua @@ -0,0 +1,271 @@ +-- mods/australia/biome_flinders_lofty.lua + +minetest.register_biome({ + name = "flinders_lofty", + --node_dust = "", + node_top = "default:dirt_with_dry_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 2, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = 36, + y_max = 31000, + heat_point = 50, + humidity_point = 50, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"flinders_lofty"}, + y_min = 36, + y_max = 200, + decoration = "default:grass_"..length, + }) +end + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"flinders_lofty"}, + y_min = 36, + y_max = 200, + decoration = "default:dry_grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + + -- Dry grasses +register_dry_grass_decoration(0.01, 0.05, 5) +register_dry_grass_decoration(0.03, 0.03, 4) +register_dry_grass_decoration(0.05, 0.01, 3) +register_dry_grass_decoration(0.07, -0.01, 2) +register_dry_grass_decoration(0.09, -0.03, 1) + + + +-- +-- Logs +-- + + -- River Red Gum Log +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0018, + scale = 0.0011, + spread = {x = 250, y = 250, z = 250}, + seed = 33, + octaves = 3, + persist = 0.66 + }, + biomes = {"flinders_lofty"}, + y_min = 36, + y_max = 170, + schematic = { + size = {x = 3, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "australia:river_red_gum_tree", param2 = 12, prob = 191}, + {name = "australia:river_red_gum_tree", param2 = 12}, + {name = "australia:river_red_gum_tree", param2 = 12, prob = 127}, + {name = "air", prob = 0}, + {name = "flowers:mushroom_brown", prob = 63}, + {name = "air", prob = 0}, + }, + }, + flags = "place_center_x", + rotation = "random", +}) + + + +-- +-- Trees +-- + + -- Black Wattle +aus.schematics.black_wattle_tree = {} +local max_r = 6 +local ht = 8 +local fruit = nil +local limbs = false +local tree = "australia:black_wattle_tree" +local leaves = "australia:black_wattle_leaves" +for r = 5,max_r do + local schem = aus.generate_tree_schematic(4, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.black_wattle_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 170, + fill_ratio = (max_r-r+1)/15000, + biomes = {"flinders_lofty"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Australian Cherry +aus.schematics.cherry_tree = {} +local max_r = 3 +local fruit = "australia:cherry" +local tree = "australia:cherry_tree" +local leaves = "australia:cherry_leaves" +for r = 2,max_r do + local schem = aus.generate_conifer_schematic(3, 2, tree, leaves, fruit) + push(aus.schematics.cherry_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 120, + fill_ratio = (max_r-r+1)/15000, + biomes = {"great_dividing_range"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Coolabah Tree +aus.schematics.coolabah_tree = {} +local max_r = 5 +local ht = 7 +local fruit = nil +local limbs = nil +local tree = "australia:coolabah_tree" +local leaves = "australia:coolabah_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.coolabah_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:dirt_with_dry_grass"}, + y_min = 36, + y_max = 140, + fill_ratio = (max_r-r+1)/15000, + biomes = {"flinders_lofty"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Golden Wattle +aus.schematics.golden_wattle_tree = {} +local max_r = 3 +local ht = 3 +local fruit = nil +local limbs = false +local tree = "australia:golden_wattle_tree" +local leaves = "australia:golden_wattle_leaves" +for r = 2,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.golden_wattle_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 170, + fill_ratio = (max_r-r+1)/12000, + biomes = {"flinders_lofty"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- River Red Gum +aus.schematics.river_red_gum_tree = {} +local max_r = 13 +local ht = 13 +local fruit = nil +local limbs = nil +local tree = "australia:river_red_gum_tree" +local leaves = "australia:river_red_gum_leaves" +for r = 10,max_r do + local schem = aus.generate_giant_tree_schematic(7, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.river_red_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 140, + fill_ratio = (max_r-r+1)/20000, + biomes = {"flinders_lofty"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Sugar Gum +aus.schematics.sugar_gum_tree = {} +local max_r = 11 +local ht = 10 +local fruit = nil +local limbs = nil +local tree = "australia:sugar_gum_tree" +local leaves = "australia:sugar_gum_leaves" +for r = 9,max_r do + local schem = aus.generate_tree_schematic(8, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.sugar_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/10000, + biomes = {"flinders_lofty"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_goldfields_esperence.lua b/biome_goldfields_esperence.lua new file mode 100644 index 0000000..8d22f0c --- /dev/null +++ b/biome_goldfields_esperence.lua @@ -0,0 +1,97 @@ +-- mods/australia/biome_goldfields_esperence.lua + +minetest.register_biome({ + name = "goldfields_esperence", + --node_dust = "", + node_top = "default:desert_sand", + depth_top = 2, + node_filler = "default:sandstone", + depth_filler = 2, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "default:dirt_with_dry_grass", + y_min = 4, + y_max = 35, + heat_point = 60, + humidity_point = 20, +}) + + + +-- +-- Decorations +-- + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:desert_sand"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"goldfields_esperence"}, + y_min = 5, + y_max = 35, + decoration = "default:dry_grass_"..length, + }) +end + + -- Dry grasses +register_dry_grass_decoration(0.01, 0.05, 5) +register_dry_grass_decoration(0.03, 0.03, 4) +register_dry_grass_decoration(0.05, 0.01, 3) +register_dry_grass_decoration(0.07, -0.01, 2) +register_dry_grass_decoration(0.09, -0.03, 1) + + + -- Spinifex +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:desert_sand"}, + sidelen = 80, + fill_ratio = 0.05, + biomes = {"goldfields_esperence"}, + y_min = 6, + y_max = 35, + decoration = "australia:spinifex", +}) + + + +-- +-- Trees +-- + + -- Desert Quandong +aus.schematics.quandong_tree = {} +local max_r = 4 +local ht = 4 +local fruit = "australia:quandong" +local limbs = false +local tree = "australia:quandong_tree" +local leaves = "australia:quandong_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.quandong_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:desert_sand"}, + y_min = 6, + y_max = 35, + fill_ratio = (max_r-r+1)/15000, + biomes = {"goldfields_esperence"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_great_australian_bight.lua b/biome_great_australian_bight.lua new file mode 100644 index 0000000..50f6308 --- /dev/null +++ b/biome_great_australian_bight.lua @@ -0,0 +1,20 @@ +-- mods/australia/biome_great_australian_bight.lua + +minetest.register_biome({ + name = "great_australian_bight", + --node_dust = "", + node_top = "default:sandstone", + depth_top = 1, + node_filler = "default:sandstone", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = -64, + y_max = 3, + heat_point = 40, + humidity_point = 50, +}) + diff --git a/biome_great_barrier_reef.lua b/biome_great_barrier_reef.lua new file mode 100644 index 0000000..3f908b1 --- /dev/null +++ b/biome_great_barrier_reef.lua @@ -0,0 +1,113 @@ +-- mods/australia/biome_great_barrier_reef.lua + +minetest.register_biome({ + name = "great_barrier_reef", + --node_dust = "", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 2, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = -64, + y_max = 3, + heat_point = 75, + humidity_point = 75, +}) + + + +-- +-- Decorations +-- + + -- Staghorn Coral +local function register_staghorn_coral_decoration(color) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:sand"}, + sidelen = 80, + fill_ratio = 0.01, + biomes = {"great_barrier_reef"}, + y_min = -12, + y_max = -3, + decoration = "australia:staghorn_coral_"..color, + flags = "force_placement", + }) +end + +register_staghorn_coral_decoration("yellow") +register_staghorn_coral_decoration("purple") +register_staghorn_coral_decoration("pink") +register_staghorn_coral_decoration("blue") + + + + +-- +-- noairblocks +-- +-- Code modified from Duane Robertson's (github duane-r) valleys_c mod. +-- Original code modified from Perttu Ahola's +-- "noairblocks" mod and released as LGPL 2.1, as the original. + +local water_nodes = {"default:water_source", "default:water_flowing", "default:river_water_source", "default:river_water_flowing"} +local aus_nodes = {"australia:water_source", "australia:water_flowing", "australia:river_water_source", "australia:river_water_flowing"} + +for _, name in pairs(water_nodes) do + local water = table.copy(minetest.registered_nodes[name]) + local new_name = string.gsub(name, 'default', 'australia') + local new_source = string.gsub(water.liquid_alternative_source, 'default', 'australia') + local new_flowing = string.gsub(water.liquid_alternative_flowing, 'default', 'australia') + water.alpha = 0 + water.liquid_alternative_source = new_source + water.liquid_alternative_flowing = new_flowing + water.groups.not_in_creative_inventory = 1 + + minetest.register_node(new_name, water) +end + + +local check_pos = { + {x=-1, y=0, z=0}, + {x=1, y=0, z=0}, + {x=0, y=0, z=-1}, + {x=0, y=0, z=1}, + {x=0, y=1, z=0}, +} + +minetest.register_abm({ + nodenames = {"group:sea"}, + neighbors = {"group:water"}, + interval = 10, + chance = 1, + action = function(pos) + for _,offset in pairs(check_pos) do + local check = vector.add(pos, offset) + local check_above = vector.add(check, {x=0,y=1,z=0}) + if offset == {0,-1,0} or minetest.get_node(check_above).name ~= "air" then + local name = minetest.get_node(check).name + for node_num=1,#water_nodes do + if name == water_nodes[node_num] then + minetest.add_node(check, {name = aus_nodes[node_num]}) + end + end + end + end + end, +}) + +minetest.register_abm({ + nodenames = aus_nodes, + neighbors = {"air"}, + interval = 20, + chance = 1, + action = function(pos) + if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "air" then + minetest.remove_node(pos) + end + end, +}) diff --git a/biome_great_dividing_range.lua b/biome_great_dividing_range.lua new file mode 100644 index 0000000..0e87297 --- /dev/null +++ b/biome_great_dividing_range.lua @@ -0,0 +1,337 @@ +-- mods/australia/biome_great_dividing_range.lua + +minetest.register_biome({ + name = "great_dividing_range", + --node_dust = "", + node_top = "default:dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = 36, + y_max = 31000, + heat_point = 25, + humidity_point = 65, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"great_dividing_range"}, + y_min = 36, + y_max = 31000, + decoration = "default:grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(-0.03, 0.09, 5) +register_grass_decoration(-0.015, 0.075, 4) +register_grass_decoration(0, 0.06, 3) +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + + + +-- +-- Logs +-- + + -- River Red Gum +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0018, + scale = 0.0011, + spread = {x = 250, y = 250, z = 250}, + seed = 33, + octaves = 3, + persist = 0.66 + }, + biomes = {"great_dividing_range"}, + y_min = 36, + y_max = 170, + schematic = { + size = {x = 3, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "australia:river_red_gum_tree", param2 = 12, prob = 191}, + {name = "australia:river_red_gum_tree", param2 = 12}, + {name = "australia:river_red_gum_tree", param2 = 12, prob = 127}, + {name = "air", prob = 0}, + {name = "flowers:mushroom_brown", prob = 63}, + {name = "air", prob = 0}, + }, + }, + flags = "place_center_x", + rotation = "random", +}) + + + +-- +-- Moss +-- + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 80, + fill_ratio = 0.06, + biomes = {"great_dividing_range"}, + y_min = 36, + y_max = 31000, + decoration = "australia:moss", +}) + + + +-- +-- Trees +-- + + -- Black Wattle +aus.schematics.black_wattle_tree = {} +local max_r = 6 +local ht = 8 +local fruit = nil +local limbs = false +local tree = "australia:black_wattle_tree" +local leaves = "australia:black_wattle_leaves" +for r = 5,max_r do + local schem = aus.generate_tree_schematic(4, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.black_wattle_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/15000, + biomes = {"great_dividing_range"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Blue Gum +aus.schematics.blue_gum_tree = {} +local max_r = 7 +local ht = 12 +local fruit = nil +local limbs = nil +local tree = "australia:blue_gum_tree" +local leaves = "australia:blue_gum_leaves" +for r = 6,max_r do + local schem = aus.generate_tree_schematic(10, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.blue_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 180, + fill_ratio = (max_r-r+1)/8000, + biomes = {"great_dividing_range"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Australian Cherry +aus.schematics.cherry_tree = {} +local max_r = 3 +local fruit = "australia:cherry" +local tree = "australia:cherry_tree" +local leaves = "australia:cherry_leaves" +for r = 2,max_r do + local schem = aus.generate_conifer_schematic(3, 2, tree, leaves, fruit) + push(aus.schematics.cherry_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/15000, + biomes = {"great_dividing_range"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Golden Wattle +aus.schematics.golden_wattle_tree = {} +local max_r = 3 +local ht = 3 +local fruit = nil +local limbs = false +local tree = "australia:golden_wattle_tree" +local leaves = "australia:golden_wattle_leaves" +for r = 2,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.golden_wattle_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/10000, + biomes = {"great_dividing_range"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Lilly Pilly +aus.schematics.lilly_pilly_tree = {} +local max_r = 5 +local ht = 8 +local fruit = "australia:lilly_pilly_berries" +local limbs = false +local tree = "australia:lilly_pilly_tree" +local leaves = "australia:lilly_pilly_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(1, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.lilly_pilly_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/12000, + biomes = {"great_dividing_range"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Red Bottlebrush +aus.schematics.red_bottlebrush_tree = {} +local max_r = 3 +local ht = 4 +local fruit = nil +local limbs = false +local tree = "australia:red_bottlebrush_tree" +local leaves = "australia:red_bottlebrush_leaves" +for r = 2,max_r do + local schem = aus.generate_tree_schematic(1, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.red_bottlebrush_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/12000, + biomes = {"great_dividing_range"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- River Red Gum +aus.schematics.river_red_gum_tree = {} +local max_r = 13 +local ht = 13 +local fruit = nil +local limbs = nil +local tree = "australia:river_red_gum_tree" +local leaves = "australia:river_red_gum_leaves" +for r = 10,max_r do + local schem = aus.generate_giant_tree_schematic(7, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.river_red_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 140, + fill_ratio = (max_r-r+1)/15000, + biomes = {"great_dividing_range"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Southern Sassafras +aus.schematics.southern_sassafras_tree = {} +local max_r = 5 +local fruit = nil +local tree = "australia:southern_sassafras_tree" +local leaves = "australia:southern_sassafras_leaves" +for r = 4,max_r do + local schem = aus.generate_conifer_schematic(6, 4, tree, leaves, fruit) + push(aus.schematics.southern_sassafras_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 180, + fill_ratio = (max_r-r+1)/15000, + biomes = {"great_dividing_range"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Tea Tree +aus.schematics.tea_tree_tree = {} +local max_r = 3 +local ht = 4 +local fruit = nil +local limbs = false +local tree = "australia:tea_tree_tree" +local leaves = "australia:tea_tree_leaves" +for r = 2,max_r do + local schem = aus.generate_tree_schematic(1, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.tea_tree_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 170, + fill_ratio = (max_r-r+1)/12000, + biomes = {"great_dividing_range"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_gulf_of_carpentaria.lua b/biome_gulf_of_carpentaria.lua new file mode 100644 index 0000000..df4f8da --- /dev/null +++ b/biome_gulf_of_carpentaria.lua @@ -0,0 +1,172 @@ +-- mods/australia/biome_gulf_of_carpentaria.lua + +minetest.register_biome({ + name = "gulf_of_carpentaria", + --node_dust = "", + node_top = "default:dirt_with_dry_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 2, + node_stone = "default:sandstone", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = 4, + y_max = 35, + heat_point = 75, + humidity_point = 55, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"gulf_of_carpentaria"}, + y_min = 4, + y_max = 9, + decoration = "default:grass_"..length, + }) +end + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"gulf_of_carpentaria"}, + y_min = 7, + y_max = 35, + decoration = "default:dry_grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(0, 0.06, 3) +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + + -- Dry grasses +register_dry_grass_decoration(0.01, 0.05, 5) +register_dry_grass_decoration(0.03, 0.03, 4) +register_dry_grass_decoration(0.05, 0.01, 3) +register_dry_grass_decoration(0.07, -0.01, 2) +register_dry_grass_decoration(0.09, -0.03, 1) + + + -- Mitchell Grass +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 80, + fill_ratio = 0.05, + biomes = {"gulf_of_carpentaria"}, + y_min = 12, + y_max = 35, + decoration = "australia:mitchell_grass", +}) + + + +-- +-- Trees +-- + + -- Cloncurry Box +aus.schematics.cloncurry_box_tree = {} +local max_r = 6 +local ht = 4 +local fruit = nil +local limbs = nil +local tree = "australia:cloncurry_box_tree" +local leaves = "australia:cloncurry_box_leaves" +for r = 5,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.cloncurry_box_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 6, + y_max = 35, + fill_ratio = (max_r-r+1)/10000, + biomes = {"gulf_of_carpentaria"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Darwin Woollybutt +aus.schematics.darwin_woollybutt_tree = {} +local max_r = 4 +local ht = 5 +local fruit = nil +local limbs = nil +local tree = "australia:darwin_woollybutt_tree" +local leaves = "australia:darwin_woollybutt_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(6, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.darwin_woollybutt_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 8, + y_max = 35, + fill_ratio = (max_r-r+1)/12000, + biomes = {"gulf_of_carpentaria"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- River Oak +aus.schematics.river_oak_small_tree = {} +local max_r = 4 +local ht = 6 +local fruit = nil +local limbs = false +local tree = "australia:river_oak_tree" +local leaves = "australia:river_oak_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.river_oak_small_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 12, + y_max = 35, + fill_ratio = (max_r-r+1)/12000, + biomes = {"gulf_of_carpentaria"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_indian_ocean.lua b/biome_indian_ocean.lua new file mode 100644 index 0000000..c0d583c --- /dev/null +++ b/biome_indian_ocean.lua @@ -0,0 +1,74 @@ +-- mods/australia/biome_indian_ocean.lua + +minetest.register_biome({ + name = "indian_ocean", + --node_dust = "", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sandstone", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = -64, + y_max = 3, + heat_point = 60, + humidity_point = 50, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:sand"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"indian_ocean"}, + y_min = 3, + y_max = 3, + decoration = "default:grass_"..length, + }) +end + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:sand"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"indian_ocean"}, + y_min = 3, + y_max = 3, + decoration = "default:dry_grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + + -- Dry grasses +register_dry_grass_decoration(0.01, 0.05, 5) +register_dry_grass_decoration(0.03, 0.03, 4) +register_dry_grass_decoration(0.05, 0.01, 3) diff --git a/biome_jarrah_karri_forests.lua b/biome_jarrah_karri_forests.lua new file mode 100644 index 0000000..ab7ea79 --- /dev/null +++ b/biome_jarrah_karri_forests.lua @@ -0,0 +1,266 @@ +-- mods/australia/biome_jarrah_karri_forests.lua + +minetest.register_biome({ + name = "jarrah_karri_forests", + --node_dust = "", + node_top = "default:dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_stone = "default:sandstone", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = 4, + y_max = 35, + heat_point = 20, + humidity_point = 50, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"jarrah_karri_forests"}, + y_min = 5, + y_max = 31000, + decoration = "default:grass_"..length, + }) +end + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"jarrah_karri_forests"}, + y_min = 5, + y_max = 31000, + decoration = "default:dry_grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + + -- Dry grasses +register_dry_grass_decoration(0.01, 0.05, 5) +register_dry_grass_decoration(0.03, 0.03, 4) +register_dry_grass_decoration(0.05, 0.01, 3) +register_dry_grass_decoration(0.07, -0.01, 2) +register_dry_grass_decoration(0.09, -0.03, 1) + + + -- Couch Honeypot +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 80, + fill_ratio = 0.02, + biomes = {"jarrah_karri_forests"}, + decoration = "australia:couch_honeypot", +}) + + +-- +-- Trees +-- + + -- Bull Banksia +aus.schematics.bull_banksia_tree = {} +local max_r = 4 +local ht = 5 +local fruit = nil +local limbs = false +local tree = "australia:bull_banksia_tree" +local leaves = "australia:bull_banksia_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.bull_banksia_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 8, + y_max = 35, + fill_ratio = (max_r-r+1)/12000, + biomes = {"jarrah_karri_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Coolabah Tree +aus.schematics.coolabah_tree = {} +local max_r = 5 +local ht = 7 +local fruit = nil +local limbs = nil +local tree = "australia:coolabah_tree" +local leaves = "australia:coolabah_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.coolabah_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:dirt_with_grass"}, + y_min = 8, + y_max = 35, + fill_ratio = (max_r-r+1)/20000, + biomes = {"jarrah_karri_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Jarrah +aus.schematics.jarrah_tree = {} +local max_r = 10 +local ht = 12 +local fruit = nil +local limbs = nil +local tree = "australia:jarrah_tree" +local leaves = "australia:jarrah_leaves" +for r = 8,max_r do + local schem = aus.generate_giant_tree_schematic(8, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.jarrah_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 12, + y_max = 35, + fill_ratio = (max_r-r+1)/8000, + biomes = {"jarrah_karri_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Karri +aus.schematics.karri_tree = {} +local max_r = 12 +local ht = 10 +local fruit = nil +local limbs = nil +local tree = "australia:karri_tree" +local leaves = "australia:karri_leaves" +for r = 10,max_r do + local schem = aus.generate_giant_tree_schematic(20, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.karri_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 12, + y_max = 35, + fill_ratio = (max_r-r+1)/10000, + biomes = {"jarrah_karri_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Marri +aus.schematics.marri_tree = {} +local max_r = 10 +local ht = 12 +local fruit = nil +local limbs = nil +local tree = "australia:marri_tree" +local leaves = "australia:marri_leaves" +for r = 8,max_r do + local schem = aus.generate_big_tree_schematic(8, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.marri_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 12, + y_max = 35, + fill_ratio = (max_r-r+1)/10000, + biomes = {"jarrah_karri_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Rottnest Island Pine +aus.schematics.rottnest_island_pine_tree = {} +local max_r = 3 +local fruit = nil +local tree = "australia:rottnest_island_pine_tree" +local leaves = "australia:rottnest_island_pine_leaves" +for r = 2,max_r do + local schem = aus.generate_conifer_schematic(3, 2, tree, leaves, fruit) + push(aus.schematics.rottnest_island_pine_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 6, + y_max = 20, + fill_ratio = (max_r-r+1)/10000, + biomes = {"jarrah_karri_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Swamp Paperbark +aus.schematics.swamp_paperbark_tree = {} +local max_r = 5 +local ht = 9 +local fruit = nil +local limbs = nil +local tree = "australia:swamp_paperbark_tree" +local leaves = "australia:swamp_paperbark_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.swamp_paperbark_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 7, + y_max = 25, + fill_ratio = (max_r-r+1)/15000, + biomes = {"jarrah_karri_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_kimberley.lua b/biome_kimberley.lua new file mode 100644 index 0000000..5786a3c --- /dev/null +++ b/biome_kimberley.lua @@ -0,0 +1,158 @@ +-- mods/australia/biome_kimberley.lua + +minetest.register_biome({ + name = "kimberley", + --node_dust = "", + node_top = "australia:red_dirt", + depth_top = 2, + node_filler = "default:sandstone", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = 4, + y_max = 35, + heat_point = 80, + humidity_point = 75, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"australia:red_dirt"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"kimberley"}, + y_min = 4, + y_max = 30, + decoration = "default:grass_"..length, + }) +end + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"australia:red_dirt"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"kimberley"}, + y_min = 7, + y_max = 35, + decoration = "default:dry_grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + + -- Dry grasses +register_dry_grass_decoration(0.01, 0.05, 5) +register_dry_grass_decoration(0.03, 0.03, 4) +register_dry_grass_decoration(0.05, 0.01, 3) +register_dry_grass_decoration(0.07, -0.01, 2) +register_dry_grass_decoration(0.09, -0.03, 1) + + + +-- +-- Trees +-- + + -- Boab Tree +aus.schematics.boab_tree = {} +local max_r = 4 +local ht = 4 +local fruit = nil +local limbs = false +local tree = "australia:boab_tree" +local leaves = "australia:boab_leaves" +for r = 3,max_r do + local schem = aus.generate_giant_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.boab_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:red_dirt"}, + y_min = 9, + y_max = 35, + fill_ratio = (max_r-r+1)/10000, + biomes = {"kimberley"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Darwin Woollybutt +aus.schematics.darwin_woollybutt_tree = {} +local max_r = 4 +local ht = 5 +local fruit = nil +local limbs = nil +local tree = "australia:darwin_woollybutt_tree" +local leaves = "australia:darwin_woollybutt_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(6, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.darwin_woollybutt_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:red_dirt"}, + y_min = 12, + y_max = 35, + fill_ratio = (max_r-r+1)/15000, + biomes = {"kimberley"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Swamp Bloodwood +aus.schematics.swamp_bloodwood_tree = {} +local max_r = 4 +local ht = 6 +local fruit = nil +local limbs = nil +local tree = "australia:swamp_bloodwood_tree" +local leaves = "australia:swamp_bloodwood_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.swamp_bloodwood_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:red_dirt"}, + y_min = 7, + y_max = 35, + fill_ratio = (max_r-r+1)/10000, + biomes = {"kimberley"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_mangroves.lua b/biome_mangroves.lua new file mode 100644 index 0000000..3ef6c9b --- /dev/null +++ b/biome_mangroves.lua @@ -0,0 +1,148 @@ +-- mods/australia/biome_mangroves.lua + +minetest.register_biome({ + name = "mangroves", + --node_dust = "", + node_top = "australia:mangrove_mud", + depth_top = 2, + node_filler = "default:dirt", + depth_filler = 2, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = -2, + y_max = 3, + heat_point = 80, + humidity_point = 80, +}) + + + + -- Mangrove Fern +minetest.register_decoration({ + deco_type = "simple", + place_on = {"australia:mangrove_mud", + "default:dirt", + "default:dirt_with_grass"}, + sidelen = 80, + fill_ratio = 0.2, + biomes = {"mangroves"}, + y_min = 2, + y_max = 3, + decoration = "australia:mangrove_fern", +}) + + -- Mangrove Lily +minetest.register_decoration({ + deco_type = "simple", + place_on = {"australia:mangrove_mud", + "default:dirt", + "default:dirt_with_grass"}, + sidelen = 80, + fill_ratio = 0.1, + biomes = {"mangroves"}, + y_min = 2, + y_max = 3, + decoration = "australia:mangrove_lily", +}) + + -- Mangrove Palm +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"australia:mangrove_mud", + "default:dirt"}, + sidelen = 80, + fill_ratio = 0.3, + biomes = {"mangroves"}, + y_min = 1, + y_max = 3, + schematic = { + size = { x = 1, y = 4, z = 1}, + data = { + { name = "ignore", param1 = 0, param2 = 0 }, + { name = "australia:mangrove_palm_trunk", param1 = 255, param2 = 0 }, + { name = "australia:mangrove_palm_leaf_bot", param1 = 255, param2 = 0 }, + { name = "australia:mangrove_palm_leaf_top", param1 = 255, param2 = 0 }, + }, + }, + flags = "force_placement", +}) + + + + +-- +-- Trees +-- + + -- Grey Mangrove +aus.schematics.grey_mangrove_tree = {} +local max_ht = 6 +local tree = "australia:grey_mangrove_tree" +local leaves = "australia:grey_mangrove_leaves" +for h = 4,max_ht do + local schem = aus.generate_mangrove_tree_schematic(3, tree, leaves) + push(aus.schematics.grey_mangrove_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:mangrove_mud", "default:dirt", "default:sand"}, + fill_ratio = 0.003, + biomes = {"mangroves"}, + y_min = -2, + y_max = 3, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Mangrove Apple +aus.schematics.mangrove_apple_tree = {} +local max_r = 5 +local ht = 4 +local fruit = "australia:mangrove_apple" +local limbs = false +local tree = "australia:mangrove_apple_tree" +local leaves = "australia:mangrove_apple_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(1, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.mangrove_apple_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:mangrove_mud", "default:dirt", "default:sand"}, + y_min = 0, + y_max = 3, + fill_ratio = (max_r-r+1)/5000, + biomes = {"mangroves"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Stilted Mangrove +aus.schematics.stilted_mangrove_tree = {} +local max_ht = 6 +local tree = "australia:stilted_mangrove_tree" +local leaves = "australia:stilted_mangrove_leaves" +for h = 4,max_ht do + local schem = aus.generate_mangrove_tree_schematic(3, tree, leaves) + push(aus.schematics.stilted_mangrove_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:mangrove_mud", "default:dirt", "default:sand"}, + fill_ratio = 0.003, + biomes = {"mangroves"}, + y_min = -2, + y_max = 3, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_mulga_lands.lua b/biome_mulga_lands.lua new file mode 100644 index 0000000..c3292b1 --- /dev/null +++ b/biome_mulga_lands.lua @@ -0,0 +1,209 @@ +-- mods/australia/biome_mulga_lands.lua + +minetest.register_biome({ + name = "mulga_lands", + --node_dust = "", + node_top = "default:dirt_with_dry_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 2, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = 36, + y_max = 31000, + heat_point = 75, + humidity_point = 45, +}) + + + +-- +-- Decorations +-- + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"mulga_lands"}, + y_min = 36, + y_max = 190, + decoration = "default:dry_grass_"..length, + }) +end + + -- Dry grasses +register_dry_grass_decoration(0.01, 0.05, 5) +register_dry_grass_decoration(0.03, 0.03, 4) +register_dry_grass_decoration(0.05, 0.01, 3) +register_dry_grass_decoration(0.07, -0.01, 2) +register_dry_grass_decoration(0.09, -0.03, 1) + + + +-- +-- Trees +-- + + -- Coolabah Tree +aus.schematics.coolabah_tree = {} +local max_r = 5 +local ht = 7 +local fruit = nil +local limbs = nil +local tree = "australia:coolabah_tree" +local leaves = "australia:coolabah_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.coolabah_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:dirt_with_dry_grass"}, + y_min = 36, + y_max = 140, + fill_ratio = (max_r-r+1)/20000, + biomes = {"mulga_lands"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Desert Quandong +aus.schematics.quandong_tree = {} +local max_r = 4 +local ht = 4 +local fruit = "australia:quandong" +local limbs = false +local tree = "australia:quandong_tree" +local leaves = "australia:quandong_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.quandong_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/15000, + biomes = {"mulga_lands"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Mulga Tree +aus.schematics.mulga_tree = {} +local max_r = 4 +local ht = 4 +local fruit = nil +local limbs = false +local tree = "australia:mulga_tree" +local leaves = "australia:mulga_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.mulga_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/4000, + biomes = {"mulga_lands"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- River Oak +aus.schematics.river_oak_big_tree = {} +local max_r = 5 +local ht = 9 +local fruit = nil +local limbs = false +local tree = "australia:river_oak_tree" +local leaves = "australia:river_oak_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.river_oak_big_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/12000, + biomes = {"mulga_lands"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- River Red Gum +aus.schematics.river_red_gum_tree = {} +local max_r = 13 +local ht = 13 +local fruit = nil +local limbs = nil +local tree = "australia:river_red_gum_tree" +local leaves = "australia:river_red_gum_leaves" +for r = 10,max_r do + local schem = aus.generate_giant_tree_schematic(7, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.river_red_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 140, + fill_ratio = (max_r-r+1)/20000, + biomes = {"mulga_lands"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Shoestring Acacia +aus.schematics.shoestring_acacia_tree = {} +local max_r = 3 +local ht = 5 +local fruit = nil +local limbs = false +local tree = "australia:shoestring_acacia_tree" +local leaves = "australia:shoestring_acacia_leaves" +for r = 2,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.shoestring_acacia_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/12000, + biomes = {"mulga_lands"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_murray_darling_basin.lua b/biome_murray_darling_basin.lua new file mode 100644 index 0000000..4504468 --- /dev/null +++ b/biome_murray_darling_basin.lua @@ -0,0 +1,310 @@ +-- mods/australia/biome_murray_darling_basin.lua + +minetest.register_biome({ + name = "murray_darling_basin", + --node_dust = "", + node_top = "default:dirt_with_dry_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = 36, + y_max = 31000, + heat_point = 60, + humidity_point = 40, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"murray_darling_basin"}, + y_min = 36, + y_max = 200, + decoration = "default:grass_"..length, + }) +end + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"murray_darling_basin"}, + y_min = 36, + y_max = 200, + decoration = "default:dry_grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + + -- Dry grasses +register_dry_grass_decoration(0.01, 0.05, 5) +register_dry_grass_decoration(0.03, 0.03, 4) +register_dry_grass_decoration(0.05, 0.01, 3) +register_dry_grass_decoration(0.07, -0.01, 2) +register_dry_grass_decoration(0.09, -0.03, 1) + + + -- Darling Lily +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 80, + fill_ratio = 0.02, + biomes = {"murray_darling_basin"}, + y_min = 36, + y_max = 200, + decoration = "australia:darling_lily", +}) + + -- Saltbush +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 80, + fill_ratio = 0.01, + biomes = {"murray_darling_basin"}, + y_min = 36, + y_max = 200, + decoration = "australia:saltbush", +}) + + -- Silver Daisy +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 80, + fill_ratio = 0.02, + biomes = {"murray_darling_basin"}, + y_min = 36, + y_max = 200, + decoration = "australia:silver_daisy", +}) + + + +-- +-- Logs +-- + + -- River Red Gum Log +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0018, + scale = 0.0011, + spread = {x = 250, y = 250, z = 250}, + seed = 33, + octaves = 3, + persist = 0.66 + }, + biomes = {"murray_darling_basin"}, + y_min = 36, + y_max = 170, + schematic = { + size = {x = 3, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "australia:river_red_gum_tree", param2 = 12, prob = 191}, + {name = "australia:river_red_gum_tree", param2 = 12}, + {name = "australia:river_red_gum_tree", param2 = 12, prob = 127}, + {name = "air", prob = 0}, + {name = "flowers:mushroom_brown", prob = 63}, + {name = "air", prob = 0}, + }, + }, + flags = "place_center_x", + rotation = "random", +}) + + + +-- +-- Trees +-- + + -- Black Box +aus.schematics.black_box_tree = {} +local max_r = 8 +local ht = 8 +local fruit = nil +local limbs = nil +local tree = "australia:black_box_tree" +local leaves = "australia:black_box_leaves" +for r = 6,max_r do + local schem = aus.generate_big_tree_schematic(4, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.black_box_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/15000, + biomes = {"murray_darling_basin"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Black Wattle +aus.schematics.black_wattle_tree = {} +local max_r = 6 +local ht = 8 +local fruit = nil +local limbs = false +local tree = "australia:black_wattle_tree" +local leaves = "australia:black_wattle_leaves" +for r = 5,max_r do + local schem = aus.generate_tree_schematic(4, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.black_wattle_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/15000, + biomes = {"murray_darling_basin"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Coolabah Tree +aus.schematics.coolabah_tree = {} +local max_r = 5 +local ht = 7 +local fruit = nil +local limbs = nil +local tree = "australia:coolabah_tree" +local leaves = "australia:coolabah_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.coolabah_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:dirt_with_dry_grass"}, + y_min = 36, + y_max = 140, + fill_ratio = (max_r-r+1)/20000, + biomes = {"murray_darling_basin"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Golden Wattle +aus.schematics.golden_wattle_tree = {} +local max_r = 3 +local ht = 3 +local fruit = nil +local limbs = false +local tree = "australia:golden_wattle_tree" +local leaves = "australia:golden_wattle_leaves" +for r = 2,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.golden_wattle_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/15000, + biomes = {"murray_darling_basin"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Desert Quandong +aus.schematics.quandong_tree = {} +local max_r = 4 +local ht = 4 +local fruit = "australia:quandong" +local limbs = false +local tree = "australia:quandong_tree" +local leaves = "australia:quandong_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.quandong_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/15000, + biomes = {"murray_darling_basin"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- River Red Gum +aus.schematics.river_red_gum_tree = {} +local max_r = 13 +local ht = 13 +local fruit = nil +local limbs = nil +local tree = "australia:river_red_gum_tree" +local leaves = "australia:river_red_gum_leaves" +for r = 10,max_r do + local schem = aus.generate_giant_tree_schematic(7, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.river_red_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_dry_grass"}, + y_min = 36, + y_max = 140, + fill_ratio = (max_r-r+1)/10000, + biomes = {"murray_darling_basin"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_pilbara.lua b/biome_pilbara.lua new file mode 100644 index 0000000..fa1404f --- /dev/null +++ b/biome_pilbara.lua @@ -0,0 +1,106 @@ +-- mods/australia/biome_pilbara.lua + +minetest.register_biome({ + name = "pilbara", + --node_dust = "", + node_top = "australia:red_gravel", + depth_top = 2, + node_filler = "australia:red_stone", + depth_filler = 2, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = 4, + y_max = 35, + heat_point = 80, + humidity_point = 20, +}) + + + +-- +-- Decorations +-- + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"australia:red_gravel"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"pilbara"}, + y_min = 5, + y_max = 31000, + decoration = "default:dry_grass_"..length, + }) +end + + -- Dry grasses +register_dry_grass_decoration(0.07, -0.01, 2) +register_dry_grass_decoration(0.09, -0.03, 1) + + + -- Mitchell Grass +minetest.register_decoration({ + deco_type = "simple", + place_on = {"australia:red_gravel"}, + sidelen = 80, + fill_ratio = 0.05, + biomes = {"pilbara"}, + y_min = 6, + y_max = 31000, + decoration = "australia:mitchell_grass", +}) + + -- Spinifex +minetest.register_decoration({ + deco_type = "simple", + place_on = {"australia:red_gravel"}, + sidelen = 80, + fill_ratio = 0.02, + biomes = {"pilbara"}, + y_min = 8, + y_max = 31000, + decoration = "australia:spinifex", +}) + + + +-- +-- Trees +-- + + -- Desert Oak +aus.schematics.desert_oak_tree = {} +local max_r = 8 +local ht = 5 +local fruit = nil +local limbs = nil +local tree = "australia:desert_oak_tree" +local leaves = "australia:desert_oak_leaves" +for r = 6,max_r do + local schem = aus.generate_tree_schematic(6, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.desert_oak_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:red_gravel"}, + y_min = 10, + y_max = 35, + fill_ratio = (max_r-r+1)/20000, + biomes = {"pilbara"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_simpson_desert.lua b/biome_simpson_desert.lua new file mode 100644 index 0000000..57e1d80 --- /dev/null +++ b/biome_simpson_desert.lua @@ -0,0 +1,76 @@ +-- mods/australia/biome_simpson_desert.lua + +minetest.register_biome({ + name = "simpson_desert", + --node_dust = "", + node_top = "australia:red_sand", + depth_top = 3, + node_filler = "australia:red_stone", + depth_filler = 2, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = 36, + y_max = 31000, + heat_point = 85, + humidity_point = 10, +}) + + + +-- +-- Trees +-- + + -- Coolabah Tree +aus.schematics.coolabah_tree = {} +local max_r = 5 +local ht = 7 +local fruit = nil +local limbs = nil +local tree = "australia:coolabah_tree" +local leaves = "australia:coolabah_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.coolabah_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:red_sand"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/20000, + biomes = {"simpson_desert"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Desert Quandong +aus.schematics.quandong_tree = {} +local max_r = 4 +local ht = 4 +local fruit = "australia:quandong" +local limbs = false +local tree = "australia:quandong_tree" +local leaves = "australia:quandong_leaves" +for r = 3,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.quandong_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:red_sand"}, + y_min = 36, + y_max = 130, + fill_ratio = (max_r-r+1)/15000, + biomes = {"simpson_desert"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_tasman_sea.lua b/biome_tasman_sea.lua new file mode 100644 index 0000000..ee10e26 --- /dev/null +++ b/biome_tasman_sea.lua @@ -0,0 +1,74 @@ +-- mods/australia/biome_tasman_sea.lua + +minetest.register_biome({ + name = "tasman_sea", + --node_dust = "", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 2, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = -64, + y_max = 3, + heat_point = 20, + humidity_point = 50, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:sand"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"tasman_sea"}, + y_min = 3, + y_max = 3, + decoration = "default:grass_"..length, + }) +end + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:sand"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"tasman_sea"}, + y_min = 3, + y_max = 3, + decoration = "default:dry_grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + + -- Dry grasses +register_dry_grass_decoration(0.01, 0.05, 5) +register_dry_grass_decoration(0.03, 0.03, 4) +register_dry_grass_decoration(0.05, 0.01, 3) diff --git a/biome_tasmania.lua b/biome_tasmania.lua new file mode 100644 index 0000000..ca8338d --- /dev/null +++ b/biome_tasmania.lua @@ -0,0 +1,277 @@ +-- mods/australia/biome_tasmania.lua + +minetest.register_biome({ + name = "tasmania", + --node_dust = "", + node_top = "default:dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = 36, + y_max = 31000, + heat_point = 15, + humidity_point = 85, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"tasmania"}, + y_min = 3, + y_max = 31000, + decoration = "default:grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(-0.03, 0.09, 5) +register_grass_decoration(-0.015, 0.075, 4) +register_grass_decoration(0, 0.06, 3) +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + + + +-- +-- Moss +-- + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 80, + fill_ratio = 0.9, + biomes = {"tasmania"}, + y_min = 8, + y_max = 31000, + decoration = "australia:moss", +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 80, + fill_ratio = 0.02, + biomes = {"tasmania"}, + y_min = 8, + y_max = 31000, + decoration = "australia:moss_with_fungus", +}) + + + +-- +-- Mushrooms +-- + + -- Brown Mushroom +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.006, + spread = {x = 200, y = 200, z = 200}, + seed = 55, + octaves = 3, + persist = 0.66 + }, + biomes = {"tasmania"}, + y_min = 7, + y_max = 31000, + decoration = "flowers:Mushroom_brown", +}) + + -- Red Mushroom +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.006, + spread = {x = 200, y = 200, z = 200}, + seed = 56, + octaves = 3, + persist = 0.66 + }, + biomes = {"tasmania"}, + y_min = 7, + y_max = 31000, + decoration = "flowers:mushroom_red", +}) + + + +-- +-- Trees +-- + + -- Blue Gum +aus.schematics.blue_gum_tree = {} +local max_r = 7 +local ht = 12 +local fruit = nil +local limbs = nil +local tree = "australia:blue_gum_tree" +local leaves = "australia:blue_gum_leaves" +for r = 6,max_r do + local schem = aus.generate_tree_schematic(10, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.blue_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 170, + fill_ratio = (max_r-r+1)/15000, + biomes = {"tasmania"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Celery-top Pine +aus.schematics.celery_top_pine_tree = {} +local max_r = 5 +local fruit = nil +local tree = "australia:celery_top_pine_tree" +local leaves = "australia:celery_top_pine_leaves" +for r = 4,max_r do + local schem = aus.generate_conifer_schematic(5, 4, tree, leaves, fruit) + push(aus.schematics.celery_top_pine_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 180, + fill_ratio = (max_r-r+1)/8000, + biomes = {"tasmania"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Huon Pine +aus.schematics.huon_pine_tree = {} +local max_r = 4 +local ht = 8 +local fruit = nil +local limbs = nil +local tree = "australia:huon_pine_tree" +local leaves = "australia:huon_pine_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(4, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.huon_pine_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/15000, + biomes = {"tasmania"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Southern Sassafras +aus.schematics.southern_sassafras_tree = {} +local max_r = 5 +local fruit = nil +local tree = "australia:southern_sassafras_tree" +local leaves = "australia:southern_sassafras_leaves" +for r = 4,max_r do + local schem = aus.generate_conifer_schematic(6, 4, tree, leaves, fruit) + push(aus.schematics.southern_sassafras_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 170, + fill_ratio = (max_r-r+1)/8000, + biomes = {"tasmania"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Swamp Gum +aus.schematics.swamp_gum_tree = {} +local max_r = 6 +local ht = 18 +local fruit = nil +local limbs = nil +local tree = "australia:swamp_gum_tree" +local leaves = "australia:swamp_gum_leaves" +for r = 6,max_r do + local schem = aus.generate_giant_tree_schematic(26, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.swamp_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 120, + fill_ratio = (max_r-r+1)/10000, + biomes = {"tasmania"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Tasmanian Myrtle +aus.schematics.tasmanian_myrtle_tree = {} +local max_r = 8 +local ht = 14 +local fruit = nil +local limbs = nil +local tree = "australia:tasmanian_myrtle_tree" +local leaves = "australia:tasmanian_myrtle_leaves" +for r = 6,max_r do + local schem = aus.generate_big_tree_schematic(6, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.tasmanian_myrtle_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/10000, + biomes = {"tasmania"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/biome_timor_sea.lua b/biome_timor_sea.lua new file mode 100644 index 0000000..d443c7c --- /dev/null +++ b/biome_timor_sea.lua @@ -0,0 +1,53 @@ +-- mods/australia/biome_timor_sea.lua + +minetest.register_biome({ + name = "timor_sea", + --node_dust = "", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 2, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = -64, + y_max = 3, + heat_point = 80, + humidity_point = 90, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:sand"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"timor_sea"}, + y_min = 3, + y_max = 3, + decoration = "default:grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(-0.03, 0.09, 5) +register_grass_decoration(-0.015, 0.075, 4) +register_grass_decoration(0, 0.06, 3) +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + diff --git a/biome_underground.lua b/biome_underground.lua new file mode 100644 index 0000000..07d785f --- /dev/null +++ b/biome_underground.lua @@ -0,0 +1,20 @@ +-- mods/australia/biome_underground.lua + +minetest.register_biome({ + name = "underground", + --node_dust = "", + --node_top = "", + --depth_top = , + --node_filler = "", + --depth_filler = , + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = -31000, + y_max = -65, + heat_point = 50, + humidity_point = 50, +}) + diff --git a/biome_victorian_forests.lua b/biome_victorian_forests.lua new file mode 100644 index 0000000..889781d --- /dev/null +++ b/biome_victorian_forests.lua @@ -0,0 +1,467 @@ +-- mods/australia/biome_victorian_forests.lua + +minetest.register_biome({ + name = "victorian_forests", + --node_dust = "", + node_top = "default:dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + node_river_water = "australia:muddy_river_water_source", + y_min = 36, + y_max = 31000, + heat_point = 40, + humidity_point = 50, +}) + + + +-- +-- Decorations +-- + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"victorian_forests"}, + y_min = 36, + y_max = 190, + decoration = "default:grass_"..length, + }) +end + + -- Grasses +register_grass_decoration(-0.03, 0.09, 5) +register_grass_decoration(-0.015, 0.075, 4) +register_grass_decoration(0, 0.06, 3) +register_grass_decoration(0.015, 0.045, 2) +register_grass_decoration(0.03, 0.03, 1) + + + +-- +-- Logs +-- + + -- River Red Gum Log +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0018, + scale = 0.0011, + spread = {x = 250, y = 250, z = 250}, + seed = 33, + octaves = 3, + persist = 0.66 + }, + biomes = {"victorian_forests"}, + y_min = 36, + y_max = 175, + schematic = { + size = {x = 3, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "australia:river_red_gum_tree", param2 = 12, prob = 191}, + {name = "australia:river_red_gum_tree", param2 = 12}, + {name = "australia:river_red_gum_tree", param2 = 12, prob = 127}, + {name = "air", prob = 0}, + {name = "flowers:mushroom_brown", prob = 63}, + {name = "air", prob = 0}, + }, + }, + flags = "place_center_x", + rotation = "random", +}) + + -- White Box Log +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0018, + scale = 0.0011, + spread = {x = 250, y = 250, z = 250}, + seed = 35, + octaves = 3, + persist = 0.66 + }, + biomes = {"victorian_forests"}, + y_min = 36, + y_max = 175, + schematic = { + size = {x = 3, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "australia:white_box_tree", param2 = 12, prob = 191}, + {name = "australia:white_box_tree", param2 = 12}, + {name = "australia:white_box_tree", param2 = 12, prob = 127}, + {name = "air", prob = 0}, + {name = "flowers:mushroom_brown", prob = 63}, + {name = "air", prob = 0}, + }, + }, + flags = "place_center_x", + rotation = "random", +}) + + + +-- +-- Moss +-- + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 80, + fill_ratio = 0.07, + biomes = {"victorian_forests"}, + y_min = 36, + y_max = 200, + decoration = "australia:moss", +}) + + + +-- +-- Mushrooms +-- + + -- Brown Mushroom +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.006, + spread = {x = 200, y = 200, z = 200}, + seed = 55, + octaves = 3, + persist = 0.66 + }, + biomes = {"victorian_forests"}, + y_min = 36, + y_max = 180, + decoration = "flowers:Mushroom_brown", +}) + + -- Red Mushroom +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.006, + spread = {x = 200, y = 200, z = 200}, + seed = 56, + octaves = 3, + persist = 0.66 + }, + biomes = {"victorian_forests"}, + y_min = 36, + y_max = 180, + decoration = "flowers:mushroom_red", +}) + + + +-- +-- Trees +-- + + -- Black Wattle +aus.schematics.black_wattle_tree = {} +local max_r = 6 +local ht = 8 +local fruit = nil +local limbs = false +local tree = "australia:black_wattle_tree" +local leaves = "australia:black_wattle_leaves" +for r = 5,max_r do + local schem = aus.generate_tree_schematic(4, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.black_wattle_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/12000, + biomes = {"victorian_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Blue Gum +aus.schematics.blue_gum_tree = {} +local max_r = 7 +local ht = 12 +local fruit = nil +local limbs = nil +local tree = "australia:blue_gum_tree" +local leaves = "australia:blue_gum_leaves" +for r = 6,max_r do + local schem = aus.generate_tree_schematic(10, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.blue_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 180, + fill_ratio = (max_r-r+1)/7000, + biomes = {"victorian_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Coolabah Tree +aus.schematics.coolabah_tree = {} +local max_r = 5 +local ht = 7 +local fruit = nil +local limbs = nil +local tree = "australia:coolabah_tree" +local leaves = "australia:coolabah_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(3, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.coolabah_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"australia:dirt_with_grass"}, + y_min = 36, + y_max = 140, + fill_ratio = (max_r-r+1)/20000, + biomes = {"victorian_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Golden Wattle +aus.schematics.golden_wattle_tree = {} +local max_r = 3 +local ht = 3 +local fruit = nil +local limbs = false +local tree = "australia:golden_wattle_tree" +local leaves = "australia:golden_wattle_leaves" +for r = 2,max_r do + local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.golden_wattle_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/12000, + biomes = {"victorian_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Lilly Pilly +aus.schematics.lilly_pilly_tree = {} +local max_r = 5 +local ht = 8 +local fruit = "australia:lilly_pilly_berries" +local limbs = false +local tree = "australia:lilly_pilly_tree" +local leaves = "australia:lilly_pilly_leaves" +for r = 4,max_r do + local schem = aus.generate_tree_schematic(1, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.lilly_pilly_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/12000, + biomes = {"victorian_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Red Bottlebrush +aus.schematics.red_bottlebrush_tree = {} +local max_r = 3 +local ht = 4 +local fruit = nil +local limbs = false +local tree = "australia:red_bottlebrush_tree" +local leaves = "australia:red_bottlebrush_leaves" +for r = 2,max_r do + local schem = aus.generate_tree_schematic(1, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.red_bottlebrush_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/12000, + biomes = {"victorian_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- River Red Gum +aus.schematics.river_red_gum_tree = {} +local max_r = 13 +local ht = 13 +local fruit = nil +local limbs = nil +local tree = "australia:river_red_gum_tree" +local leaves = "australia:river_red_gum_leaves" +for r = 10,max_r do + local schem = aus.generate_giant_tree_schematic(7, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.river_red_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 140, + fill_ratio = (max_r-r+1)/20000, + biomes = {"victorian_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Southern Sassafras +aus.schematics.southern_sassafras_tree = {} +local max_r = 5 +local fruit = nil +local tree = "australia:southern_sassafras_tree" +local leaves = "australia:southern_sassafras_leaves" +for r = 4,max_r do + local schem = aus.generate_conifer_schematic(6, 4, tree, leaves, fruit) + push(aus.schematics.southern_sassafras_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 160, + fill_ratio = (max_r-r+1)/15000, + biomes = {"victorian_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Swamp Gum +aus.schematics.swamp_gum_tree = {} +local max_r = 6 +local ht = 18 +local fruit = nil +local limbs = nil +local tree = "australia:swamp_gum_tree" +local leaves = "australia:swamp_gum_leaves" +for r = 6,max_r do + local schem = aus.generate_giant_tree_schematic(26, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.swamp_gum_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 120, + fill_ratio = (max_r-r+1)/15000, + biomes = {"victorian_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- Tasmanian Myrtle +aus.schematics.tasmanian_myrtle_tree = {} +local max_r = 8 +local ht = 14 +local fruit = nil +local limbs = nil +local tree = "australia:tasmanian_myrtle_tree" +local leaves = "australia:tasmanian_myrtle_leaves" +for r = 6,max_r do + local schem = aus.generate_big_tree_schematic(6, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.tasmanian_myrtle_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 150, + fill_ratio = (max_r-r+1)/15000, + biomes = {"victorian_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + + -- White Box +aus.schematics.white_box_tree = {} +local max_r = 8 +local ht = 7 +local fruit = nil +local limbs = nil +local tree = "australia:white_box_tree" +local leaves = "australia:white_box_leaves" +for r = 6,max_r do + local schem = aus.generate_tree_schematic(5, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs) + push(aus.schematics.white_box_tree, schem) + minetest.register_decoration({ + deco_type = "schematic", + sidelen = 80, + place_on = {"default:dirt_with_grass"}, + y_min = 36, + y_max = 175, + fill_ratio = (max_r-r+1)/10000, + biomes = {"victorian_forests"}, + schematic = schem, + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + diff --git a/crafting.lua b/crafting.lua new file mode 100644 index 0000000..2138ae9 --- /dev/null +++ b/crafting.lua @@ -0,0 +1,66 @@ +-- mods/australia/crafting.lua + +minetest.register_craft({ + output = 'australia:red_stonebrick 4', + recipe = { + {'australia:red_stone', 'australia:red_stone'}, + {'australia:red_stone', 'australia:red_stone'}, + } +}) + +minetest.register_craft({ + output = 'australia:bluestone_brick 4', + recipe = { + {'australia:bluestone', 'australia:bluestone'}, + {'australia:bluestone', 'australia:bluestone'}, + } +}) + + -- Wood planks +for i in ipairs(aus.treelist) do + local treename = aus.treelist[i][1] + minetest.register_craft({ + output = "australia:"..treename.."_wood 4", + recipe = { + {"australia:"..treename.."_tree"} + } + }) +end + + + +-- +-- Cooking recipes +-- + +minetest.register_craft({ + type = "cooking", + output = "australia:red_stone", + recipe = "australia:red_cobble", +}) + +minetest.register_craft({ + type = "cooking", + output = "australia:bluestone", + recipe = "australia:bluestone_cobble", +}) + + -- Fences +for i in ipairs(aus.treelist) do + local treename = aus.treelist[i][1] + minetest.register_craft({ + output = "australia:fence_"..treename.."_wood 4", + recipe = { + {"australia:"..treename.."_wood", "group:stick", "australia:"..treename.."_wood"}, + {"australia:"..treename.."_wood", "group:stick", "australia:"..treename.."_wood"}, + } + }) +end + + + +-- +-- Fuels +-- + + diff --git a/craftitems.lua b/craftitems.lua new file mode 100644 index 0000000..8d76e7b --- /dev/null +++ b/craftitems.lua @@ -0,0 +1,27 @@ +-- mods/australia/craftitems.lua + +bucket.register_liquid( + "australia:muddy_water_source", + "australia:muddy_water_flow", + "australia:bucket_muddy_water", + "australia_bucket_muddy_water.png", + "Muddy Water Bucket" +) + +for i in ipairs(aus.treelist) do + local treename = aus.treelist[i][1] + local treedesc = aus.treelist[i][2] + + if minetest.get_modpath("stairs") then + stairs.register_stair_and_slab( + "aus_"..treename.."_wood", + "australia:"..treename.."_wood", + {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3}, + {"aus_"..treename.."_wood.png" }, + treedesc.." Wood Stair", + treedesc.." Wood Slab", + default.node_sound_wood_defaults() + ) + end +end + diff --git a/credits.txt b/credits.txt new file mode 100644 index 0000000..1cb8782 --- /dev/null +++ b/credits.txt @@ -0,0 +1,14 @@ +-- Mangrove mud sounds from: http://www.freesound.org/people/dobroide/sounds/16771/ (CC by 3.0) +-- Moss textures by Neuromancer. +-- All tree textures by vlapsley. +-- All plant/flower textures by vlapsley, except grass/dry_grass from default game. +-- Bluestone textures by vlapsley. + +-- Original tree code adapted from Gael-de-Sailly and duane-r. +-- Tree schematic creation code by duane-r. +-- Ore placement code adapted from duane-r. + +-- noairblocks +-- Code modified from Duane Robertson's (github duane-r) valleys_c mod. +-- Original code modified from Perttu Ahola's +-- "noairblocks" mod and released as LGPL 2.1, as the original. diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..42fd857 --- /dev/null +++ b/depends.txt @@ -0,0 +1,4 @@ +default +bucket +stairs +walls \ No newline at end of file diff --git a/functions.lua b/functions.lua new file mode 100644 index 0000000..744428d --- /dev/null +++ b/functions.lua @@ -0,0 +1,50 @@ +-- mods/australia/functions.lua + +-- Create and initialize a table for a schematic. +function aus.schematic_array(width, height, depth) + -- Dimensions of data array. + local s = {size={x=width, y=height, z=depth}} + s.data = {} + + for z = 0,depth-1 do + for y = 0,height-1 do + for x = 0,width-1 do + local i = z*width*height + y*width + x + 1 + s.data[i] = {} + s.data[i].name = "air" + s.data[i].param1 = 000 + end + end + end + + s.yslice_prob = {} + + return s +end + +-- Push an element onto a stack (table). +function push(t, x) + t[#t+1] = x +end + +-- Check if the table contains an element. +function table.contains(table, element) + for key, value in pairs(table) do + if value == element then + if key then + return key + else + return true + end + end + end + return false +end + +-- Round a number to the given decimal places +function math.round(num, idp) + local mult = 10^(idp or 0) + return math.floor(num * mult + 0.5) / mult +end + + diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..1f91f5b --- /dev/null +++ b/init.lua @@ -0,0 +1,59 @@ +-- mods/australia/init.lua + +-- MOD: australia +-- See README.md for licensing and other information. +-- Designed for valleys mapgen in Minetest 0.4.13-dev, but will work with mgv5, +-- mgv7, flat and fractal with limitations. + +-- Check for necessary mod functions and abort if they aren't available. +if not minetest.get_biome_id then + minetest.log() + minetest.log("* Not loading MOD: Australia *") + minetest.log("MOD: Australia requires mod functions which are") + minetest.log(" not exposed by your Minetest build.") + minetest.log() + return +end + +-- Definitions made by this mod that other mods can use too +aus = {} +aus.path = minetest.get_modpath("australia") +aus.schematics = {} + +-- Set the following to 1 to enable biome or 0 to disable +aus.biome_underground = 1 +aus.biome_mangroves = 1 +aus.biome_tasman_sea = 1 +aus.biome_great_australian_bight = 1 +aus.biome_indian_ocean = 1 +aus.biome_great_barrier_reef = 1 +aus.biome_timor_sea = 1 +aus.biome_jarrah_karri_forests = 1 +aus.biome_eastern_coasts = 1 +aus.biome_goldfields_esperence = 1 +aus.biome_arnhem_land = 1 +aus.biome_gulf_of_carpentaria = 1 +aus.biome_far_north_queensland = 1 +aus.biome_pilbara = 1 +aus.biome_kimberley = 1 +aus.biome_tasmania = 1 +aus.biome_great_dividing_range = 1 +aus.biome_victorian_forests = 1 +aus.biome_murray_darling_basin = 1 +aus.biome_mulga_lands = 1 +aus.biome_flinders_lofty = 1 +aus.biome_central_australia = 1 +aus.biome_simpson_desert = 1 +aus.biome_australian_alps = 1 + +-- Load files +dofile(aus.path .. "/functions.lua") +dofile(aus.path .. "/nodes.lua") +dofile(aus.path .. "/craftitems.lua") +dofile(aus.path .. "/crafting.lua") +dofile(aus.path .. "/trees.lua") +dofile(aus.path .. "/mapgen.lua") +dofile(aus.path .. "/saplings.lua") +dofile(aus.path .. "/voxel.lua") + +minetest.log("MOD: Australia loaded") diff --git a/mapgen.lua b/mapgen.lua new file mode 100644 index 0000000..1608231 --- /dev/null +++ b/mapgen.lua @@ -0,0 +1,124 @@ +-- mods/australia/mapgen.lua + +minetest.clear_registered_biomes() +minetest.clear_registered_decorations() + + + +-- +-- Register ores +-- + +-- All mapgens except singlenode +-- Blob ore first to avoid other ores inside blobs + + -- Bluestone (Basalt) +minetest.register_ore({ + ore_type = "blob", + ore = "australia:bluestone", + wherein = {"default:stone", + "default:sandstone", + "australia:red_stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 8, + y_min = -31000, + y_max = 31000, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 677, + octaves = 1, + persist = 0.0 + }, +}) + + + +-- +-- Biomes +-- + + -- Underground biome +if aus.biome_underground == 1 then + dofile(aus.path .. "/biome_underground.lua") +end + + -- Coastal biomes +if aus.biome_mangroves == 1 then + dofile(aus.path .. "/biome_mangroves.lua") +end +if aus.biome_tasman_sea == 1 then + dofile(aus.path .. "/biome_tasman_sea.lua") +end +if aus.biome_great_australian_bight == 1 then + dofile(aus.path .. "/biome_great_australian_bight.lua") +end +if aus.biome_indian_ocean == 1 then + dofile(aus.path .. "/biome_indian_ocean.lua") +end +if aus.biome_great_barrier_reef == 1 then + dofile(aus.path .. "/biome_great_barrier_reef.lua") +end +if aus.biome_timor_sea == 1 then + dofile(aus.path .. "/biome_timor_sea.lua") +end + + -- Lowland biomes +if aus.biome_jarrah_karri_forests == 1 then + dofile(aus.path .. "/biome_jarrah_karri_forests.lua") +end +if aus.biome_eastern_coasts == 1 then + dofile(aus.path .. "/biome_eastern_coasts.lua") +end +if aus.biome_goldfields_esperence == 1 then + dofile(aus.path .. "/biome_goldfields_esperence.lua") +end +if aus.biome_arnhem_land == 1 then + dofile(aus.path .. "/biome_arnhem_land.lua") +end +if aus.biome_gulf_of_carpentaria == 1 then + dofile(aus.path .. "/biome_gulf_of_carpentaria.lua") +end +if aus.biome_far_north_queensland == 1 then + dofile(aus.path .. "/biome_far_north_queensland.lua") +end +if aus.biome_pilbara == 1 then + dofile(aus.path .. "/biome_pilbara.lua") +end +if aus.biome_kimberley == 1 then + dofile(aus.path .. "/biome_kimberley.lua") +end + + -- Highland biomes +if aus.biome_tasmania == 1 then + dofile(aus.path .. "/biome_tasmania.lua") +end +if aus.biome_great_dividing_range == 1 then + dofile(aus.path .. "/biome_great_dividing_range.lua") +end +if aus.biome_victorian_forests == 1 then + dofile(aus.path .. "/biome_victorian_forests.lua") +end +if aus.biome_flinders_lofty == 1 then + dofile(aus.path .. "/biome_flinders_lofty.lua") +end +if aus.biome_murray_darling_basin == 1 then + dofile(aus.path .. "/biome_murray_darling_basin.lua") +end +if aus.biome_mulga_lands == 1 then + dofile(aus.path .. "/biome_mulga_lands.lua") +end +if aus.biome_central_australia == 1 then + dofile(aus.path .. "/biome_central_australia.lua") +end +if aus.biome_simpson_desert == 1 then + dofile(aus.path .. "/biome_simpson_desert.lua") +end + + -- Alpine biome +if aus.biome_australian_alps == 1 then + dofile(aus.path .. "/biome_australian_alps.lua") +end + diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..be03747 --- /dev/null +++ b/mod.conf @@ -0,0 +1 @@ +name = australia diff --git a/nodes.lua b/nodes.lua new file mode 100644 index 0000000..0c941aa --- /dev/null +++ b/nodes.lua @@ -0,0 +1,771 @@ +-- mods/australia/nodes.lua + + +-- +-- Stone +-- + +minetest.register_node("australia:red_stone", { + description = "Red Stone", + tiles = {"aus_red_stone.png"}, + groups = {cracky=3, stone=1}, + drop = 'australia:red_cobble', + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("australia:red_cobble", { + description = "Red cobblestone", + tiles = {"aus_red_cobble.png"}, + is_ground_content = false, + groups = {cracky=3, stone=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("australia:red_stonebrick", { + description = "Red Stone Brick", + tiles = {"aus_red_stonebrick.png"}, + is_ground_content = false, + groups = {cracky=2, stone=1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("australia:bluestone", { + description = "Bluestone (Basalt)", + tiles = {"aus_bluestone.png"}, + groups = {cracky=2, stone=1}, + drop = 'australia:bluestone_cobble', + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("australia:bluestone_cobble", { + description = "Bluestone cobble", + tiles = {"aus_bluestone_cobble.png"}, + is_ground_content = false, + groups = {cracky=2, stone=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("australia:bluestone_brick", { + description = "Bluestone Brick", + tiles = {"aus_bluestone_brick.png"}, + is_ground_content = false, + groups = {cracky=1, stone=1}, + sounds = default.node_sound_stone_defaults(), +}) + + +-- +-- Soft / Non-Stone +-- + +minetest.register_node("australia:red_dirt", { + description = "Red Dirt", + tiles = {"aus_red_dirt.png"}, + groups = {crumbly=3,soil=1}, + sounds = default.node_sound_dirt_defaults(), +}) + +minetest.register_node("australia:red_sand", { + description = "Red Sand", + tiles = {"aus_red_sand.png"}, + groups = {crumbly=3, falling_node=1, sand=1}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("australia:red_gravel", { + description = "Red Gravel", + tiles = {"aus_red_gravel.png"}, + groups = {crumbly=2, falling_node=1}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_gravel_footstep", gain=0.5}, + dug = {name="default_gravel_footstep", gain=1.0}, + }), +}) + +minetest.register_node("australia:mangrove_mud", { + description = "Mangrove Mud", + tiles = {"aus_mangrove_mud.png"}, + groups = {crumbly=2, soil=1}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="aus_mangrove_mud", gain=0.4}, + dug = {name="aus_mangrove_mud", gain=0.4}, + }), +}) + + + +-- +-- Trees +-- + +aus.treelist = { + --treename, treedesc, treetrunk_dia, treespaling, treefruit, treefruit_desc, treefruit_scale, treefruit_health + {"black_box", "Eucalyptus largiflorens: Black Box", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"black_wattle", "Acacia melanoxylon: Black Wattle", 0.75, "acacia", nil, nil, nil, nil }, + {"blue_gum", "Eucalyptus globulus: Blue Gum", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"boab", "Adansonia gregorii: Boab", 1.0, "boab", nil, nil, nil, nil }, + {"bull_banksia", "Banksia grandis: Bull Banksia", 0.33, "banksia", nil, nil, nil, nil }, + {"celery_top_pine", "Phyllocladus aspleniifolius: Celery-top Pine", 1, "pine", nil, nil, nil, nil }, + {"cherry", "Exocarpos cupressiformis: Australian Cherry", 0.5, "berry", "cherry", "Australian Cherries", 0.67, 1 }, + {"cloncurry_box", "Eucalyptus leucophylla: Cloncurry Box", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"coast_banksia", "Banksia integrifolia: Coast Banksia", 1.0, "banksia", nil, nil, nil, nil }, + {"coolabah", "Eucalyptus coolabah: Coolabah", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"daintree_stringybark", "Eucalyptus pellita: Daintree Stringybark", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"darwin_woollybutt", "Eucalyptus miniata: Darwin Woollybutt", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"desert_oak", "Allocasuarina decaisneana: Desert Oak", 1.0, "acacia", nil, nil, nil, nil }, + {"fan_palm", "Licuala ramsayi: Australian Fan Palm", 1.0, "palm", nil, nil, nil, nil }, + {"golden_wattle", "Acacia pycnantha: Golden Wattle", 0.33, "acacia", nil, nil, nil, nil }, + {"grey_mangrove", "Avicennia marina: Grey Mangrove", 0.25, "mangrove", nil, nil, nil, nil }, + {"huon_pine", "Lagarostrobos franklinii: Huon Pine", 1.0, "pine", nil, nil, nil, nil }, + {"illawarra_flame", "Brachychiton acerifolius: Illawarra Flame", 1.0, "illawarra_flame", nil, nil, nil, nil }, + {"jarrah", "Eucalyptus marginata: Jarrah", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"karri", "Eucalyptus diversicolor: Karri", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"lemon_eucalyptus", "Eucalyptus citriodora: Lemon Eucalyptus", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"lemon_myrtle", "Backhousia citriodora: Lemon Myrtle", 0.5, "myrtle", nil, nil, nil, nil }, + {"lilly_pilly", "Syzygium smithii: Lilly Pilly", 0.33, "berry", "lilly_pilly_berries", "Lilly Pilly Berries", 0.67, 1 }, + {"macadamia", "Macadamia tetraphylla: Prickly Macadamia", 0.75, "macadamia", "macadamia", "Macadamia Nuts", 0.67, 1 }, + {"mangrove_apple", "Sonneratia caseolaris: Mangrove Apple", 0.75, "mangrove_apple", "mangrove_apple", "Mangrove Apple", 0.67, 1 }, + {"merbau", "Intsia bijuga: Merbau", 1.0, "merbau", nil, nil, nil, nil }, + {"marri", "Corymbia calophylla: Marri", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"moreton_bay_fig", "Ficus macrophylla: Moreton Bay Fig", 1.0, "fig", "moreton_bay_fig", "Moreton Bay Fig", 0.67, 1 }, + {"mulga", "Acacia aneura: Mulga", 0.5, "acacia", nil, nil, nil, nil }, + {"paperbark", "Melaleuca quinquenervia: Paper Bark", 1.0, "melaleuca", nil, nil, nil, nil }, + {"quandong", "Santalum acuminatum: Desert Quandong", 0.25, "quandong", "quandong", "Desert Quandong", 0.5, 1 }, + {"red_bottlebrush", "Melaleuca citrina: Red Bottlebrush", 0.33, "melaleuca", nil, nil, nil, nil }, + {"river_oak", "Casuarina cunninghamiana: River Oak", 1.0, "acacia", nil, nil, nil, nil }, + {"river_red_gum", "Eucalyptus camaldulensis: River Red Gum", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"rottnest_island_pine", "Callitris preissii: Rottnest Island Pine", 0.75, "pine", nil, nil, nil, nil }, + {"scribbly_gum", "Eucalyptus haemastoma: Scribbly Gum", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"shoestring_acacia", "Acacia stenophylla: Shoestring Acacia", 1.0, "acacia", nil, nil, nil, nil }, + {"snow_gum", "Eucalyptus pauciflora: Snow Gum", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"southern_sassafras", "Atherosperma moschatum: Southern Sassafras", 1, "pine", nil, nil, nil, nil }, + {"stilted_mangrove", "Rhizophora stylosa: Stilted Mangrove", 0.25, "mangrove", nil, nil, nil, nil }, + {"sugar_gum", "Eucalyptus cladocalyx: Sugar Gum", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"swamp_bloodwood", "Corymbia ptychocarpa: Swamp Bloodwood", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"swamp_gum", "Eucalyptus regnans: Swamp Gum", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"swamp_paperbark", "Melaleuca rhaphiophylla: Swamp Paperbark", 0.5, "melaleuca", nil, nil, nil, nil }, + {"tasmanian_myrtle", "Lophozonia cunninghamii: Tasmanian Myrtle", 1.0, "myrtle", nil, nil, nil, nil }, + {"tea_tree", "Melaleuca alternifolia: Tea", 0.5, "melaleuca", nil, nil, nil, nil }, + {"white_box", "Eucalyptus albens: White Box", 1.0, "eucalyptus", nil, nil, nil, nil }, + {"wirewood", "Acacia coriacea: Wirewood", 0.33, "acacia", nil, nil, nil, nil }, +} + +for i in ipairs(aus.treelist) do + local treename = aus.treelist[i][1] + local treedesc = aus.treelist[i][2] + local treetrunk_dia = aus.treelist[i][3] + local treespaling = aus.treelist[i][4] + local treefruit = aus.treelist[i][5] + local treefruit_desc = aus.treelist[i][6] + local treefruit_scale = aus.treelist[i][7] + local treefruit_health = aus.treelist[i][8] + + -- tree + local node_d = { + description = treedesc.. " Tree", + tiles = { + "aus_"..treename.."_treetop.png", + "aus_"..treename.."_treetop.png", + "aus_"..treename.."_tree.png" + }, + paramtype2 = "facedir", + is_ground_content = true, + groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2}, + sounds = default.node_sound_wood_defaults(), + on_place = minetest.rotate_node, + } + -- Some trunks aren't a meter wide. + if treetrunk_dia and treetrunk_dia ~= 1 then + local radius = treetrunk_dia / 2 + node_d.paramtype = "light" + node_d.drawtype = "nodebox" + node_d.node_box = { type = "fixed", + fixed = { {-radius, -0.5, -radius, radius, 0.5, radius}, } + } + node_d.selection_box = { type = "fixed", + fixed = { {-radius, -0.5, -radius, radius, 0.5, radius}, } + } + end + minetest.register_node("australia:"..treename.."_tree", node_d) + + -- wood + minetest.register_node("australia:"..treename.."_wood", { + description = treedesc.." Wood Planks", + tiles = {"aus_"..treename.."_wood.png"}, + groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1}, + sounds = default.node_sound_wood_defaults(), + }) + + -- leaves + minetest.register_node("australia:"..treename.."_leaves", { + description = treedesc.." Leaves", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tiles = { "aus_"..treename.."_leaves.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy=3,flammable=2,leaves=1}, + drop = { + max_items = 1, + items = { + {items = {"australia:"..treename.."_sapling"}, rarity = 50 }, + {items = {"australia:"..treename.."_leaves"} } + } + }, + sounds = default.node_sound_leaves_defaults(), + }) + + -- sapling + minetest.register_node("australia:"..treename.."_sapling", { + description = treedesc.." Sapling", + drawtype = "plantlike", + visual_scale = 1.0, + tiles = {"aus_"..treespaling.."_sapling.png"}, + inventory_image = "aus_"..treespaling.."_sapling.png", + wield_image = "aus_"..treespaling.."_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} + }, + groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1}, + sounds = default.node_sound_leaves_defaults(), + }) + + -- fruit, if applicable + if treefruit then + minetest.register_node("australia:"..treefruit.."", { + description = treefruit_desc, + drawtype = "plantlike", + visual_scale = treefruit_scale, + tiles = { "aus_"..treefruit..".png" }, + inventory_image = "aus_"..treefruit..".png", + wield_image = "aus_"..treefruit..".png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.5, -0.1, 0.1, -0.25, 0.1}, + }, + groups = {fleshy=3,dig_immediate=3,flammable=2,leafdecay=3,leafdecay_drop=1}, + -- Fruit makes you healthy. + on_use = minetest.item_eat(treefruit_health), + sounds = default.node_sound_leaves_defaults(), + after_place_node = function(pos, placer, itemstack) + if placer:is_player() then + minetest.set_node(pos, {name="australia:"..treefruit.."", param2=1}) + end + end, + }) + end + + -- fence + default.register_fence("australia:fence_"..treename.."_wood", { + description = treedesc.." Fence", + texture = "aus_"..treename.."_wood.png", + material = "australia:"..treename.."_wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + }) +end + + +-- +-- Ores +-- + + +-- +-- Plantlife (non-cubic) +-- + + -- Acrostichum speciosum: Mangrove Fern +minetest.register_node("australia:mangrove_fern", { + description = "Acrostichum speciosum: Mangrove Fern", + drawtype = "plantlike", + waving = 1, + visual_scale = 1.0, + tiles = {"aus_mangrove_fern.png"}, + inventory_image = "aus_mangrove_fern.png", + wield_image = "aus_mangrove_fern.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, + }, +}) + + -- Crinum pedunculatum: Mangrove Lily +minetest.register_node("australia:mangrove_lily", { + description = "Crinum pedunculatum: Mangrove Lily", + drawtype = "plantlike", + waving = 1, + visual_scale = 1.0, + tiles = {"aus_mangrove_lily.png"}, + inventory_image = "aus_mangrove_lily.png", + wield_image = "aus_mangrove_lily.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, + }, +}) + + -- Nypa fruticans: Mangrove Palm +minetest.register_node("australia:mangrove_palm_trunk", { + description = "Nypa fruticans: Mangrove Fern", + tiles = {"aus_mangrove_palm_trunk.png", "aus_mangrove_mud.png", + "aus_mangrove_palm_trunk.png"}, + inventory_image = "aus_mangrove_palm_trunk.png", + wield_image = "aus_mangrove_palm_trunk.png", + paramtype = "light", + paramtype2 = "facedir", + groups = {choppy = 2, flammable = 2, flora = 1, attached_node = 1, oddly_breakable_by_hand = 1}, + sounds = default.node_sound_wood_defaults(), + on_place = minetest.rotate_node, +-- drawtype = "nodebox", +-- node_box = { +-- type = "fixed", +-- fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, +-- }, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, +}) + +minetest.register_node("australia:mangrove_palm_leaf_bot", { + description = "Nypa fruticans: Mangrove Fern", + tiles = {"aus_mangrove_palm_leaf_bot.png", "aus_mangrove_palm_leaf_bot.png", + "aus_mangrove_palm_leaf_bot.png"}, + inventory_image = "aus_mangrove_palm_leaf_bot.png", + wield_image = "aus_mangrove_palm_leaf_bot.png", + paramtype = "light", + paramtype2 = "facedir", + groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + drawtype = "nodebox", + nodebox = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, +}) + +minetest.register_node("australia:mangrove_palm_leaf_top", { + description = "Nypa fruticans: Mangrove Fern", + tiles = {"aus_mangrove_palm_leaf_top.png", "aus_mangrove_palm_leaf_top.png", + "aus_mangrove_palm_leaf_top.png"}, + inventory_image = "aus_mangrove_palm_leaf_top.png", + wield_image = "aus_mangrove_palm_leaf_top.png", + paramtype = "light", + paramtype2 = "facedir", + groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + drawtype = "nodebox", + nodebox = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, +}) + + -- Banksia dallanneyi: Couch Honeypot +minetest.register_node("australia:couch_honeypot", { + description = "Banksia dallanneyi: Couch Honeypot", + drawtype = "plantlike", + waving = 0, + visual_scale = 1.0, + tiles = {"aus_couch_honeypot.png"}, + inventory_image = "aus_couch_honeypot.png", + wield_image = "aus_couch_honeypot.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, + }, +}) + + -- Crinum flaccidum: Darling Lily +minetest.register_node("australia:darling_lily", { + description = "Crinum flaccidum: Darling Lily", + drawtype = "plantlike", + waving = 1, + visual_scale = 1.0, + tiles = {"aus_darling_lily.png"}, + inventory_image = "aus_darling_lily.png", + wield_image = "aus_darling_lily.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, + }, +}) + + -- Astrebla pectinata: Mitchell Grass +minetest.register_node("australia:mitchell_grass", { + description = "Astrebla pectinata: Mitchell Grass", + drawtype = "plantlike", + waving = 0, + visual_scale = 1.0, + tiles = {"aus_mitchell_grass.png"}, + inventory_image = "aus_mitchell_grass.png", + wield_image = "aus_mitchell_grass.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, + }, +}) + + -- Atriplex nummularia: Saltbush +minetest.register_node("australia:saltbush", { + description = "Atriplex nummularia: Saltbush", + drawtype = "plantlike", + waving = 0, + visual_scale = 1.4, + tiles = {"aus_saltbush.png"}, + inventory_image = "aus_saltbush.png", + wield_image = "aus_saltbush.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, + }, +}) + + -- Olearia pannosa: Silver Daisy +minetest.register_node("australia:silver_daisy", { + description = "Olearia pannosa: Silver Daisy", + drawtype = "plantlike", + waving = 1, + visual_scale = 1.0, + tiles = {"aus_silver_daisy.png"}, + inventory_image = "aus_silver_daisy.png", + wield_image = "aus_silver_daisy.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, + }, +}) + + -- Triodia longiceps: Spinifex +minetest.register_node("australia:spinifex", { + description = "Triodia longiceps: Spinifex", + drawtype = "plantlike", + waving = 0, + visual_scale = 1.2, + tiles = {"aus_spinifex.png"}, + inventory_image = "aus_spinifex.png", + wield_image = "aus_spinifex.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, + }, +}) + + -- Telopea speciosissima: Waratah +minetest.register_node("australia:waratah", { + description = "Telopea speciosissima: Waratah", + drawtype = "allfaces_optional", + visual_scale = 1.0, + tiles = { "aus_waratah.png"}, + inventory_image = { "aus_waratah.png"}, + wield_image = { "aus_waratah.png"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), +}) + + -- Acropora cervicornis: Staghorn Coral (yellow) +minetest.register_node("australia:staghorn_coral_yellow", { + description = "Acropora cervicornis: Staghorn Coral", + drawtype = "plantlike", + waving = 0, + visual_scale = 1.0, + tiles = {"aus_staghorn_coral_yellow.png"}, + inventory_image = "aus_staghorn_coral_yellow.png", + wield_image = "aus_staghorn_coral_yellow.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + groups = {cracky = 3, stone=1, attached_node=1, sea=1}, + sounds = default.node_sound_stone_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, + }, +}) + + -- Acropora cervicornis: Staghorn Coral (purple) +minetest.register_node("australia:staghorn_coral_purple", { + description = "Acropora cervicornis: Staghorn Coral", + drawtype = "plantlike", + waving = 0, + visual_scale = 1.0, + tiles = {"aus_staghorn_coral_purple.png"}, + inventory_image = "aus_staghorn_coral_purple.png", + wield_image = "aus_staghorn_coral_purple.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + groups = {cracky = 3, stone=1, attached_node=1, sea=1}, + sounds = default.node_sound_stone_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, + }, +}) + + -- Acropora cervicornis: Staghorn Coral (pink) +minetest.register_node("australia:staghorn_coral_pink", { + description = "Acropora cervicornis: Staghorn Coral", + drawtype = "plantlike", + waving = 0, + visual_scale = 1.0, + tiles = {"aus_staghorn_coral_pink.png"}, + inventory_image = "aus_staghorn_coral_pink.png", + wield_image = "aus_staghorn_coral_pink.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + groups = {cracky = 3, stone=1, attached_node=1, sea=1}, + sounds = default.node_sound_stone_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, + }, +}) + + -- Acropora cervicornis: Staghorn Coral (blue) +minetest.register_node("australia:staghorn_coral_blue", { + description = "Acropora cervicornis: Staghorn Coral", + drawtype = "plantlike", + waving = 0, + visual_scale = 1.0, + tiles = {"aus_staghorn_coral_blue.png"}, + inventory_image = "aus_staghorn_coral_blue.png", + wield_image = "aus_staghorn_coral_blue.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + groups = {cracky = 3, stone=1, attached_node=1, sea=1}, + sounds = default.node_sound_stone_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, + }, +}) + + +-- +-- Liquids +-- + +minetest.register_node("australia:muddy_river_water_source", { + description = "Muddy river water source", + drawtype = "liquid", + tiles = { + { + name="aus_muddy_river_water_flowing.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + }, + special_tiles = { + { + name="aus_muddy_river_water_flowing.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + backface_culling = false, + }, + }, + alpha = 160, + paramtype = "light", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "source", + liquid_alternative_flowing = "australia:muddy_river_water_flowing", + liquid_alternative_source = "australia:muddy_river_water_source", + liquid_viscosity = 1, + liquid_renewable = false, + liquid_range = 2, + post_effect_color = {a = 64, r = 200, g = 150, b = 100}, + groups = {water = 3, liquid = 3, puts_out_fire = 1}, +}) + +minetest.register_node("australia:muddy_river_water_flowing", { + description = "Flowing muddy river water", + drawtype = "flowingliquid", + tiles = {"aus_muddy_river_water_source.png"}, + special_tiles = { + { + image="aus_muddy_river_water_flowing.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + { + image="aus_muddy_river_water_flowing.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + }, + alpha = 160, + paramtype = "light", + paramtype2 = "flowingliquid", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "flowing", + liquid_alternative_flowing = "australia:muddy_river_water_flowing", + liquid_alternative_source = "australia:muddy_river_water_source", + liquid_viscosity = 1, + liquid_renewable = false, + liquid_range = 2, + post_effect_color = {a = 64, r = 200, g = 150, b = 100}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, + not_in_creative_inventory = 1}, +}) + + +-- +-- Tools / "Advanced" crafting / Non-"natural" +-- + + + +-- +-- Misc +-- + +minetest.register_node("australia:moss", { + description = "Moss", + drawtype = "nodebox", + tiles = {"aus_moss.png"}, + inventory_image = "aus_moss.png", + wield_image = "aus_moss.png", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.46875, 0.5} + }, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5} + }, + groups = {snappy = 3,flammable = 3}, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node("australia:moss_with_fungus", { + description = "Moss with Fungus", + drawtype = "nodebox", + tiles = {"aus_moss_fungus.png"}, + inventory_image = "aus_moss_fungus.png", + wield_image = "aus_moss_fungus.png", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + walkable = false, + buildable_to = false, + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.46875, 0.5} + }, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5} + }, + groups = {snappy = 3,flammable = 3}, + sounds = default.node_sound_leaves_defaults(), +}) diff --git a/saplings.lua b/saplings.lua new file mode 100644 index 0000000..3e3483d --- /dev/null +++ b/saplings.lua @@ -0,0 +1,136 @@ +-- +-- Grow trees from saplings +-- + +-- list of all saplings +aus.saplings = { + {sapling="australia:black_box_sapling", + schematics=aus.schematics.black_box_tree}, + {sapling="australia:black_wattle_sapling", + schematics=aus.schematics.black_wattle_tree}, + {sapling="australia:blue_gum_sapling", + schematics=aus.schematics.blue_gum_tree}, + {sapling="australia:boab_sapling", + schematics=aus.schematics.boab_tree}, + {sapling="australia:bull_banksia_sapling", + schematics=aus.schematics.bull_banksia_tree}, + {sapling="australia:celery_top_pine_sapling", + schematics=aus.schematics.celery_top_pine_tree}, + {sapling="australia:cherry_sapling", + schematics=aus.schematics.cherry_tree}, + {sapling="australia:cloncurry_box_sapling", + schematics=aus.schematics.cloncurry_box_tree}, + {sapling="australia:coast_banksia_sapling", + schematics=aus.schematics.coast_banksia_big_tree}, + {sapling="australia:coolabah_sapling", + schematics=aus.schematics.coolabah_tree}, + {sapling="australia:daintree_stringybark_sapling", + schematics=aus.schematics.daintree_stringybark_tree}, + {sapling="australia:darwin_woollybutt_sapling", + schematics=aus.schematics.darwin_woollybutt_tree}, + {sapling="australia:desert_oak_sapling", + schematics=aus.schematics.desert_oak_tree}, + {sapling="australia:fan_palm_sapling", + schematics=aus.schematics.fan_palm_tree}, + {sapling="australia:golden_wattle_sapling", + schematics=aus.schematics.golden_wattle_tree}, + {sapling="australia:grey_mangrove_sapling", + schematics=aus.schematics.grey_mangrove_tree}, + {sapling="australia:huon_pine_sapling", + schematics=aus.schematics.huon_pine_tree}, + {sapling="australia:illawarra_flame_sapling", + schematics=aus.schematics.illawarra_flame_tree}, + {sapling="australia:jarrah_sapling", + schematics=aus.schematics.jarrah_tree}, + {sapling="australia:karri_sapling", + schematics=aus.schematics.karri_tree}, + {sapling="australia:lemon_eucalyptus_sapling", + schematics=aus.schematics.lemon_eucalyptus_tree}, + {sapling="australia:lemon_myrtle_sapling", + schematics=aus.schematics.lemon_myrtle_tree}, + {sapling="australia:lilly_pilly_sapling", + schematics=aus.schematics.lilly_pilly_tree}, + {sapling="australia:macadamia_sapling", + schematics=aus.schematics.macadamia_tree}, + {sapling="australia:mangrove_apple_sapling", + schematics=aus.schematics.mangrove_apple_tree}, + {sapling="australia:marri_sapling", + schematics=aus.schematics.marri_tree}, + {sapling="australia:merbau_sapling", + schematics=aus.schematics.merbau_tree}, + {sapling="australia:moreton_bay_fig_sapling", + schematics=aus.schematics.moreton_bay_fig_tree}, + {sapling="australia:mulga_sapling", + schematics=aus.schematics.mulga_tree}, + {sapling="australia:paperbark_sapling", + schematics=aus.schematics.paperbark_tree}, + {sapling="australia:quandong_sapling", + schematics=aus.schematics.quandong_tree}, + {sapling="australia:red_bottlebrush_sapling", + schematics=aus.schematics.red_bottlebrush_tree}, + {sapling="australia:river_oak_sapling", + schematics=aus.schematics.river_oak_tree}, + {sapling="australia:river_red_gum_sapling", + schematics=aus.schematics.river_red_gum_tree}, + {sapling="australia:rottnest_island_pine_sapling", + schematics=aus.schematics.rottnest_island_pine_tree}, + {sapling="australia:scribbly_gum_sapling", + schematics=aus.schematics.scribbly_gum_tree}, + {sapling="australia:shoestring_acacia_sapling", + schematics=aus.schematics.shoestring_acacia_tree}, + {sapling="australia:snow_gum_sapling", + schematics=aus.schematics.snow_gum_tree}, + {sapling="australia:southern_sassafras_sapling", + schematics=aus.schematics.southern_sassafras_tree}, + {sapling="australia:stilted_mangrove_sapling", + schematics=aus.schematics.stilted_mangrove_tree}, + {sapling="australia:sugar_gum_sapling", + schematics=aus.schematics.sugar_gum_tree}, + {sapling="australia:swamp_bloodwood_sapling", + schematics=aus.schematics.swamp_bloodwood_tree}, + {sapling="australia:swamp_gum_sapling", + schematics=aus.schematics.swamp_gum_tree}, + {sapling="australia:swamp_paperbark_sapling", + schematics=aus.schematics.swamp_paperbark_tree}, + {sapling="australia:tasmanian_myrtle_sapling", + schematics=aus.schematics.tasmanian_myrtle_tree}, + {sapling="australia:tea_tree_sapling", + schematics=aus.schematics.tea_tree_tree}, + {sapling="australia:white_box_sapling", + schematics=aus.schematics.white_box_tree}, + {sapling="australia:wirewood_sapling", + schematics=aus.schematics.wirewood_tree}, +} + +-- create a list of just the node names +local sapling_list = {} +for _, sap in pairs(aus.saplings) do + push(sapling_list, sap.sapling) +end + +-- This abm can handle all saplings. +minetest.register_abm({ + nodenames = sapling_list, + interval = 10, + chance = 50, + action = function(pos, node) + local node_under = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z}) + if not node_under or + minetest.get_item_group(node_under.name, "soil") == 0 then + return + end + + for _, sap in pairs(aus.saplings) do + if node.name == sap.sapling then + minetest.log("action", "A sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + local schem = sap.schematics[math.random(1,#sap.schematics)] + local adj = {x = pos.x - math.floor(schem.size.x / 2), + y = pos.y - 1, + z = pos.z - math.floor(schem.size.z / 2)} + minetest.place_schematic(adj, schem, 'random', nil, true) + break + end + end + end, +}) diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..4137574 Binary files /dev/null and b/screenshot.png differ diff --git a/sounds/aus_mangrove_mud.1.ogg b/sounds/aus_mangrove_mud.1.ogg new file mode 100644 index 0000000..5c2f93a Binary files /dev/null and b/sounds/aus_mangrove_mud.1.ogg differ diff --git a/sounds/aus_mangrove_mud.2.ogg b/sounds/aus_mangrove_mud.2.ogg new file mode 100644 index 0000000..ca9d6e9 Binary files /dev/null and b/sounds/aus_mangrove_mud.2.ogg differ diff --git a/sounds/aus_mangrove_mud.3.ogg b/sounds/aus_mangrove_mud.3.ogg new file mode 100644 index 0000000..b50b14e Binary files /dev/null and b/sounds/aus_mangrove_mud.3.ogg differ diff --git a/sounds/aus_mangrove_mud.4.ogg b/sounds/aus_mangrove_mud.4.ogg new file mode 100644 index 0000000..b57dfd9 Binary files /dev/null and b/sounds/aus_mangrove_mud.4.ogg differ diff --git a/sounds/aus_mangrove_mud.5.ogg b/sounds/aus_mangrove_mud.5.ogg new file mode 100644 index 0000000..c100def Binary files /dev/null and b/sounds/aus_mangrove_mud.5.ogg differ diff --git a/sounds/aus_mangrove_mud.6.ogg b/sounds/aus_mangrove_mud.6.ogg new file mode 100644 index 0000000..5aa4c13 Binary files /dev/null and b/sounds/aus_mangrove_mud.6.ogg differ diff --git a/textures/aus_acacia_sapling.png b/textures/aus_acacia_sapling.png new file mode 100644 index 0000000..54bc48c Binary files /dev/null and b/textures/aus_acacia_sapling.png differ diff --git a/textures/aus_banksia_sapling.png b/textures/aus_banksia_sapling.png new file mode 100644 index 0000000..8345897 Binary files /dev/null and b/textures/aus_banksia_sapling.png differ diff --git a/textures/aus_berry_sapling.png b/textures/aus_berry_sapling.png new file mode 100644 index 0000000..52731f9 Binary files /dev/null and b/textures/aus_berry_sapling.png differ diff --git a/textures/aus_black_box_leaves.png b/textures/aus_black_box_leaves.png new file mode 100644 index 0000000..1356254 Binary files /dev/null and b/textures/aus_black_box_leaves.png differ diff --git a/textures/aus_black_box_tree.png b/textures/aus_black_box_tree.png new file mode 100644 index 0000000..2726698 Binary files /dev/null and b/textures/aus_black_box_tree.png differ diff --git a/textures/aus_black_box_treetop.png b/textures/aus_black_box_treetop.png new file mode 100644 index 0000000..bcd0d3f Binary files /dev/null and b/textures/aus_black_box_treetop.png differ diff --git a/textures/aus_black_box_wood.png b/textures/aus_black_box_wood.png new file mode 100644 index 0000000..7244c28 Binary files /dev/null and b/textures/aus_black_box_wood.png differ diff --git a/textures/aus_black_wattle_leaves.png b/textures/aus_black_wattle_leaves.png new file mode 100644 index 0000000..3ca3dc1 Binary files /dev/null and b/textures/aus_black_wattle_leaves.png differ diff --git a/textures/aus_black_wattle_tree.png b/textures/aus_black_wattle_tree.png new file mode 100644 index 0000000..c7bbb7c Binary files /dev/null and b/textures/aus_black_wattle_tree.png differ diff --git a/textures/aus_black_wattle_treetop.png b/textures/aus_black_wattle_treetop.png new file mode 100644 index 0000000..d9e02fc Binary files /dev/null and b/textures/aus_black_wattle_treetop.png differ diff --git a/textures/aus_black_wattle_wood.png b/textures/aus_black_wattle_wood.png new file mode 100644 index 0000000..e7a89c1 Binary files /dev/null and b/textures/aus_black_wattle_wood.png differ diff --git a/textures/aus_blue_gum_leaves.png b/textures/aus_blue_gum_leaves.png new file mode 100644 index 0000000..993e26f Binary files /dev/null and b/textures/aus_blue_gum_leaves.png differ diff --git a/textures/aus_blue_gum_tree.png b/textures/aus_blue_gum_tree.png new file mode 100644 index 0000000..ef8d938 Binary files /dev/null and b/textures/aus_blue_gum_tree.png differ diff --git a/textures/aus_blue_gum_treetop.png b/textures/aus_blue_gum_treetop.png new file mode 100644 index 0000000..2d0ca3c Binary files /dev/null and b/textures/aus_blue_gum_treetop.png differ diff --git a/textures/aus_blue_gum_wood.png b/textures/aus_blue_gum_wood.png new file mode 100644 index 0000000..2bbc044 Binary files /dev/null and b/textures/aus_blue_gum_wood.png differ diff --git a/textures/aus_bluestone.png b/textures/aus_bluestone.png new file mode 100644 index 0000000..b0e6fe9 Binary files /dev/null and b/textures/aus_bluestone.png differ diff --git a/textures/aus_bluestone_brick.png b/textures/aus_bluestone_brick.png new file mode 100644 index 0000000..555cd19 Binary files /dev/null and b/textures/aus_bluestone_brick.png differ diff --git a/textures/aus_bluestone_cobble.png b/textures/aus_bluestone_cobble.png new file mode 100644 index 0000000..931ce17 Binary files /dev/null and b/textures/aus_bluestone_cobble.png differ diff --git a/textures/aus_boab_leaves.png b/textures/aus_boab_leaves.png new file mode 100644 index 0000000..f757954 Binary files /dev/null and b/textures/aus_boab_leaves.png differ diff --git a/textures/aus_boab_sapling.png b/textures/aus_boab_sapling.png new file mode 100644 index 0000000..7ce4dc8 Binary files /dev/null and b/textures/aus_boab_sapling.png differ diff --git a/textures/aus_boab_tree.png b/textures/aus_boab_tree.png new file mode 100644 index 0000000..f67bc2a Binary files /dev/null and b/textures/aus_boab_tree.png differ diff --git a/textures/aus_boab_treetop.png b/textures/aus_boab_treetop.png new file mode 100644 index 0000000..370d74b Binary files /dev/null and b/textures/aus_boab_treetop.png differ diff --git a/textures/aus_boab_wood.png b/textures/aus_boab_wood.png new file mode 100644 index 0000000..b4ec9f6 Binary files /dev/null and b/textures/aus_boab_wood.png differ diff --git a/textures/aus_bull_banksia_leaves.png b/textures/aus_bull_banksia_leaves.png new file mode 100644 index 0000000..6fdc925 Binary files /dev/null and b/textures/aus_bull_banksia_leaves.png differ diff --git a/textures/aus_bull_banksia_tree.png b/textures/aus_bull_banksia_tree.png new file mode 100644 index 0000000..91e242a Binary files /dev/null and b/textures/aus_bull_banksia_tree.png differ diff --git a/textures/aus_bull_banksia_treetop.png b/textures/aus_bull_banksia_treetop.png new file mode 100644 index 0000000..bda81cc Binary files /dev/null and b/textures/aus_bull_banksia_treetop.png differ diff --git a/textures/aus_bull_banksia_wood.png b/textures/aus_bull_banksia_wood.png new file mode 100644 index 0000000..bb2ff5b Binary files /dev/null and b/textures/aus_bull_banksia_wood.png differ diff --git a/textures/aus_celery_top_pine_leaves.png b/textures/aus_celery_top_pine_leaves.png new file mode 100644 index 0000000..07964e8 Binary files /dev/null and b/textures/aus_celery_top_pine_leaves.png differ diff --git a/textures/aus_celery_top_pine_tree.png b/textures/aus_celery_top_pine_tree.png new file mode 100644 index 0000000..9016c1f Binary files /dev/null and b/textures/aus_celery_top_pine_tree.png differ diff --git a/textures/aus_celery_top_pine_treetop.png b/textures/aus_celery_top_pine_treetop.png new file mode 100644 index 0000000..10e07f2 Binary files /dev/null and b/textures/aus_celery_top_pine_treetop.png differ diff --git a/textures/aus_celery_top_pine_wood.png b/textures/aus_celery_top_pine_wood.png new file mode 100644 index 0000000..a5262d3 Binary files /dev/null and b/textures/aus_celery_top_pine_wood.png differ diff --git a/textures/aus_cherry.png b/textures/aus_cherry.png new file mode 100644 index 0000000..7bd1d7e Binary files /dev/null and b/textures/aus_cherry.png differ diff --git a/textures/aus_cherry_leaves.png b/textures/aus_cherry_leaves.png new file mode 100644 index 0000000..ae4ce0b Binary files /dev/null and b/textures/aus_cherry_leaves.png differ diff --git a/textures/aus_cherry_tree.png b/textures/aus_cherry_tree.png new file mode 100644 index 0000000..c4a95d0 Binary files /dev/null and b/textures/aus_cherry_tree.png differ diff --git a/textures/aus_cherry_treetop.png b/textures/aus_cherry_treetop.png new file mode 100644 index 0000000..88f7212 Binary files /dev/null and b/textures/aus_cherry_treetop.png differ diff --git a/textures/aus_cherry_wood.png b/textures/aus_cherry_wood.png new file mode 100644 index 0000000..5e0fcbf Binary files /dev/null and b/textures/aus_cherry_wood.png differ diff --git a/textures/aus_cloncurry_box_leaves.png b/textures/aus_cloncurry_box_leaves.png new file mode 100644 index 0000000..c7809ee Binary files /dev/null and b/textures/aus_cloncurry_box_leaves.png differ diff --git a/textures/aus_cloncurry_box_tree.png b/textures/aus_cloncurry_box_tree.png new file mode 100644 index 0000000..ba0c0b6 Binary files /dev/null and b/textures/aus_cloncurry_box_tree.png differ diff --git a/textures/aus_cloncurry_box_treetop.png b/textures/aus_cloncurry_box_treetop.png new file mode 100644 index 0000000..1a9fa1c Binary files /dev/null and b/textures/aus_cloncurry_box_treetop.png differ diff --git a/textures/aus_cloncurry_box_wood.png b/textures/aus_cloncurry_box_wood.png new file mode 100644 index 0000000..3707627 Binary files /dev/null and b/textures/aus_cloncurry_box_wood.png differ diff --git a/textures/aus_coast_banksia_leaves.png b/textures/aus_coast_banksia_leaves.png new file mode 100644 index 0000000..8781135 Binary files /dev/null and b/textures/aus_coast_banksia_leaves.png differ diff --git a/textures/aus_coast_banksia_tree.png b/textures/aus_coast_banksia_tree.png new file mode 100644 index 0000000..5ba474e Binary files /dev/null and b/textures/aus_coast_banksia_tree.png differ diff --git a/textures/aus_coast_banksia_treetop.png b/textures/aus_coast_banksia_treetop.png new file mode 100644 index 0000000..4bfc65f Binary files /dev/null and b/textures/aus_coast_banksia_treetop.png differ diff --git a/textures/aus_coast_banksia_wood.png b/textures/aus_coast_banksia_wood.png new file mode 100644 index 0000000..9e4ad99 Binary files /dev/null and b/textures/aus_coast_banksia_wood.png differ diff --git a/textures/aus_coolabah_leaves.png b/textures/aus_coolabah_leaves.png new file mode 100644 index 0000000..5f7c091 Binary files /dev/null and b/textures/aus_coolabah_leaves.png differ diff --git a/textures/aus_coolabah_tree.png b/textures/aus_coolabah_tree.png new file mode 100644 index 0000000..45095e1 Binary files /dev/null and b/textures/aus_coolabah_tree.png differ diff --git a/textures/aus_coolabah_treetop.png b/textures/aus_coolabah_treetop.png new file mode 100644 index 0000000..dab1a4f Binary files /dev/null and b/textures/aus_coolabah_treetop.png differ diff --git a/textures/aus_coolabah_wood.png b/textures/aus_coolabah_wood.png new file mode 100644 index 0000000..a0c3504 Binary files /dev/null and b/textures/aus_coolabah_wood.png differ diff --git a/textures/aus_couch_honeypot.png b/textures/aus_couch_honeypot.png new file mode 100644 index 0000000..7ad5881 Binary files /dev/null and b/textures/aus_couch_honeypot.png differ diff --git a/textures/aus_daintree_stringybark_leaves.png b/textures/aus_daintree_stringybark_leaves.png new file mode 100644 index 0000000..9696e4c Binary files /dev/null and b/textures/aus_daintree_stringybark_leaves.png differ diff --git a/textures/aus_daintree_stringybark_tree.png b/textures/aus_daintree_stringybark_tree.png new file mode 100644 index 0000000..46978a2 Binary files /dev/null and b/textures/aus_daintree_stringybark_tree.png differ diff --git a/textures/aus_daintree_stringybark_treetop.png b/textures/aus_daintree_stringybark_treetop.png new file mode 100644 index 0000000..d703d7d Binary files /dev/null and b/textures/aus_daintree_stringybark_treetop.png differ diff --git a/textures/aus_daintree_stringybark_wood.png b/textures/aus_daintree_stringybark_wood.png new file mode 100644 index 0000000..c6774ea Binary files /dev/null and b/textures/aus_daintree_stringybark_wood.png differ diff --git a/textures/aus_darling_lily.png b/textures/aus_darling_lily.png new file mode 100644 index 0000000..c937ea8 Binary files /dev/null and b/textures/aus_darling_lily.png differ diff --git a/textures/aus_darwin_woollybutt_leaves.png b/textures/aus_darwin_woollybutt_leaves.png new file mode 100644 index 0000000..8259364 Binary files /dev/null and b/textures/aus_darwin_woollybutt_leaves.png differ diff --git a/textures/aus_darwin_woollybutt_tree.png b/textures/aus_darwin_woollybutt_tree.png new file mode 100644 index 0000000..1c13930 Binary files /dev/null and b/textures/aus_darwin_woollybutt_tree.png differ diff --git a/textures/aus_darwin_woollybutt_treetop.png b/textures/aus_darwin_woollybutt_treetop.png new file mode 100644 index 0000000..5da21da Binary files /dev/null and b/textures/aus_darwin_woollybutt_treetop.png differ diff --git a/textures/aus_darwin_woollybutt_wood.png b/textures/aus_darwin_woollybutt_wood.png new file mode 100644 index 0000000..535e8cb Binary files /dev/null and b/textures/aus_darwin_woollybutt_wood.png differ diff --git a/textures/aus_desert_oak_leaves.png b/textures/aus_desert_oak_leaves.png new file mode 100644 index 0000000..f168f4f Binary files /dev/null and b/textures/aus_desert_oak_leaves.png differ diff --git a/textures/aus_desert_oak_tree.png b/textures/aus_desert_oak_tree.png new file mode 100644 index 0000000..62f66a2 Binary files /dev/null and b/textures/aus_desert_oak_tree.png differ diff --git a/textures/aus_desert_oak_treetop.png b/textures/aus_desert_oak_treetop.png new file mode 100644 index 0000000..5ac5a44 Binary files /dev/null and b/textures/aus_desert_oak_treetop.png differ diff --git a/textures/aus_desert_oak_wood.png b/textures/aus_desert_oak_wood.png new file mode 100644 index 0000000..38e8092 Binary files /dev/null and b/textures/aus_desert_oak_wood.png differ diff --git a/textures/aus_eucalyptus_sapling.png b/textures/aus_eucalyptus_sapling.png new file mode 100644 index 0000000..87576c2 Binary files /dev/null and b/textures/aus_eucalyptus_sapling.png differ diff --git a/textures/aus_fan_palm_leaves.png b/textures/aus_fan_palm_leaves.png new file mode 100644 index 0000000..a3f1662 Binary files /dev/null and b/textures/aus_fan_palm_leaves.png differ diff --git a/textures/aus_fan_palm_tree.png b/textures/aus_fan_palm_tree.png new file mode 100644 index 0000000..87a88e1 Binary files /dev/null and b/textures/aus_fan_palm_tree.png differ diff --git a/textures/aus_fan_palm_treetop.png b/textures/aus_fan_palm_treetop.png new file mode 100644 index 0000000..d5834c2 Binary files /dev/null and b/textures/aus_fan_palm_treetop.png differ diff --git a/textures/aus_fan_palm_wood.png b/textures/aus_fan_palm_wood.png new file mode 100644 index 0000000..0d16e26 Binary files /dev/null and b/textures/aus_fan_palm_wood.png differ diff --git a/textures/aus_fig_sapling.png b/textures/aus_fig_sapling.png new file mode 100644 index 0000000..092951b Binary files /dev/null and b/textures/aus_fig_sapling.png differ diff --git a/textures/aus_golden_wattle_leaves.png b/textures/aus_golden_wattle_leaves.png new file mode 100644 index 0000000..fb785c1 Binary files /dev/null and b/textures/aus_golden_wattle_leaves.png differ diff --git a/textures/aus_golden_wattle_tree.png b/textures/aus_golden_wattle_tree.png new file mode 100644 index 0000000..9ef788e Binary files /dev/null and b/textures/aus_golden_wattle_tree.png differ diff --git a/textures/aus_golden_wattle_treetop.png b/textures/aus_golden_wattle_treetop.png new file mode 100644 index 0000000..a2251c0 Binary files /dev/null and b/textures/aus_golden_wattle_treetop.png differ diff --git a/textures/aus_golden_wattle_wood.png b/textures/aus_golden_wattle_wood.png new file mode 100644 index 0000000..afb384e Binary files /dev/null and b/textures/aus_golden_wattle_wood.png differ diff --git a/textures/aus_grey_mangrove_leaves.png b/textures/aus_grey_mangrove_leaves.png new file mode 100644 index 0000000..ffbcb08 Binary files /dev/null and b/textures/aus_grey_mangrove_leaves.png differ diff --git a/textures/aus_grey_mangrove_tree.png b/textures/aus_grey_mangrove_tree.png new file mode 100644 index 0000000..c3017b0 Binary files /dev/null and b/textures/aus_grey_mangrove_tree.png differ diff --git a/textures/aus_grey_mangrove_treetop.png b/textures/aus_grey_mangrove_treetop.png new file mode 100644 index 0000000..8fc6d02 Binary files /dev/null and b/textures/aus_grey_mangrove_treetop.png differ diff --git a/textures/aus_grey_mangrove_wood.png b/textures/aus_grey_mangrove_wood.png new file mode 100644 index 0000000..f97681d Binary files /dev/null and b/textures/aus_grey_mangrove_wood.png differ diff --git a/textures/aus_huon_pine_leaves.png b/textures/aus_huon_pine_leaves.png new file mode 100644 index 0000000..93cf407 Binary files /dev/null and b/textures/aus_huon_pine_leaves.png differ diff --git a/textures/aus_huon_pine_tree.png b/textures/aus_huon_pine_tree.png new file mode 100644 index 0000000..05f3c7e Binary files /dev/null and b/textures/aus_huon_pine_tree.png differ diff --git a/textures/aus_huon_pine_treetop.png b/textures/aus_huon_pine_treetop.png new file mode 100644 index 0000000..ea415e9 Binary files /dev/null and b/textures/aus_huon_pine_treetop.png differ diff --git a/textures/aus_huon_pine_wood.png b/textures/aus_huon_pine_wood.png new file mode 100644 index 0000000..a2fa283 Binary files /dev/null and b/textures/aus_huon_pine_wood.png differ diff --git a/textures/aus_illawarra_flame_leaves.png b/textures/aus_illawarra_flame_leaves.png new file mode 100644 index 0000000..e152789 Binary files /dev/null and b/textures/aus_illawarra_flame_leaves.png differ diff --git a/textures/aus_illawarra_flame_sapling.png b/textures/aus_illawarra_flame_sapling.png new file mode 100644 index 0000000..0315f10 Binary files /dev/null and b/textures/aus_illawarra_flame_sapling.png differ diff --git a/textures/aus_illawarra_flame_tree.png b/textures/aus_illawarra_flame_tree.png new file mode 100644 index 0000000..e858244 Binary files /dev/null and b/textures/aus_illawarra_flame_tree.png differ diff --git a/textures/aus_illawarra_flame_treetop.png b/textures/aus_illawarra_flame_treetop.png new file mode 100644 index 0000000..b919c21 Binary files /dev/null and b/textures/aus_illawarra_flame_treetop.png differ diff --git a/textures/aus_illawarra_flame_wood.png b/textures/aus_illawarra_flame_wood.png new file mode 100644 index 0000000..b24f9cb Binary files /dev/null and b/textures/aus_illawarra_flame_wood.png differ diff --git a/textures/aus_jarrah_leaves.png b/textures/aus_jarrah_leaves.png new file mode 100644 index 0000000..ddea5c4 Binary files /dev/null and b/textures/aus_jarrah_leaves.png differ diff --git a/textures/aus_jarrah_tree.png b/textures/aus_jarrah_tree.png new file mode 100644 index 0000000..b438bce Binary files /dev/null and b/textures/aus_jarrah_tree.png differ diff --git a/textures/aus_jarrah_treetop.png b/textures/aus_jarrah_treetop.png new file mode 100644 index 0000000..b5ebd64 Binary files /dev/null and b/textures/aus_jarrah_treetop.png differ diff --git a/textures/aus_jarrah_wood.png b/textures/aus_jarrah_wood.png new file mode 100644 index 0000000..f9e61e7 Binary files /dev/null and b/textures/aus_jarrah_wood.png differ diff --git a/textures/aus_karri_leaves.png b/textures/aus_karri_leaves.png new file mode 100644 index 0000000..d58fa8a Binary files /dev/null and b/textures/aus_karri_leaves.png differ diff --git a/textures/aus_karri_tree.png b/textures/aus_karri_tree.png new file mode 100644 index 0000000..86bba4c Binary files /dev/null and b/textures/aus_karri_tree.png differ diff --git a/textures/aus_karri_treetop.png b/textures/aus_karri_treetop.png new file mode 100644 index 0000000..647c5b6 Binary files /dev/null and b/textures/aus_karri_treetop.png differ diff --git a/textures/aus_karri_wood.png b/textures/aus_karri_wood.png new file mode 100644 index 0000000..ea91a7b Binary files /dev/null and b/textures/aus_karri_wood.png differ diff --git a/textures/aus_lemon_eucalyptus_leaves.png b/textures/aus_lemon_eucalyptus_leaves.png new file mode 100644 index 0000000..b9ffe13 Binary files /dev/null and b/textures/aus_lemon_eucalyptus_leaves.png differ diff --git a/textures/aus_lemon_eucalyptus_tree.png b/textures/aus_lemon_eucalyptus_tree.png new file mode 100644 index 0000000..6236a3a Binary files /dev/null and b/textures/aus_lemon_eucalyptus_tree.png differ diff --git a/textures/aus_lemon_eucalyptus_treetop.png b/textures/aus_lemon_eucalyptus_treetop.png new file mode 100644 index 0000000..6585471 Binary files /dev/null and b/textures/aus_lemon_eucalyptus_treetop.png differ diff --git a/textures/aus_lemon_eucalyptus_wood.png b/textures/aus_lemon_eucalyptus_wood.png new file mode 100644 index 0000000..b44558f Binary files /dev/null and b/textures/aus_lemon_eucalyptus_wood.png differ diff --git a/textures/aus_lemon_myrtle_leaves.png b/textures/aus_lemon_myrtle_leaves.png new file mode 100644 index 0000000..5c47d8b Binary files /dev/null and b/textures/aus_lemon_myrtle_leaves.png differ diff --git a/textures/aus_lemon_myrtle_tree.png b/textures/aus_lemon_myrtle_tree.png new file mode 100644 index 0000000..809d9ad Binary files /dev/null and b/textures/aus_lemon_myrtle_tree.png differ diff --git a/textures/aus_lemon_myrtle_treetop.png b/textures/aus_lemon_myrtle_treetop.png new file mode 100644 index 0000000..7ce1f76 Binary files /dev/null and b/textures/aus_lemon_myrtle_treetop.png differ diff --git a/textures/aus_lemon_myrtle_wood.png b/textures/aus_lemon_myrtle_wood.png new file mode 100644 index 0000000..f6321fe Binary files /dev/null and b/textures/aus_lemon_myrtle_wood.png differ diff --git a/textures/aus_lilly_pilly_berries.png b/textures/aus_lilly_pilly_berries.png new file mode 100644 index 0000000..8fde89d Binary files /dev/null and b/textures/aus_lilly_pilly_berries.png differ diff --git a/textures/aus_lilly_pilly_leaves.png b/textures/aus_lilly_pilly_leaves.png new file mode 100644 index 0000000..fe08e3a Binary files /dev/null and b/textures/aus_lilly_pilly_leaves.png differ diff --git a/textures/aus_lilly_pilly_tree.png b/textures/aus_lilly_pilly_tree.png new file mode 100644 index 0000000..b5996bb Binary files /dev/null and b/textures/aus_lilly_pilly_tree.png differ diff --git a/textures/aus_lilly_pilly_treetop.png b/textures/aus_lilly_pilly_treetop.png new file mode 100644 index 0000000..1edc45d Binary files /dev/null and b/textures/aus_lilly_pilly_treetop.png differ diff --git a/textures/aus_lilly_pilly_wood.png b/textures/aus_lilly_pilly_wood.png new file mode 100644 index 0000000..46c6c03 Binary files /dev/null and b/textures/aus_lilly_pilly_wood.png differ diff --git a/textures/aus_macadamia.png b/textures/aus_macadamia.png new file mode 100644 index 0000000..f07a4e6 Binary files /dev/null and b/textures/aus_macadamia.png differ diff --git a/textures/aus_macadamia_leaves.png b/textures/aus_macadamia_leaves.png new file mode 100644 index 0000000..a479587 Binary files /dev/null and b/textures/aus_macadamia_leaves.png differ diff --git a/textures/aus_macadamia_sapling.png b/textures/aus_macadamia_sapling.png new file mode 100644 index 0000000..596c9cd Binary files /dev/null and b/textures/aus_macadamia_sapling.png differ diff --git a/textures/aus_macadamia_tree.png b/textures/aus_macadamia_tree.png new file mode 100644 index 0000000..d381108 Binary files /dev/null and b/textures/aus_macadamia_tree.png differ diff --git a/textures/aus_macadamia_treetop.png b/textures/aus_macadamia_treetop.png new file mode 100644 index 0000000..31b9218 Binary files /dev/null and b/textures/aus_macadamia_treetop.png differ diff --git a/textures/aus_macadamia_wood.png b/textures/aus_macadamia_wood.png new file mode 100644 index 0000000..8854c08 Binary files /dev/null and b/textures/aus_macadamia_wood.png differ diff --git a/textures/aus_mangrove_apple.png b/textures/aus_mangrove_apple.png new file mode 100644 index 0000000..c46ee14 Binary files /dev/null and b/textures/aus_mangrove_apple.png differ diff --git a/textures/aus_mangrove_apple_leaves.png b/textures/aus_mangrove_apple_leaves.png new file mode 100644 index 0000000..b465ec0 Binary files /dev/null and b/textures/aus_mangrove_apple_leaves.png differ diff --git a/textures/aus_mangrove_apple_sapling.png b/textures/aus_mangrove_apple_sapling.png new file mode 100644 index 0000000..86723f2 Binary files /dev/null and b/textures/aus_mangrove_apple_sapling.png differ diff --git a/textures/aus_mangrove_apple_tree.png b/textures/aus_mangrove_apple_tree.png new file mode 100644 index 0000000..c8bd3c1 Binary files /dev/null and b/textures/aus_mangrove_apple_tree.png differ diff --git a/textures/aus_mangrove_apple_treetop.png b/textures/aus_mangrove_apple_treetop.png new file mode 100644 index 0000000..b51aeb2 Binary files /dev/null and b/textures/aus_mangrove_apple_treetop.png differ diff --git a/textures/aus_mangrove_apple_wood.png b/textures/aus_mangrove_apple_wood.png new file mode 100644 index 0000000..2c81f32 Binary files /dev/null and b/textures/aus_mangrove_apple_wood.png differ diff --git a/textures/aus_mangrove_fern.png b/textures/aus_mangrove_fern.png new file mode 100644 index 0000000..cbec8a8 Binary files /dev/null and b/textures/aus_mangrove_fern.png differ diff --git a/textures/aus_mangrove_lily.png b/textures/aus_mangrove_lily.png new file mode 100644 index 0000000..ed6b804 Binary files /dev/null and b/textures/aus_mangrove_lily.png differ diff --git a/textures/aus_mangrove_mud.png b/textures/aus_mangrove_mud.png new file mode 100644 index 0000000..7a2e723 Binary files /dev/null and b/textures/aus_mangrove_mud.png differ diff --git a/textures/aus_mangrove_palm_leaf_bot.png b/textures/aus_mangrove_palm_leaf_bot.png new file mode 100644 index 0000000..0b8e3c1 Binary files /dev/null and b/textures/aus_mangrove_palm_leaf_bot.png differ diff --git a/textures/aus_mangrove_palm_leaf_top.png b/textures/aus_mangrove_palm_leaf_top.png new file mode 100644 index 0000000..e7f0d6c Binary files /dev/null and b/textures/aus_mangrove_palm_leaf_top.png differ diff --git a/textures/aus_mangrove_palm_trunk.png b/textures/aus_mangrove_palm_trunk.png new file mode 100644 index 0000000..22b226e Binary files /dev/null and b/textures/aus_mangrove_palm_trunk.png differ diff --git a/textures/aus_mangrove_sapling.png b/textures/aus_mangrove_sapling.png new file mode 100644 index 0000000..7774cce Binary files /dev/null and b/textures/aus_mangrove_sapling.png differ diff --git a/textures/aus_marri_leaves.png b/textures/aus_marri_leaves.png new file mode 100644 index 0000000..2808cc9 Binary files /dev/null and b/textures/aus_marri_leaves.png differ diff --git a/textures/aus_marri_tree.png b/textures/aus_marri_tree.png new file mode 100644 index 0000000..b4f1280 Binary files /dev/null and b/textures/aus_marri_tree.png differ diff --git a/textures/aus_marri_treetop.png b/textures/aus_marri_treetop.png new file mode 100644 index 0000000..e40e2d6 Binary files /dev/null and b/textures/aus_marri_treetop.png differ diff --git a/textures/aus_marri_wood.png b/textures/aus_marri_wood.png new file mode 100644 index 0000000..b440db6 Binary files /dev/null and b/textures/aus_marri_wood.png differ diff --git a/textures/aus_melaleuca_sapling.png b/textures/aus_melaleuca_sapling.png new file mode 100644 index 0000000..0771bb0 Binary files /dev/null and b/textures/aus_melaleuca_sapling.png differ diff --git a/textures/aus_merbau_leaves.png b/textures/aus_merbau_leaves.png new file mode 100644 index 0000000..d0ebf42 Binary files /dev/null and b/textures/aus_merbau_leaves.png differ diff --git a/textures/aus_merbau_sapling.png b/textures/aus_merbau_sapling.png new file mode 100644 index 0000000..160302d Binary files /dev/null and b/textures/aus_merbau_sapling.png differ diff --git a/textures/aus_merbau_tree.png b/textures/aus_merbau_tree.png new file mode 100644 index 0000000..f8afc44 Binary files /dev/null and b/textures/aus_merbau_tree.png differ diff --git a/textures/aus_merbau_treetop.png b/textures/aus_merbau_treetop.png new file mode 100644 index 0000000..a01a332 Binary files /dev/null and b/textures/aus_merbau_treetop.png differ diff --git a/textures/aus_merbau_wood.png b/textures/aus_merbau_wood.png new file mode 100644 index 0000000..22a9e42 Binary files /dev/null and b/textures/aus_merbau_wood.png differ diff --git a/textures/aus_mitchell_grass.png b/textures/aus_mitchell_grass.png new file mode 100644 index 0000000..b73412f Binary files /dev/null and b/textures/aus_mitchell_grass.png differ diff --git a/textures/aus_moreton_bay_fig.png b/textures/aus_moreton_bay_fig.png new file mode 100644 index 0000000..2f3625c Binary files /dev/null and b/textures/aus_moreton_bay_fig.png differ diff --git a/textures/aus_moreton_bay_fig_leaves.png b/textures/aus_moreton_bay_fig_leaves.png new file mode 100644 index 0000000..2a57fef Binary files /dev/null and b/textures/aus_moreton_bay_fig_leaves.png differ diff --git a/textures/aus_moreton_bay_fig_tree.png b/textures/aus_moreton_bay_fig_tree.png new file mode 100644 index 0000000..7c48c6b Binary files /dev/null and b/textures/aus_moreton_bay_fig_tree.png differ diff --git a/textures/aus_moreton_bay_fig_treetop.png b/textures/aus_moreton_bay_fig_treetop.png new file mode 100644 index 0000000..82ce3f3 Binary files /dev/null and b/textures/aus_moreton_bay_fig_treetop.png differ diff --git a/textures/aus_moreton_bay_fig_wood.png b/textures/aus_moreton_bay_fig_wood.png new file mode 100644 index 0000000..d96a6d1 Binary files /dev/null and b/textures/aus_moreton_bay_fig_wood.png differ diff --git a/textures/aus_moss.png b/textures/aus_moss.png new file mode 100644 index 0000000..5ffe58f Binary files /dev/null and b/textures/aus_moss.png differ diff --git a/textures/aus_moss_fungus.png b/textures/aus_moss_fungus.png new file mode 100644 index 0000000..fcd4ae2 Binary files /dev/null and b/textures/aus_moss_fungus.png differ diff --git a/textures/aus_muddy_river_water_flowing.png b/textures/aus_muddy_river_water_flowing.png new file mode 100644 index 0000000..5ff826d Binary files /dev/null and b/textures/aus_muddy_river_water_flowing.png differ diff --git a/textures/aus_muddy_river_water_source.png b/textures/aus_muddy_river_water_source.png new file mode 100644 index 0000000..5701921 Binary files /dev/null and b/textures/aus_muddy_river_water_source.png differ diff --git a/textures/aus_mulga_leaves.png b/textures/aus_mulga_leaves.png new file mode 100644 index 0000000..7551514 Binary files /dev/null and b/textures/aus_mulga_leaves.png differ diff --git a/textures/aus_mulga_tree.png b/textures/aus_mulga_tree.png new file mode 100644 index 0000000..2c71d21 Binary files /dev/null and b/textures/aus_mulga_tree.png differ diff --git a/textures/aus_mulga_treetop.png b/textures/aus_mulga_treetop.png new file mode 100644 index 0000000..4606098 Binary files /dev/null and b/textures/aus_mulga_treetop.png differ diff --git a/textures/aus_mulga_wood.png b/textures/aus_mulga_wood.png new file mode 100644 index 0000000..c0fd30b Binary files /dev/null and b/textures/aus_mulga_wood.png differ diff --git a/textures/aus_myrtle_sapling.png b/textures/aus_myrtle_sapling.png new file mode 100644 index 0000000..8aa33c9 Binary files /dev/null and b/textures/aus_myrtle_sapling.png differ diff --git a/textures/aus_palm_sapling.png b/textures/aus_palm_sapling.png new file mode 100644 index 0000000..f266d82 Binary files /dev/null and b/textures/aus_palm_sapling.png differ diff --git a/textures/aus_paperbark_leaves.png b/textures/aus_paperbark_leaves.png new file mode 100644 index 0000000..a741377 Binary files /dev/null and b/textures/aus_paperbark_leaves.png differ diff --git a/textures/aus_paperbark_tree.png b/textures/aus_paperbark_tree.png new file mode 100644 index 0000000..3e46efd Binary files /dev/null and b/textures/aus_paperbark_tree.png differ diff --git a/textures/aus_paperbark_treetop.png b/textures/aus_paperbark_treetop.png new file mode 100644 index 0000000..c95056a Binary files /dev/null and b/textures/aus_paperbark_treetop.png differ diff --git a/textures/aus_paperbark_wood.png b/textures/aus_paperbark_wood.png new file mode 100644 index 0000000..06069ff Binary files /dev/null and b/textures/aus_paperbark_wood.png differ diff --git a/textures/aus_pine_sapling.png b/textures/aus_pine_sapling.png new file mode 100644 index 0000000..fcdb52a Binary files /dev/null and b/textures/aus_pine_sapling.png differ diff --git a/textures/aus_quandong.png b/textures/aus_quandong.png new file mode 100644 index 0000000..05c793c Binary files /dev/null and b/textures/aus_quandong.png differ diff --git a/textures/aus_quandong_leaves.png b/textures/aus_quandong_leaves.png new file mode 100644 index 0000000..fb33568 Binary files /dev/null and b/textures/aus_quandong_leaves.png differ diff --git a/textures/aus_quandong_sapling.png b/textures/aus_quandong_sapling.png new file mode 100644 index 0000000..5cceb1c Binary files /dev/null and b/textures/aus_quandong_sapling.png differ diff --git a/textures/aus_quandong_tree.png b/textures/aus_quandong_tree.png new file mode 100644 index 0000000..20301c0 Binary files /dev/null and b/textures/aus_quandong_tree.png differ diff --git a/textures/aus_quandong_treetop.png b/textures/aus_quandong_treetop.png new file mode 100644 index 0000000..e1adb25 Binary files /dev/null and b/textures/aus_quandong_treetop.png differ diff --git a/textures/aus_quandong_wood.png b/textures/aus_quandong_wood.png new file mode 100644 index 0000000..cf81ca8 Binary files /dev/null and b/textures/aus_quandong_wood.png differ diff --git a/textures/aus_red_bottlebrush_leaves.png b/textures/aus_red_bottlebrush_leaves.png new file mode 100644 index 0000000..4c05a30 Binary files /dev/null and b/textures/aus_red_bottlebrush_leaves.png differ diff --git a/textures/aus_red_bottlebrush_tree.png b/textures/aus_red_bottlebrush_tree.png new file mode 100644 index 0000000..8818c3e Binary files /dev/null and b/textures/aus_red_bottlebrush_tree.png differ diff --git a/textures/aus_red_bottlebrush_treetop.png b/textures/aus_red_bottlebrush_treetop.png new file mode 100644 index 0000000..1839c64 Binary files /dev/null and b/textures/aus_red_bottlebrush_treetop.png differ diff --git a/textures/aus_red_bottlebrush_wood.png b/textures/aus_red_bottlebrush_wood.png new file mode 100644 index 0000000..ff48f28 Binary files /dev/null and b/textures/aus_red_bottlebrush_wood.png differ diff --git a/textures/aus_red_cobble.png b/textures/aus_red_cobble.png new file mode 100644 index 0000000..192e347 Binary files /dev/null and b/textures/aus_red_cobble.png differ diff --git a/textures/aus_red_dirt.png b/textures/aus_red_dirt.png new file mode 100644 index 0000000..eee8ac4 Binary files /dev/null and b/textures/aus_red_dirt.png differ diff --git a/textures/aus_red_gravel.png b/textures/aus_red_gravel.png new file mode 100644 index 0000000..115ac24 Binary files /dev/null and b/textures/aus_red_gravel.png differ diff --git a/textures/aus_red_sand.png b/textures/aus_red_sand.png new file mode 100644 index 0000000..bd5dc88 Binary files /dev/null and b/textures/aus_red_sand.png differ diff --git a/textures/aus_red_stone.png b/textures/aus_red_stone.png new file mode 100644 index 0000000..04994cb Binary files /dev/null and b/textures/aus_red_stone.png differ diff --git a/textures/aus_red_stonebrick.png b/textures/aus_red_stonebrick.png new file mode 100644 index 0000000..8de8a25 Binary files /dev/null and b/textures/aus_red_stonebrick.png differ diff --git a/textures/aus_river_oak_leaves.png b/textures/aus_river_oak_leaves.png new file mode 100644 index 0000000..b08b381 Binary files /dev/null and b/textures/aus_river_oak_leaves.png differ diff --git a/textures/aus_river_oak_tree.png b/textures/aus_river_oak_tree.png new file mode 100644 index 0000000..2ea1b7b Binary files /dev/null and b/textures/aus_river_oak_tree.png differ diff --git a/textures/aus_river_oak_treetop.png b/textures/aus_river_oak_treetop.png new file mode 100644 index 0000000..aede97e Binary files /dev/null and b/textures/aus_river_oak_treetop.png differ diff --git a/textures/aus_river_oak_wood.png b/textures/aus_river_oak_wood.png new file mode 100644 index 0000000..38e8092 Binary files /dev/null and b/textures/aus_river_oak_wood.png differ diff --git a/textures/aus_river_red_gum_leaves.png b/textures/aus_river_red_gum_leaves.png new file mode 100644 index 0000000..072bbff Binary files /dev/null and b/textures/aus_river_red_gum_leaves.png differ diff --git a/textures/aus_river_red_gum_tree.png b/textures/aus_river_red_gum_tree.png new file mode 100644 index 0000000..3d4c745 Binary files /dev/null and b/textures/aus_river_red_gum_tree.png differ diff --git a/textures/aus_river_red_gum_treetop.png b/textures/aus_river_red_gum_treetop.png new file mode 100644 index 0000000..1e394e1 Binary files /dev/null and b/textures/aus_river_red_gum_treetop.png differ diff --git a/textures/aus_river_red_gum_wood.png b/textures/aus_river_red_gum_wood.png new file mode 100644 index 0000000..40d1ca7 Binary files /dev/null and b/textures/aus_river_red_gum_wood.png differ diff --git a/textures/aus_rottnest_island_pine_leaves.png b/textures/aus_rottnest_island_pine_leaves.png new file mode 100644 index 0000000..7840423 Binary files /dev/null and b/textures/aus_rottnest_island_pine_leaves.png differ diff --git a/textures/aus_rottnest_island_pine_tree.png b/textures/aus_rottnest_island_pine_tree.png new file mode 100644 index 0000000..09d4892 Binary files /dev/null and b/textures/aus_rottnest_island_pine_tree.png differ diff --git a/textures/aus_rottnest_island_pine_treetop.png b/textures/aus_rottnest_island_pine_treetop.png new file mode 100644 index 0000000..dfdd9d4 Binary files /dev/null and b/textures/aus_rottnest_island_pine_treetop.png differ diff --git a/textures/aus_rottnest_island_pine_wood.png b/textures/aus_rottnest_island_pine_wood.png new file mode 100644 index 0000000..dbe0042 Binary files /dev/null and b/textures/aus_rottnest_island_pine_wood.png differ diff --git a/textures/aus_saltbush.png b/textures/aus_saltbush.png new file mode 100644 index 0000000..d075f4e Binary files /dev/null and b/textures/aus_saltbush.png differ diff --git a/textures/aus_scribbly_gum_leaves.png b/textures/aus_scribbly_gum_leaves.png new file mode 100644 index 0000000..2c05964 Binary files /dev/null and b/textures/aus_scribbly_gum_leaves.png differ diff --git a/textures/aus_scribbly_gum_tree.png b/textures/aus_scribbly_gum_tree.png new file mode 100644 index 0000000..3f60535 Binary files /dev/null and b/textures/aus_scribbly_gum_tree.png differ diff --git a/textures/aus_scribbly_gum_treetop.png b/textures/aus_scribbly_gum_treetop.png new file mode 100644 index 0000000..dd408aa Binary files /dev/null and b/textures/aus_scribbly_gum_treetop.png differ diff --git a/textures/aus_scribbly_gum_wood.png b/textures/aus_scribbly_gum_wood.png new file mode 100644 index 0000000..5ae120c Binary files /dev/null and b/textures/aus_scribbly_gum_wood.png differ diff --git a/textures/aus_shoestring_acacia_leaves.png b/textures/aus_shoestring_acacia_leaves.png new file mode 100644 index 0000000..2e40225 Binary files /dev/null and b/textures/aus_shoestring_acacia_leaves.png differ diff --git a/textures/aus_shoestring_acacia_tree.png b/textures/aus_shoestring_acacia_tree.png new file mode 100644 index 0000000..8e6e88c Binary files /dev/null and b/textures/aus_shoestring_acacia_tree.png differ diff --git a/textures/aus_shoestring_acacia_treetop.png b/textures/aus_shoestring_acacia_treetop.png new file mode 100644 index 0000000..793da08 Binary files /dev/null and b/textures/aus_shoestring_acacia_treetop.png differ diff --git a/textures/aus_shoestring_acacia_wood.png b/textures/aus_shoestring_acacia_wood.png new file mode 100644 index 0000000..658e64b Binary files /dev/null and b/textures/aus_shoestring_acacia_wood.png differ diff --git a/textures/aus_silver_daisy.png b/textures/aus_silver_daisy.png new file mode 100644 index 0000000..2233617 Binary files /dev/null and b/textures/aus_silver_daisy.png differ diff --git a/textures/aus_snow_gum_leaves.png b/textures/aus_snow_gum_leaves.png new file mode 100644 index 0000000..be91e81 Binary files /dev/null and b/textures/aus_snow_gum_leaves.png differ diff --git a/textures/aus_snow_gum_tree.png b/textures/aus_snow_gum_tree.png new file mode 100644 index 0000000..64ae5b2 Binary files /dev/null and b/textures/aus_snow_gum_tree.png differ diff --git a/textures/aus_snow_gum_treetop.png b/textures/aus_snow_gum_treetop.png new file mode 100644 index 0000000..39753ed Binary files /dev/null and b/textures/aus_snow_gum_treetop.png differ diff --git a/textures/aus_snow_gum_wood.png b/textures/aus_snow_gum_wood.png new file mode 100644 index 0000000..4c909c8 Binary files /dev/null and b/textures/aus_snow_gum_wood.png differ diff --git a/textures/aus_southern_sassafras_leaves.png b/textures/aus_southern_sassafras_leaves.png new file mode 100644 index 0000000..33ba6b8 Binary files /dev/null and b/textures/aus_southern_sassafras_leaves.png differ diff --git a/textures/aus_southern_sassafras_tree.png b/textures/aus_southern_sassafras_tree.png new file mode 100644 index 0000000..e8ee816 Binary files /dev/null and b/textures/aus_southern_sassafras_tree.png differ diff --git a/textures/aus_southern_sassafras_treetop.png b/textures/aus_southern_sassafras_treetop.png new file mode 100644 index 0000000..c803310 Binary files /dev/null and b/textures/aus_southern_sassafras_treetop.png differ diff --git a/textures/aus_southern_sassafras_wood.png b/textures/aus_southern_sassafras_wood.png new file mode 100644 index 0000000..987bce7 Binary files /dev/null and b/textures/aus_southern_sassafras_wood.png differ diff --git a/textures/aus_spinifex.png b/textures/aus_spinifex.png new file mode 100644 index 0000000..c203992 Binary files /dev/null and b/textures/aus_spinifex.png differ diff --git a/textures/aus_staghorn_coral_blue.png b/textures/aus_staghorn_coral_blue.png new file mode 100644 index 0000000..f7a8023 Binary files /dev/null and b/textures/aus_staghorn_coral_blue.png differ diff --git a/textures/aus_staghorn_coral_pink.png b/textures/aus_staghorn_coral_pink.png new file mode 100644 index 0000000..c272574 Binary files /dev/null and b/textures/aus_staghorn_coral_pink.png differ diff --git a/textures/aus_staghorn_coral_purple.png b/textures/aus_staghorn_coral_purple.png new file mode 100644 index 0000000..33cd2be Binary files /dev/null and b/textures/aus_staghorn_coral_purple.png differ diff --git a/textures/aus_staghorn_coral_yellow.png b/textures/aus_staghorn_coral_yellow.png new file mode 100644 index 0000000..306debe Binary files /dev/null and b/textures/aus_staghorn_coral_yellow.png differ diff --git a/textures/aus_stilted_mangrove_leaves.png b/textures/aus_stilted_mangrove_leaves.png new file mode 100644 index 0000000..7593ed2 Binary files /dev/null and b/textures/aus_stilted_mangrove_leaves.png differ diff --git a/textures/aus_stilted_mangrove_tree.png b/textures/aus_stilted_mangrove_tree.png new file mode 100644 index 0000000..17bd35c Binary files /dev/null and b/textures/aus_stilted_mangrove_tree.png differ diff --git a/textures/aus_stilted_mangrove_treetop.png b/textures/aus_stilted_mangrove_treetop.png new file mode 100644 index 0000000..3a8632a Binary files /dev/null and b/textures/aus_stilted_mangrove_treetop.png differ diff --git a/textures/aus_stilted_mangrove_wood.png b/textures/aus_stilted_mangrove_wood.png new file mode 100644 index 0000000..c7c1165 Binary files /dev/null and b/textures/aus_stilted_mangrove_wood.png differ diff --git a/textures/aus_sugar_gum_leaves.png b/textures/aus_sugar_gum_leaves.png new file mode 100644 index 0000000..9433be8 Binary files /dev/null and b/textures/aus_sugar_gum_leaves.png differ diff --git a/textures/aus_sugar_gum_tree.png b/textures/aus_sugar_gum_tree.png new file mode 100644 index 0000000..a1db568 Binary files /dev/null and b/textures/aus_sugar_gum_tree.png differ diff --git a/textures/aus_sugar_gum_treetop.png b/textures/aus_sugar_gum_treetop.png new file mode 100644 index 0000000..c87d3d1 Binary files /dev/null and b/textures/aus_sugar_gum_treetop.png differ diff --git a/textures/aus_sugar_gum_wood.png b/textures/aus_sugar_gum_wood.png new file mode 100644 index 0000000..c9d15ce Binary files /dev/null and b/textures/aus_sugar_gum_wood.png differ diff --git a/textures/aus_swamp_bloodwood_leaves.png b/textures/aus_swamp_bloodwood_leaves.png new file mode 100644 index 0000000..aa12ffa Binary files /dev/null and b/textures/aus_swamp_bloodwood_leaves.png differ diff --git a/textures/aus_swamp_bloodwood_tree.png b/textures/aus_swamp_bloodwood_tree.png new file mode 100644 index 0000000..2032c21 Binary files /dev/null and b/textures/aus_swamp_bloodwood_tree.png differ diff --git a/textures/aus_swamp_bloodwood_treetop.png b/textures/aus_swamp_bloodwood_treetop.png new file mode 100644 index 0000000..e8c9c4f Binary files /dev/null and b/textures/aus_swamp_bloodwood_treetop.png differ diff --git a/textures/aus_swamp_bloodwood_wood.png b/textures/aus_swamp_bloodwood_wood.png new file mode 100644 index 0000000..5b8236f Binary files /dev/null and b/textures/aus_swamp_bloodwood_wood.png differ diff --git a/textures/aus_swamp_gum_leaves.png b/textures/aus_swamp_gum_leaves.png new file mode 100644 index 0000000..23a01a4 Binary files /dev/null and b/textures/aus_swamp_gum_leaves.png differ diff --git a/textures/aus_swamp_gum_tree.png b/textures/aus_swamp_gum_tree.png new file mode 100644 index 0000000..1223f6a Binary files /dev/null and b/textures/aus_swamp_gum_tree.png differ diff --git a/textures/aus_swamp_gum_treetop.png b/textures/aus_swamp_gum_treetop.png new file mode 100644 index 0000000..b0f3394 Binary files /dev/null and b/textures/aus_swamp_gum_treetop.png differ diff --git a/textures/aus_swamp_gum_wood.png b/textures/aus_swamp_gum_wood.png new file mode 100644 index 0000000..36d3590 Binary files /dev/null and b/textures/aus_swamp_gum_wood.png differ diff --git a/textures/aus_swamp_paperbark_leaves.png b/textures/aus_swamp_paperbark_leaves.png new file mode 100644 index 0000000..c3af4ad Binary files /dev/null and b/textures/aus_swamp_paperbark_leaves.png differ diff --git a/textures/aus_swamp_paperbark_tree.png b/textures/aus_swamp_paperbark_tree.png new file mode 100644 index 0000000..4717369 Binary files /dev/null and b/textures/aus_swamp_paperbark_tree.png differ diff --git a/textures/aus_swamp_paperbark_treetop.png b/textures/aus_swamp_paperbark_treetop.png new file mode 100644 index 0000000..828a4e2 Binary files /dev/null and b/textures/aus_swamp_paperbark_treetop.png differ diff --git a/textures/aus_swamp_paperbark_wood.png b/textures/aus_swamp_paperbark_wood.png new file mode 100644 index 0000000..06069ff Binary files /dev/null and b/textures/aus_swamp_paperbark_wood.png differ diff --git a/textures/aus_tasmanian_myrtle_leaves.png b/textures/aus_tasmanian_myrtle_leaves.png new file mode 100644 index 0000000..8b0c1f4 Binary files /dev/null and b/textures/aus_tasmanian_myrtle_leaves.png differ diff --git a/textures/aus_tasmanian_myrtle_tree.png b/textures/aus_tasmanian_myrtle_tree.png new file mode 100644 index 0000000..8f54279 Binary files /dev/null and b/textures/aus_tasmanian_myrtle_tree.png differ diff --git a/textures/aus_tasmanian_myrtle_treetop.png b/textures/aus_tasmanian_myrtle_treetop.png new file mode 100644 index 0000000..5e1cad1 Binary files /dev/null and b/textures/aus_tasmanian_myrtle_treetop.png differ diff --git a/textures/aus_tasmanian_myrtle_wood.png b/textures/aus_tasmanian_myrtle_wood.png new file mode 100644 index 0000000..2006933 Binary files /dev/null and b/textures/aus_tasmanian_myrtle_wood.png differ diff --git a/textures/aus_tea_tree_leaves.png b/textures/aus_tea_tree_leaves.png new file mode 100644 index 0000000..163cde0 Binary files /dev/null and b/textures/aus_tea_tree_leaves.png differ diff --git a/textures/aus_tea_tree_tree.png b/textures/aus_tea_tree_tree.png new file mode 100644 index 0000000..cdace8a Binary files /dev/null and b/textures/aus_tea_tree_tree.png differ diff --git a/textures/aus_tea_tree_treetop.png b/textures/aus_tea_tree_treetop.png new file mode 100644 index 0000000..42a7522 Binary files /dev/null and b/textures/aus_tea_tree_treetop.png differ diff --git a/textures/aus_tea_tree_wood.png b/textures/aus_tea_tree_wood.png new file mode 100644 index 0000000..bae1a25 Binary files /dev/null and b/textures/aus_tea_tree_wood.png differ diff --git a/textures/aus_waratah.png b/textures/aus_waratah.png new file mode 100644 index 0000000..32942bf Binary files /dev/null and b/textures/aus_waratah.png differ diff --git a/textures/aus_white_box_leaves.png b/textures/aus_white_box_leaves.png new file mode 100644 index 0000000..b63bcb1 Binary files /dev/null and b/textures/aus_white_box_leaves.png differ diff --git a/textures/aus_white_box_tree.png b/textures/aus_white_box_tree.png new file mode 100644 index 0000000..2fdc124 Binary files /dev/null and b/textures/aus_white_box_tree.png differ diff --git a/textures/aus_white_box_treetop.png b/textures/aus_white_box_treetop.png new file mode 100644 index 0000000..2b1819b Binary files /dev/null and b/textures/aus_white_box_treetop.png differ diff --git a/textures/aus_white_box_wood.png b/textures/aus_white_box_wood.png new file mode 100644 index 0000000..1eaf363 Binary files /dev/null and b/textures/aus_white_box_wood.png differ diff --git a/textures/aus_wirewood_leaves.png b/textures/aus_wirewood_leaves.png new file mode 100644 index 0000000..da95b90 Binary files /dev/null and b/textures/aus_wirewood_leaves.png differ diff --git a/textures/aus_wirewood_tree.png b/textures/aus_wirewood_tree.png new file mode 100644 index 0000000..c54eab0 Binary files /dev/null and b/textures/aus_wirewood_tree.png differ diff --git a/textures/aus_wirewood_treetop.png b/textures/aus_wirewood_treetop.png new file mode 100644 index 0000000..7689772 Binary files /dev/null and b/textures/aus_wirewood_treetop.png differ diff --git a/textures/aus_wirewood_wood.png b/textures/aus_wirewood_wood.png new file mode 100644 index 0000000..66111fd Binary files /dev/null and b/textures/aus_wirewood_wood.png differ diff --git a/textures/mangrove_bucket_dirtywater.png b/textures/mangrove_bucket_dirtywater.png new file mode 100644 index 0000000..4796a99 Binary files /dev/null and b/textures/mangrove_bucket_dirtywater.png differ diff --git a/trees.lua b/trees.lua new file mode 100644 index 0000000..a3c0896 --- /dev/null +++ b/trees.lua @@ -0,0 +1,441 @@ +-- mods/australia/trees.lua + + -- Rainforest tree +function aus.generate_rainforest_tree_schematic(trunk_height, r, trunk, leaf) + local height = trunk_height * 2 + 1 + local radius = r + local width = 2 * radius + 1 + local trunk_top = height - 3 + local s = aus.schematic_array(width, height, width) + +-- roots, trunk, and extra leaves + for z = -1,1 do + for y = 1,trunk_top do + for x = -1,1 do + local i = (z+radius)*width*height + y*width + (x+radius) + 1 + if x == 0 and z == 0 then + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + elseif (x == 0 or z == 0) and y < 5 then + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + elseif y > 10 then + s.data[i].name = leaf + s.data[i].param1 = 51 + end + end + end + end + +-- canopy + for y = 1,trunk_top+4 do + if y > trunk_height and (y == trunk_top or math.random(1,height - y) == 1) then + local x, z = 0, 0 + while x == 0 and z == 0 do + x = math.random(-1,1) * 2 + z = math.random(-1,1) * 2 + end + for j = -2,2,2 do + aus.generate_canopy(s, leaf, {x=j*x, y=y, z=j*z}) + end + end + end + return s +end + + -- Fan Palm tree +function aus.generate_fanpalm_tree_schematic(trunk_height, r, trunk, leaf) + local height = trunk_height * 2 + 1 + local radius = r + local width = 2 * radius + 1 + local trunk_top = height - 3 + local s = aus.schematic_array(width, height, width) + +-- trunk + for z = -radius,radius do + for y = 1,trunk_top do + for x = -radius,radius do + local i = (z+radius)*width*height + y*width + (x+radius) + 1 + if x == 0 and z == 0 then + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + end + end + end + end + +-- canopy + for y = 1,trunk_top+1 do + if y > trunk_height and (y == trunk_top or math.random(1,height - y) == 1) then + local x, z = 0, 0 + while x == 0 and z == 0 do + x = math.random(-1,1) * 2 + z = math.random(-1,1) * 2 + end + for j = -1,1,2 do + aus.generate_canopy(s, leaf, {x=j*x, y=y, z=j*z}) + end + end + end + return s +end + -- Mangrove tree +function aus.generate_mangrove_tree_schematic(trunk_height, trunk, leaf) + local height = trunk_height * 2 + 1 + local radius = 2 + local width = 2 * radius + 1 + local trunk_top = height - 3 + local s = aus.schematic_array(width, height, width) + +-- roots, trunk, and extra leaves + for z = -1,1 do + for y = 1,trunk_top do + for x = -1,1 do + local i = (z+radius)*width*height + y*width + (x+radius) + 1 + if x == 0 and z == 0 then + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + elseif (x == 0 or z == 0) and y < 3 then + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + elseif y > 3 then + s.data[i].name = leaf + s.data[i].param1 = 50 + end + end + end + end + +-- canopy + for y = 1,trunk_top+2 do + if y > trunk_height and (y == trunk_top or math.random(1,height - y) == 1) then + local x, z = 0, 0 + while x == 0 and z == 0 do + x = math.random(-1,1) * 2 + z = math.random(-1,1) * 2 + end + for j = -1,1,2 do + aus.generate_canopy(s, leaf, {x=j*x, y=y, z=j*z}) + end + end + end + return s +end + + -- Create a canopy of leaves. +function aus.generate_canopy(s, leaf, pos) + local height = s.size.y + local width = s.size.x + local rx = math.floor(s.size.x / 2) + local rz = math.floor(s.size.z / 2) + local r1 = 4 -- leaf decay radius + local probs = {255,200,150,100,75} + + for z = -r1,r1 do + for y = 0,1 do + for x = -r1,r1 do + if x+pos.x >= -rx and x+pos.x <= rx and y+pos.y >= 0 and y+pos.y < height and z+pos.z >= -rz and z+pos.z <= rz then + local i = (z+pos.z+rz)*width*height + (y+pos.y)*width + (x+pos.x+rx) + 1 + local dist1 = math.sqrt(x^2 + y^2 + z^2) + local dist2 = math.sqrt((x+pos.x)^2 + (z+pos.z)^2) + if dist1 <= r1 then + local newprob = probs[math.max(1, math.ceil(dist1))] + if s.data[i].name == "air" then + s.data[i].name = leaf + s.data[i].param1 = newprob + elseif s.data[i].name == leaf then + s.data[i].param1 = math.max(s.data[i].param1, newprob) + end + end + end + end + end + end +end + + + -- Create a spheroid of leaves. +function aus.generate_leaves(s, leaf, pos, radius, fruit, adjust) + local height = s.size.y + local width = s.size.x + local rx = math.floor(s.size.x / 2) + local rz = math.floor(s.size.z / 2) + local r1 = math.min(3, radius) -- leaf decay radius + local probs = {255,200,150,100,75} + + for z = -r1,r1 do + for y = -r1,r1 do + for x = -r1,r1 do + if x+pos.x >= -rx and x+pos.x <= rx and y+pos.y >= 0 and y+pos.y < height and z+pos.z >= -rz and z+pos.z <= rz then + local i = (z+pos.z+rz)*width*height + (y+pos.y)*width + (x+pos.x+rx) + 1 + local dist1 = math.sqrt(x^2 + y^2 + z^2) + local dist2 = math.sqrt((x+pos.x)^2 + (z+pos.z)^2) + if dist1 <= r1 then + local newprob = probs[math.max(1, math.ceil(dist1))] + if s.data[i].name == "air" then + if fruit and (rx < 3 or dist2 / rx > 0.5) and math.random(1,10) == 1 then + s.data[i].name = fruit + s.data[i].param1 = 127 + else + s.data[i].name = leaf + s.data[i].param1 = newprob + end + elseif adjust and s.data[i].name == leaf then + s.data[i].param1 = math.max(s.data[i].param1, newprob) + end + end + end + end + end + end +end + + + -- Generic Tree +function aus.generate_tree_schematic(trunk_height, radii, trunk, leaf, fruit, limbs) + -- trunk_height refers to the amount of trunk visible below any leaves. + local height = trunk_height + radii.y * 2 + 2 + local width = 2 * radii.z + 1 + local trunk_top = height-radii.y-1 + local s = aus.schematic_array(width, height, width) + + -- the main trunk + for y = 1,trunk_top do + local i = radii.z*width*height + y*width + radii.x + 1 + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + end + + -- some leaves for free + aus.generate_leaves(s, leaf, {x=0, y=trunk_top, z=0}, radii.x, fruit) + + -- Specify a table of limb positions... + if radii.x > 3 and limbs then + for _, p in pairs(limbs) do + local i = (p.z+radii.z)*width*height + p.y*width + (p.x+radii.x) + 1 + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + aus.generate_leaves(s, leaf, p, radii.x, fruit, true) + end + -- or just do it randomly. + elseif radii.x > 3 then + for z = -radii.z,radii.z do + for y = -radii.y,radii.y do + for x = -radii.x,radii.x do + -- a smaller spheroid inside the radii + if x^2/(radii.x-3)^2 + y^2/(radii.y-3)^2 + z^2/(radii.z-3)^2 <= 1 then + if math.random(1,6) == 1 then + local i = (z+radii.z)*width*height + (y+trunk_top)*width + (x+radii.x) + 1 + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + aus.generate_leaves(s, leaf, {x=x, y=trunk_top+y, z=z}, radii.x, fruit, true) + end + end + end + end + end + end + return s +end + + -- Big Tree +function aus.generate_big_tree_schematic(trunk_height, radii, trunk, leaf, fruit, limbs) + -- trunk_height refers to the amount of trunk visible below any leaves. + local height = trunk_height + radii.y * 2 + 2 + local width = 2 * radii.z + 1 + local trunk_top = height-radii.y-1 + local s = aus.schematic_array(width, height, width) + + -- the main trunk + for y = -1,trunk_top do + local i = radii.z*width*height + y*width + radii.x + 1 + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + end + + -- wider trunk and extra leaves + for z = 0,1 do + for y = 1,trunk_top do + for x = 0,1 do + local i = (z+radii.z)*width*height + y*width + (x+radii.x) + 1 + if x == 0 and z == 0 then + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + elseif (x == 0 or z == 0) and y < trunk_height + 4 then + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + end + end + end + end + + -- some leaves for free + aus.generate_leaves(s, leaf, {x=0, y=trunk_top, z=0}, radii.x, fruit) + + -- Specify a table of limb positions... + if radii.x > 3 and limbs then + for _, p in pairs(limbs) do + local i = (p.z+radii.z)*width*height + p.y*width + (p.x+radii.x) + 1 + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + aus.generate_leaves(s, leaf, p, radii.x, fruit, true) + end + -- or just do it randomly. + elseif radii.x > 3 then + for z = -radii.z,radii.z do + for y = -radii.y,radii.y do + for x = -radii.x,radii.x do + -- a smaller spheroid inside the radii + if x^2/(radii.x-3)^2 + y^2/(radii.y-3)^2 + z^2/(radii.z-3)^2 <= 1 then + if math.random(1,6) == 1 then + local i = (z+radii.z)*width*height + (y+trunk_top)*width + (x+radii.x) + 1 + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + aus.generate_leaves(s, leaf, {x=x, y=trunk_top+y, z=z}, radii.x, fruit, true) + end + end + end + end + end + end + return s +end + + -- Giant Tree +function aus.generate_giant_tree_schematic(trunk_height, radii, trunk, leaf, fruit, limbs) + -- trunk_height refers to the amount of trunk visible below any leaves. + local height = trunk_height + radii.y * 2 + 2 + local width = 2 * radii.z + 1 + local trunk_top = height-radii.y-1 + local s = aus.schematic_array(width, height, width) + + -- the main trunk + for y = -1,trunk_top do + local i = radii.z*width*height + y*width + radii.x + 1 + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + end + + -- wider trunk and extra leaves + for z = -1,1 do + for y = 1,trunk_top do + for x = -1,1 do + local i = (z+radii.z)*width*height + y*width + (x+radii.x) + 1 + if x == 0 and z == 0 then + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + elseif (x == 0 or z == 0) and y < trunk_height + 4 then + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + end + end + end + end + + -- some leaves for free + aus.generate_leaves(s, leaf, {x=0, y=trunk_top, z=0}, radii.x, fruit) + + -- Specify a table of limb positions... + if radii.x > 3 and limbs then + for _, p in pairs(limbs) do + local i = (p.z+radii.z)*width*height + p.y*width + (p.x+radii.x) + 1 + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + aus.generate_leaves(s, leaf, p, radii.x, fruit, true) + end + -- or just do it randomly. + elseif radii.x > 3 then + for z = -radii.z,radii.z do + for y = -radii.y,radii.y do + for x = -radii.x,radii.x do + -- a smaller spheroid inside the radii + if x^2/(radii.x-3)^2 + y^2/(radii.y-3)^2 + z^2/(radii.z-3)^2 <= 1 then + if math.random(1,6) == 1 then + local i = (z+radii.z)*width*height + (y+trunk_top)*width + (x+radii.x) + 1 + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + aus.generate_leaves(s, leaf, {x=x, y=trunk_top+y, z=z}, radii.x, fruit, true) + end + end + end + end + end + end + return s +end + + -- Conifer schematic +function aus.generate_conifer_schematic(trunk_height, radius, trunk, leaf, fruit) + local height = trunk_height + radius * 3 + 2 + local width = 2 * radius + 1 + local trunk_top = height - radius - 1 + local s = aus.schematic_array(width, height, width) + + -- the main trunk + local probs = {200,150,100,75,50,25} + for z = -radius,radius do + for y = 1,trunk_top do + -- Gives it a vaguely conical shape. + local r1 = math.ceil((height - y) / 4) + -- But rounded at the bottom. + if y == trunk_height + 1 then + r1 = r1 -1 + end + + for x = -radius,radius do + local i = (z+radius)*width*height + y*width + (x+radius) + 1 + local dist = math.round(math.sqrt(x^2 + z^2)) + if x == 0 and z == 0 then + s.data[i].name = trunk + s.data[i].param1 = 255 + s.data[i].force_place = true + elseif y > trunk_height and dist <= r1 then + s.data[i].name = leaf + s.data[i].param1 = probs[dist] + end + end + end + end + + -- leaves at the top + for z = -1,1 do + for y = trunk_top, height-1 do + for x = -1,1 do + local i = (z+radius)*width*height + y*width + (x+radius) + 1 + if (x == 0 and z == 0) or y < height - 1 then + if fruit and math.random(1,10) == 1 then + s.data[i].name = fruit + s.data[i].param1 = 127 + else + s.data[i].name = leaf + end + if x == 0 and z == 0 then + s.data[i].param1 = 255 + else + s.data[i].param1 = 200 + end + end + end + end + end + return s +end + diff --git a/voxel.lua b/voxel.lua new file mode 100644 index 0000000..86f021a --- /dev/null +++ b/voxel.lua @@ -0,0 +1,249 @@ +-- mods/australia/voxel.lua + +-- This is only used to handle cases the decoration manager can't, such as +-- more ore in specific biomes. + +-- Define perlin noises used in this mapgen by default +aus.noises = {} + +-- Noise 22 : Cave blend 2D +aus.noises[22] = {offset = 0.0, scale = 0.1, spread = {x = 8, y = 8, z = 8}, seed = 4023, octaves = 2, persist = 1.0, lacunarity = 2.0} + +-- Noise 23 : Cave noise 2D +aus.noises[23] = {offset = 0.0, scale = 1.0, spread = {x = 400, y = 400, z = 400}, seed = 903, octaves = 3, persist = 0.5, lacunarity = 2.0} + +-- function to get noisemaps +function aus.noisemap(i, minp, chulens) + local obj = minetest.get_perlin_map(aus.noises[i], chulens) + if minp.z then + return obj:get3dMap_flat(minp) + else + return obj:get2dMap_flat(minp) + end +end + +-- useful function to convert a 3D pos to 2D +function pos2d(pos) + if type(pos) == "number" then + return {x = pos, y = pos} + elseif pos.z then + return {x = pos.x, y = pos.z} + else + return {x = pos.x, y = pos.y} + end +end + +-- Define content IDs +-- A content ID is a number that represents a node in the core of Minetest. +-- Every nodename has its ID. +-- The VoxelManipulator uses content IDs instead of nodenames. + +local node = {} + +local nodes = { + -- Ground nodes + {"stone", "default:stone"}, + {"dirt", "default:dirt"}, + {"sand", "default:sand"}, + + -- Liquids + {"river_water_source", "default:river_water_source"}, + {"dirty_river_water_source", "australia:dirty_river_water_source"}, + {"water_source", "default:water_source"}, + + -- Air and Ignore + {"air", "air"}, + {"ignore", "ignore"}, + + -- Resources + {"coalblock", "default:coalblock"}, + {"copper", "default:stone_with_copper"}, + {"diamond", "default:stone_with_diamond"}, + {"gold", "default:stone_with_gold"}, + {"iron", "default:stone_with_iron"}, +} + +for _, i in pairs(nodes) do + node[i[1]] = minetest.get_content_id(i[2]) +end + +local coal_biomes = {"victorian_forests", "great_dividing_range", "eastern_coasts"} +local copper_biomes = {"flinders_lofty", "gulf_of_carpentaria"} +local diamond_biomes = {"kimberley"} +local gold_biomes = {"goldfields_esperence", "victorian_forests"} +local iron_biomes = {"pilbara"} + +-- Create a table of biome ids, so I can use the biomemap. +if not aus.biome_ids then + aus.biome_ids = {} + for name, desc in pairs(minetest.registered_biomes) do + local i = minetest.get_biome_id(desc.name) + aus.biome_ids[i] = desc.name + end +end + +-- the mapgen function +function aus.generate(minp, maxp, seed) + + -- minp and maxp strings, used by logs + local minps, maxps = minetest.pos_to_string(minp), minetest.pos_to_string(maxp) + + -- The VoxelManipulator, a complicated but speedy method to set many nodes at the same time + local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") + local heightmap = minetest.get_mapgen_object("heightmap") + -- local heatmap = minetest.get_mapgen_object("heatmap") + local gennotify = minetest.get_mapgen_object("gennotify") + --print(dump(gennotify)) + local water_level = 1 + + local data = vm:get_data() -- data is the original array of content IDs (solely or mostly air) + -- Be careful: emin ≠ minp and emax ≠ maxp ! + -- The data array is not limited by minp and maxp. It exceeds it by 16 nodes in the 6 directions. + -- The real limits of data array are emin and emax. + -- The VoxelArea is used to convert a position into an index for the array. + local area = VoxelArea:new({MinEdge = emin, MaxEdge = emax}) + local ystride = area.ystride -- Tip : the ystride of a VoxelArea is the number to add to the array index to get the index of the position above. It's faster because it avoids to completely recalculate the index. + local zstride = area.zstride + + local chulens = vector.add(vector.subtract(maxp, minp), 1) -- Size of the generated area, used by noisemaps + local minp2d = pos2d(minp) + + -- The biomemap is a table of biome index numbers for each horizontal + -- location. It's created in the mapgen, and is right most of the time. + -- It's off in about 1% of cases, for various reasons. + -- Bear in mind that biomes can change from one voxel to the next. + local biomemap = minetest.get_mapgen_object("biomemap") + + -- Calculate the noise values + local n22 = aus.noisemap(22, minp2d, chulens) + local n23 = aus.noisemap(23, minp2d, chulens) + + local node_match_cache = {} + + -- the mapgen algorithm + local index_2d = 0 + local write = false + local relight = false + + for x = minp.x, maxp.x do -- for each YZ plane + for z = minp.z, maxp.z do -- for each vertical line in this plane + index_2d = index_2d + 1 + + local index_3d = area:index(x, maxp.y, z) -- index of the data array, matching the position {x, y, z} + local air_count = 0 + local ground = math.max(heightmap[index_2d], 0) - 5 + + for y = maxp.y, minp.y, -1 do -- for each node in vertical line + local index_3d_below = index_3d - ystride + local index_3d_above = index_3d + ystride + local surround = true + + -- Determine if a plant/dirt block can be placed without showing. + -- Avoid the edges of the chunk, just to make things easier. + if y < maxp.y and x > minp.x and x < maxp.x and z > minp.z and z < maxp.z and (data[index_3d] == node["sand"] or data[index_3d] == node["dirt"]) then + if data[index_3d_above] == node["river_water_source"] or data[index_3d_above] == node["water_source"] then + -- Check to make sure that a plant root is fully surrounded. + -- This is due to the kludgy way you have to make water plants + -- in minetest, to avoid bubbles. + for x1 = -1,1,2 do + local n = data[index_3d+x1] + if n == node["river_water_source"] or n == node["water_source"] or n == node["air"] then + surround = false + end + end + for z1 = -zstride,zstride,2*zstride do + local n = data[index_3d+z1] + if n == node["river_water_source"] or n == node["water_source"] or n == node["air"] then + surround = false + end + end + end + end + + -- Extra resources in ground per biome. + if y < ground and (data[index_3d] == node["air"] or data[index_3d] == node["river_water_source"] or data[index_3d] == node["dirty_river_water_source"] or data[index_3d] == node["water_source"]) then + relight = true + + local biome = aus.biome_ids[biomemap[index_2d]] + local stone_type = node["stone"] + local stone_depth = 1 + local n23_val = n23[index_2d] + n22[index_2d] + if table.contains(coal_biomes, biome) and n23_val < 0.1 then + stone_type = node["coalblock"] + stone_depth = 2 + elseif table.contains(copper_biomes, biome) and n23_val < 0.4 then + stone_type = node["copper"] + elseif table.contains(diamond_biomes, biome) and n23_val < 0.2 then + stone_type = node["diamond"] + elseif table.contains(gold_biomes, biome) and n23_val < 0.3 then + stone_type = node["gold"] + elseif table.contains(iron_biomes, biome) and n23_val < 0.6 then + stone_type = node["iron"] + else + stone_type = node["stone"] + end + + -- Change stone per biome. + if data[index_3d_below] == node["stone"] then + data[index_3d_below] = stone_type + if stone_depth == 2 then + data[index_3d_below - ystride] = stone_type + end + write = true + end + if data[index_3d_above] == node["stone"] then + data[index_3d_above] = stone_type + if stone_depth == 2 then + data[index_3d_above + ystride] = stone_type + end + write = true + end + + if data[index_3d] == node["air"] then + air_count = air_count + 1 + end + end + + if data[index_3d] ~= node["air"] then + air_count = 0 + end + index_3d = index_3d_below + end + end + end + + + -- execute voxelmanip boring stuff to write to the map... + if write then + vm:set_data(data) + end + + if write then + -- probably not necessary + if relight then + --vm:set_lighting({day = 10, night = 10}) + end + + -- This seems to be necessary to avoid lighting problems. + vm:calc_lighting() + + -- probably not necessary + --vm:update_liquids() + end + + if write then + vm:write_to_map() + end + + -- Deal with memory issues. This, of course, is supposed to be automatic. + local mem = math.floor(collectgarbage("count")/1024) + if mem > 500 then + print("MOD: Australia is manually collecting garbage as memory use has exceeded 500K.") + collectgarbage("collect") + end +end + + +-- Call the mapgen function aus.generate on mapgen. +-- (located in voxel.lua) +minetest.register_on_generated(aus.generate)