Voxelis/mods/MAPGEN/vox_overworld/registry.lua
DesertMermaid f5877a23cf
Some checks failed
Unit Tests / busted_unit_test (push) Failing after 6m42s
Error Check / luacheck_errcheck (push) Failing after 18m53s
Blah.
2024-12-12 23:59:48 -08:00

1045 lines
No EOL
31 KiB
Lua

---------------------------------------------------------------------------
-- Voxelis - Voxel survival sandbox for Luanti
-- Copyright (C) 2024 Mad Star Studio LLC
--
-- You should have received a copy of the GNU General Public License along
-- with this program; if not, see <http://www.gnu.org/licenses/>.
---------------------------------------------------------------------------
-- -------------------------------------------------------------- --
-- ALIASES
-- -------------------------------------------------------------- --
-- Aliases for map generators
-- All mapgens
minetest.register_alias("mapgen_stone", "vox_main:stone")
minetest.register_alias("mapgen_water_source", "vox_main:water_source")
minetest.register_alias("mapgen_river_water_source", "vox_main:river_water_source")
-- Additional aliases needed for mapgen v6
minetest.register_alias("mapgen_lava_source", "vox_main:lava_source")
minetest.register_alias("mapgen_dirt", "vox_main:dirt")
minetest.register_alias("mapgen_dirt_with_grass", "vox_main:dirt_with_grass")
minetest.register_alias("mapgen_sand", "vox_main:sand")
minetest.register_alias("mapgen_gravel", "vox_main:gravel")
minetest.register_alias("mapgen_desert_stone", "vox_main:desert_stone")
minetest.register_alias("mapgen_desert_sand", "vox_main:desert_sand")
minetest.register_alias("mapgen_dirt_with_snow", "vox_main:dirt_with_snow")
minetest.register_alias("mapgen_snowblock", "vox_main:snowblock")
minetest.register_alias("mapgen_snow", "vox_main:snow")
minetest.register_alias("mapgen_ice", "vox_main:ice")
minetest.register_alias("mapgen_tree", "vox_main:tree")
minetest.register_alias("mapgen_leaves", "vox_main:leaves")
minetest.register_alias("mapgen_apple", "vox_main:apple")
minetest.register_alias("mapgen_jungletree", "vox_main:jungletree")
minetest.register_alias("mapgen_jungleleaves", "vox_main:jungleleaves")
minetest.register_alias("mapgen_junglegrass", "vox_main:junglegrass")
minetest.register_alias("mapgen_pine_tree", "vox_main:pine_tree")
minetest.register_alias("mapgen_pine_needles", "vox_main:pine_needles")
minetest.register_alias("mapgen_cobble", "vox_main:cobble")
minetest.register_alias("mapgen_stair_cobble", "vox_structural:stair_cobble")
minetest.register_alias("mapgen_mossycobble", "vox_main:mossycobble")
minetest.register_alias("mapgen_stair_desert_stone", "vox_structural:stair_desert_stone")
-- -------------------------------------------------------------- --
-- BIOMES
-- -------------------------------------------------------------- --
-- Grassland
minetest.register_biome({
name = "grassland",
node_top = "vox_main:dirt_with_grass",
depth_top = 1,
node_filler = "vox_main:dirt",
depth_filler = 3,
node_stone = "vox_main:stone",
node_river_water = "vox_main:river_water_source",
node_riverbed = "vox_main:sand",
depth_riverbed = 2,
node_dungeon = "vox_main:cobble",
node_dungeon_alt = "vox_main:mossycobble",
node_dungeon_stair = "vox_main:stonebrick",
vertical_blend = 4, -- Smooth transition between biomes
y_max = 31000,
y_min = 6, -- Ensure grassland spawns above beach level
heat_point = 50,
humidity_point = 35
})
-- Forest
minetest.register_biome({
name = "forest",
node_top = "vox_main:dirt_with_grass",
depth_top = 1,
node_filler = "vox_main:dirt",
depth_filler = 3,
node_stone = "vox_main:stone",
node_river_water = "vox_main:river_water_source",
node_riverbed = "vox_main:sand",
depth_riverbed = 2,
node_dungeon = "vox_main:cobble",
node_dungeon_alt = "vox_main:mossycobble",
node_dungeon_stair = "vox_main:stonebrick",
vertical_blend = 3, -- Smooth transition between biomes
y_max = 31000,
y_min = 6, -- Ensure forest spawns above beach level
heat_point = 60,
humidity_point = 68
})
-- Desert
minetest.register_biome({
name = "desert",
node_top = "vox_main:desert_sand",
depth_top = 1,
node_filler = "vox_main:desert_sand",
depth_filler = 1,
node_stone = "vox_main:desert_stone",
node_river_water = "vox_main:river_water_source",
node_riverbed = "vox_main:sand",
depth_riverbed = 2,
node_dungeon = "vox_main:desert_stonebrick",
node_dungeon_alt = "vox_main:desert_stone",
node_dungeon_stair = "vox_main:desert_stonebrick",
vertical_blend = 3, -- Smooth transition between biomes
y_max = 31000,
y_min = 6, -- Ensure desert spawns above beach level
heat_point = 92,
humidity_point = 16
})
-- Tundra
minetest.register_biome({
name = "tundra",
node_top = "vox_main:dirt_with_snow",
depth_top = 1,
node_filler = "vox_main:dirt",
depth_filler = 3,
node_stone = "vox_main:stone",
node_water_top = "vox_main:ice",
depth_water_top = 10,
node_river_water = "vox_main:river_water_source",
node_riverbed = "vox_main:gravel",
depth_riverbed = 2,
node_dungeon = "vox_main:cobble",
node_dungeon_alt = "vox_main:mossycobble",
node_dungeon_stair = "vox_main:stonebrick",
vertical_blend = 1,
y_max = 31000,
y_min = 1, -- Ensure tundra spawns above ocean level
heat_point = 0,
humidity_point = 40
})
-- Icesheet
minetest.register_biome({
name = "icesheet",
node_dust = "vox_main:snowblock",
node_top = "vox_main:snowblock",
depth_top = 1,
node_filler = "vox_main:snowblock",
depth_filler = 3,
node_stone = "vox_main:cave_ice",
node_water_top = "vox_main:ice",
depth_water_top = 10,
node_river_water = "vox_main:ice",
node_riverbed = "vox_main:gravel",
depth_riverbed = 2,
node_dungeon = "vox_main:ice",
node_dungeon_stair = "vox_main:stonebrick",
y_max = 31000,
y_min = 1,
heat_point = 0,
humidity_point = 73
})
-- Icesheet Ocean
minetest.register_biome({
name = "icesheet_ocean",
node_dust = "vox_main:snowblock",
node_top = "vox_main:sand",
depth_top = 1,
node_filler = "vox_main:sand",
depth_filler = 3,
node_water_top = "vox_main:water_source",
depth_water_top = 10,
node_cave_liquid = "vox_main:water_source",
node_riverbed = "vox_main:gravel",
depth_riverbed = 2,
y_max = 0,
y_min = -255,
heat_point = 0,
humidity_point = 73
})
-- Tundra Under
minetest.register_biome({
name = "tundra_under",
node_cave_liquid = {"vox_main:water_source", "vox_main:lava_source"},
node_dungeon = "vox_main:cobble",
node_dungeon_alt = "vox_main:mossycobble",
node_dungeon_stair = "vox_main:stonebrick",
y_max = -1, -- Ensure tundra_under spawns below ocean level
y_min = -31000,
heat_point = 0,
humidity_point = 40
})
-- Tundra Highland
minetest.register_biome({
name = "tundra_highland",
node_dust = "vox_main:snow",
node_riverbed = "vox_main:gravel",
depth_riverbed = 2,
node_dungeon = "vox_main:cobble",
node_dungeon_alt = "vox_main:mossycobble",
node_dungeon_stair = "vox_main:stonebrick",
y_max = 31000,
y_min = 47,
heat_point = 0,
humidity_point = 40
})
-- Tundra Beach
minetest.register_biome({
name = "tundra_beach",
node_top = "vox_main:gravel",
depth_top = 1,
node_filler = "vox_main:gravel",
depth_filler = 2,
node_riverbed = "vox_main:gravel",
depth_riverbed = 2,
node_dungeon = "vox_main:cobble",
node_dungeon_alt = "vox_main:mossycobble",
node_dungeon_stair = "vox_main:stonebrick",
vertical_blend = 1,
y_max = 1,
y_min = -3,
heat_point = 0,
humidity_point = 40
})
-- Tundra Ocean
minetest.register_biome({
name = "tundra_ocean",
node_top = "vox_main:sand",
depth_top = 1,
node_filler = "vox_main:sand",
depth_filler = 3,
node_riverbed = "vox_main:gravel",
depth_riverbed = 2,
node_cave_liquid = "vox_main:water_source",
node_dungeon = "vox_main:cobble",
node_dungeon_alt = "vox_main:mossycobble",
node_dungeon_stair = "vox_main:stonebrick",
vertical_blend = 1,
y_max = 0,
y_min = -255,
heat_point = 0,
humidity_point = 40
})
-- Ocean
minetest.register_biome({
name = "ocean",
node_top = "vox_main:sand",
depth_top = 1,
node_filler = "vox_main:sand",
depth_filler = 3,
node_water_top = "vox_main:water_source",
depth_water_top = 10,
node_river_water = "vox_main:river_water_source",
node_riverbed = "vox_main:gravel",
depth_riverbed = 2,
y_min = -255,
y_max = 0, -- Ocean level at height 0
heat_point = 50,
humidity_point = 70
})
-- River
minetest.register_biome({
name = "river",
node_top = "vox_main:dirt_with_grass",
depth_top = 1,
node_filler = "vox_main:dirt",
depth_filler = 3,
node_river_water = "vox_main:river_water_source",
node_riverbed = "vox_main:sand",
depth_riverbed = 2,
y_min = -2,
y_max = 0, -- River level at height 0
heat_point = 50,
humidity_point = 70
})
-- Beach
minetest.register_biome({
name = "beach",
node_top = "vox_main:sand",
depth_top = 1,
node_filler = "vox_main:sand",
depth_filler = 3,
y_min = 0,
y_max = 5, -- Allow beach to vary in height
vertical_blend = 3, -- Smooth transition between biomes
heat_point = 50,
humidity_point = 70
})
-- Savanna
minetest.register_biome({
name = "savanna",
node_top = "vox_main:dry_dirt_with_dry_grass",
depth_top = 1,
node_filler = "vox_main:dry_dirt",
depth_filler = 3,
node_stone = "vox_main:stone",
node_river_water = "vox_main:river_water_source",
node_riverbed = "vox_main:sand",
depth_riverbed = 2,
node_dungeon = "vox_main:cobble",
node_dungeon_alt = "vox_main:mossycobble",
node_dungeon_stair = "vox_main:stonebrick",
vertical_blend = 3,
y_max = 31000,
y_min = 6,
heat_point = 85,
humidity_point = 20
})
-- Volcanic
minetest.register_biome({
name = "volcanic",
node_top = "vox_main:volcanic_rock",
depth_top = 1,
node_filler = "vox_main:ash_block",
depth_filler = 3,
node_stone = "vox_main:stone",
node_river_water = "vox_main:lava_source",
node_riverbed = "vox_main:gravel",
depth_riverbed = 2,
node_dungeon = "vox_main:cobble",
node_dungeon_alt = "vox_main:mossycobble",
node_dungeon_stair = "vox_main:stonebrick",
vertical_blend = 3,
y_max = 31000,
y_min = 6,
heat_point = 100,
humidity_point = 10
})
-- Mountain
minetest.register_biome({
name = "mountain",
node_top = "vox_main:granite",
depth_top = 1,
node_filler = "vox_main:diorite",
depth_filler = 3,
node_stone = "vox_main:andesite",
node_river_water = "vox_main:river_water_source",
node_riverbed = "vox_main:gravel",
depth_riverbed = 2,
node_dungeon = "vox_main:cobble",
node_dungeon_alt = "vox_main:mossycobble",
node_dungeon_stair = "vox_main:stonebrick",
vertical_blend = 3,
y_max = 31000,
y_min = 6,
heat_point = 30,
humidity_point = 40
})
-- Painted Mesa
minetest.register_biome({
name = "painted_mesa",
node_top = "vox_main:hardened_clay",
depth_top = 1,
node_filler = "vox_main:hardened_clay",
depth_filler = 3,
node_stone = "vox_main:stone",
node_river_water = "vox_main:river_water_source",
node_riverbed = "vox_main:sand",
depth_riverbed = 2,
node_dungeon = "vox_main:cobble",
node_dungeon_alt = "vox_main:mossycobble",
node_dungeon_stair = "vox_main:stonebrick",
vertical_blend = 3,
y_max = 31000,
y_min = 6,
heat_point = 75,
humidity_point = 25
})
-- Register terracotta layers for Painted Mesa
local colors = {"red", "orange", "yellow", "brown", "white", "light_blue", "lime", "pink"}
for _, color in ipairs(colors) do
minetest.register_biome({
name = "painted_mesa_" .. color,
node_top = "vox_main:teracotta_" .. color,
depth_top = 1,
node_filler = "vox_main:teracotta_" .. color,
depth_filler = 3,
node_stone = "vox_main:stone",
node_river_water = "vox_main:river_water_source",
node_riverbed = "vox_main:sand",
depth_riverbed = 2,
node_dungeon = "vox_main:cobble",
node_dungeon_alt = "vox_main:mossycobble",
node_dungeon_stair = "vox_main:stonebrick",
vertical_blend = 3,
y_max = 31000,
y_min = 6,
heat_point = 75,
humidity_point = 25
})
end
-- -------------------------------------------------------------- --
-- ORES
-- -------------------------------------------------------------- --
-- Granite
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:granite",
wherein = "vox_main:stone",
clust_scarcity = 180 * 180 * 180, -- Decrease scarcity to make more common
clust_num_ores = 6,
clust_size = 3,
y_min = -31000,
y_max = 31000,
biomes = {"mountains"}
})
-- Diorite
minetest.register_ore({
ore_type = "blob",
ore = "vox_main:diorite",
wherein = "vox_main:stone",
clust_scarcity = 200 * 200 * 200, -- Increase scarcity
clust_num_ores = 4,
clust_size = 3,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"grassland", "forest"} -- Restrict to specific biomes
})
-- Andesite
minetest.register_ore({
ore_type = "blob",
ore = "vox_main:andesite",
wherein = "vox_main:stone",
clust_scarcity = 200 * 200 * 200, -- Increase scarcity
clust_num_ores = 4,
clust_size = 3,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"grassland", "forest"} -- Restrict to specific biomes
})
-- Basalt
minetest.register_ore({
ore_type = "stratum",
ore = "vox_main:basalt",
wherein = "vox_main:stone",
clust_scarcity = 300 * 300 * 300, -- Increase scarcity
clust_num_ores = 2,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"tundra", "icesheet"} -- Restrict to specific biomes
})
-- Marble
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:marble",
wherein = "vox_main:stone",
clust_scarcity = 180 * 180 * 180, -- Decrease scarcity to make more common
clust_num_ores = 6,
clust_size = 3,
y_min = -31000,
y_max = 31000,
biomes = {"mountains"}
})
-- Chalk
minetest.register_ore({
ore_type = "sheet",
ore = "vox_main:chalk",
wherein = "vox_main:stone",
clust_scarcity = 220 * 220 * 220, -- Increase scarcity
clust_num_ores = 3,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"desert", "grassland"} -- Restrict to specific biomes
})
-- Limestone
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:limestone",
wherein = "vox_main:stone",
clust_scarcity = 180 * 180 * 180, -- Decrease scarcity to make more common
clust_num_ores = 6,
clust_size = 3,
y_min = -31000,
y_max = 31000,
biomes = {"mountains"}
})
-- Obsidian
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:obsidian",
wherein = "vox_main:stone",
clust_scarcity = 1000 * 1000 * 1000, -- Increase scarcity to reduce abundance
clust_num_ores = 1,
clust_size = 1,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"volcanic"} -- Restrict to specific biomes
})
-- Ores and Gems
-- Coal Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:coal_ore",
wherein = "vox_main:stone",
clust_scarcity = 60 * 60 * 60, -- Increase scarcity
clust_num_ores = 8,
clust_size = 4,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"grassland", "forest"} -- Restrict to specific biomes
})
-- Uranium Ore
minetest.register_ore({
ore_type = "vein",
ore = "vox_main:uranium_ore",
wherein = "vox_main:stone",
clust_scarcity = 900 * 900 * 900, -- Increase scarcity to reduce abundance
clust_num_ores = 2,
clust_size = 1,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"tundra", "desert"} -- Restrict to specific biomes
})
-- Bone Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:bone_ore",
wherein = "vox_main:stone",
clust_scarcity = 300 * 300 * 300, -- Increase scarcity
clust_num_ores = 3,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
})
-- Sulfur Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:sulfur_ore",
wherein = "vox_main:stone",
clust_scarcity = 300 * 300 * 300, -- Increase scarcity
clust_num_ores = 3,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"desert"} -- Restrict to specific biomes
})
-- Salt Ore
minetest.register_ore({
ore_type = "stratum",
ore = "vox_main:salt_ore",
wherein = "vox_main:stone",
clust_scarcity = 200 * 200 * 200, -- Increase scarcity
clust_num_ores = 4,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"desert"} -- Restrict to specific biomes
})
-- Copper Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:copper_ore",
wherein = "vox_main:stone",
clust_scarcity = 180 * 180 * 180, -- Increase scarcity
clust_num_ores = 6,
clust_size = 3,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"grassland"} -- Restrict to specific biomes
})
-- Tin Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:tin_ore",
wherein = "vox_main:stone",
clust_scarcity = 200 * 200 * 200, -- Increase scarcity
clust_num_ores = 6,
clust_size = 3,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"grassland"} -- Restrict to specific biomes
})
-- Iron Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:iron_ore",
wherein = "vox_main:stone",
clust_scarcity = 160 * 160 * 160, -- Increase scarcity
clust_num_ores = 6,
clust_size = 3,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"grassland", "forest"} -- Restrict to specific biomes
})
-- Gold Ore
minetest.register_ore({
ore_type = "vein",
ore = "vox_main:gold_ore",
wherein = "vox_main:stone",
clust_scarcity = 600 * 600 * 600, -- Increase scarcity to reduce abundance
clust_num_ores = 3,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"tundra", "desert"} -- Restrict to specific biomes
})
-- Silver Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:silver_ore",
wherein = "vox_main:stone",
clust_scarcity = 250 * 250 * 250, -- Increase scarcity to reduce abundance
clust_num_ores = 6,
clust_size = 3,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"grassland"} -- Restrict to specific biomes
})
-- Diamond Ore
minetest.register_ore({
ore_type = "vein",
ore = "vox_main:diamond_ore",
wherein = "vox_main:stone",
clust_scarcity = 800 * 800 * 800, -- Increase scarcity to reduce abundance
clust_num_ores = 2,
clust_size = 1,
y_min = -31000, -- Adjust for greater depth
y_max = -50, -- Adjust for greater height
biomes = {"tundra", "icesheet"} -- Restrict to specific biomes
})
-- Emerald Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:emerald_ore",
wherein = "vox_main:stone",
clust_scarcity = 450 * 450 * 450, -- Increase scarcity
clust_num_ores = 3,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"forest"} -- Restrict to specific biomes
})
-- Ruby Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:ruby_ore",
wherein = "vox_main:stone",
clust_scarcity = 450 * 450 * 450, -- Increase scarcity
clust_num_ores = 3,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"forest"} -- Restrict to specific biomes
})
-- Sapphire Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:sapphire_ore",
wherein = "vox_main:stone",
clust_scarcity = 450 * 450 * 450, -- Increase scarcity
clust_num_ores = 3,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"forest"} -- Restrict to specific biomes
})
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:topaz_ore",
wherein = "vox_main:stone",
clust_scarcity = 450 * 450 * 450, -- Increase scarcity
clust_num_ores = 3,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"desert"} -- Restrict to specific biomes
})
-- Amethyst Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:amethyst_ore",
wherein = "vox_main:stone",
clust_scarcity = 450 * 450 * 450, -- Increase scarcity
clust_num_ores = 3,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"forest"} -- Restrict to specific biomes
})
-- Opal Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:opal_ore",
wherein = "vox_main:stone",
clust_scarcity = 450 * 450 * 450, -- Increase scarcity
clust_num_ores = 3,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"grassland"} -- Restrict to specific biomes
})
-- Onyx Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:onyx_ore",
wherein = "vox_main:stone",
clust_scarcity = 450 * 450 * 450, -- Increase scarcity
clust_num_ores = 3,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"grassland"} -- Restrict to specific biomes
})
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:garnet_ore",
wherein = "vox_main:stone",
clust_scarcity = 450 * 450 * 450, -- Increase scarcity
clust_num_ores = 3,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"forest"} -- Restrict to specific biomes
})
-- Peridot Ore
minetest.register_ore({
ore_type = "scatter",
ore = "vox_main:peridot_ore",
wherein = "vox_main:stone",
clust_scarcity = 450 * 450 * 450, -- Increase scarcity
clust_num_ores = 3,
clust_size = 2,
y_min = -31000, -- Adjust for greater depth
y_max = 31000, -- Adjust for greater height
biomes = {"forest"} -- Restrict to specific biomes
})
-- -------------------------------------------------------------- --
-- DECORATIONS
-- -------------------------------------------------------------- --
-- Kelp
minetest.register_decoration({
name = "vox_main:kelp",
deco_type = "simple",
place_on = {"vox_main:sand"},
place_offset_y = -1,
sidelen = 16,
noise_params = {
offset = -0.04,
scale = 0.1,
spread = {x = 200, y = 200, z = 200},
seed = 87112,
octaves = 3,
persist = 0.7
},
biomes = {"ocean"},
y_max = 0, -- Ensure kelp can be placed up to ocean level
y_min = -10,
flags = "force_placement",
decoration = "vox_main:kelp",
param2 = 48,
param2_max = 96,
})
-- Apple Tree
minetest.register_decoration({
name = "vox_main:apple_tree",
deco_type = "schematic",
place_on = {"vox_main:dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.02,
biomes = {"grassland"},
y_max = 31000,
y_min = 1,
schematic = minetest.get_modpath("vox_main") .. "/schematics/apple_tree.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
-- Jungle Tree
minetest.register_decoration({
name = "vox_main:jungle_tree",
deco_type = "schematic",
place_on = {"vox_main:dirt_with_rainforest_litter"},
sidelen = 16,
fill_ratio = 0.02,
biomes = {"rainforest"},
y_max = 31000,
y_min = 1,
schematic = minetest.get_modpath("vox_main") .. "/schematics/jungle_tree.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
-- Pine Tree
minetest.register_decoration({
name = "vox_main:pine_tree",
deco_type = "schematic",
place_on = {"vox_main:dirt_with_snow"},
sidelen = 16,
fill_ratio = 0.02,
biomes = {"taiga"},
y_max = 31000,
y_min = 1,
schematic = minetest.get_modpath("vox_main") .. "/schematics/pine_tree.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
-- Acacia Tree
minetest.register_decoration({
name = "vox_main:acacia_tree",
deco_type = "schematic",
place_on = {"vox_main:dry_dirt"},
sidelen = 16,
fill_ratio = 0.02,
biomes = {"savanna"},
y_max = 31000,
y_min = 1,
schematic = minetest.get_modpath("vox_main") .. "/schematics/acacia_tree.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
-- Aspen Tree
minetest.register_decoration({
name = "vox_main:aspen_tree",
deco_type = "schematic",
place_on = {"vox_main:dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.02,
biomes = {"deciduous_forest"},
y_max = 31000,
y_min = 1,
schematic = minetest.get_modpath("vox_main") .. "/schematics/aspen_tree.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
-- Grass
for i = 1, 5 do
minetest.register_decoration({
name = "vox_main:grass_" .. i,
deco_type = "simple",
place_on = {"vox_main:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = -0.03,
scale = 0.09,
spread = {x = 100, y = 100, z = 100},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"grassland"},
y_max = 31000,
y_min = 1,
decoration = "vox_main:grass_" .. i,
})
end
-- Dry Grass
for i = 1, 5 do
minetest.register_decoration({
name = "vox_main:dry_grass_" .. i,
deco_type = "simple",
place_on = {"vox_main:dry_dirt"},
sidelen = 16,
noise_params = {
offset = 0.01,
scale = 0.05,
spread = {x = 100, y = 100, z = 100},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"savanna"},
y_max = 31000,
y_min = 1,
decoration = "vox_main:dry_grass_" .. i,
})
end
-- Fern
for i = 1, 3 do
minetest.register_decoration({
name = "vox_main:fern_" .. i,
deco_type = "simple",
place_on = {"vox_main:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.06,
spread = {x = 100, y = 100, z = 100},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"grassland"},
y_max = 31000,
y_min = 1,
decoration = "vox_main:fern_" .. i,
})
end
-- Marram Grass
for i = 1, 3 do
minetest.register_decoration({
name = "vox_main:marram_grass_" .. i,
deco_type = "simple",
place_on = {"vox_main:sand"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.06,
spread = {x = 100, y = 100, z = 100},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"beach"},
y_max = 31000,
y_min = 1,
decoration = "vox_main:marram_grass_" .. i,
})
end
-- Cactus
minetest.register_decoration({
name = "vox_main:cactus",
deco_type = "schematic",
place_on = {"vox_main:desert_sand"},
sidelen = 16,
fill_ratio = 0.02,
biomes = {"desert"},
y_max = 31000,
y_min = 1,
schematic = minetest.get_modpath("vox_main") .. "/schematics/cactus.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
-- Large Cactus Seedling
minetest.register_decoration({
name = "vox_main:large_cactus_seedling",
deco_type = "simple",
place_on = {"vox_main:desert_sand"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.06,
spread = {x = 100, y = 100, z = 100},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"desert"},
y_max = 31000,
y_min = 1,
decoration = "vox_main:large_cactus_seedling",
})
-- Papyrus
minetest.register_decoration({
name = "vox_main:papyrus",
deco_type = "schematic",
place_on = {"vox_main:dirt"},
sidelen = 16,
fill_ratio = 0.02,
biomes = {"swamp"},
y_max = 31000,
y_min = 1,
schematic = minetest.get_modpath("vox_main") .. "/schematics/papyrus.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
-- Dry Shrub
minetest.register_decoration({
name = "vox_main:dry_shrub",
deco_type = "simple",
place_on = {"vox_main:desert_sand"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.06,
spread = {x = 100, y = 100, z = 100},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"desert"},
y_max = 31000,
y_min = 1,
decoration = "vox_main:dry_shrub",
})
-- Jungle Grass
minetest.register_decoration({
name = "vox_main:junglegrass",
deco_type = "simple",
place_on = {"vox_main:dirt_with_rainforest_litter"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.06,
spread = {x = 100, y = 100, z = 100},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"rainforest"},
y_max = 31000,
y_min = 1,
decoration = "vox_main:junglegrass",
})