
local path = minetest.get_modpath("chemistry") .. "/schematics/"

dofile(path .. "cesium_volcano.lua")
dofile(path .. "metal_volcano1.lua")
dofile(path .. "metal_volcano2.lua")
dofile(path .. "metal_volcano3.lua")
dofile(path .. "stone_spike.lua")
dofile(path .. "trees.lua")

minetest.register_decoration({
   sidelen = 80,
	name = "chemistry:cesium_volcano",
	deco_type = "schematic",
	place_on = "chemistry:alkaline_sand",
   y_max = 100,
   y_min = 0,
	fill_ratio = 0.003,
   flags = "place_center_x, place_center_z",
	biomes = {"alkaline_land"},
	schematic = chemistry.cesium_volcano,
	spawn_by = "chemistry:alkaline_sand", num_spawn_by = 4,
	rotation = "random"
})
minetest.register_decoration({
   sidelen = 80,
	name = "chemistry:metal_volcano1",
	deco_type = "schematic",
	place_on = "chemistry:stone",
   y_max = -11000,
   y_min = -31000,
	flags = "all_floors, place_center_x, place_center_z",
	fill_ratio = 0.00003,
	biomes = {"strong_stone_layer"},
	schematic = chemistry.metal_volcano1,
	spawn_by = "chemistry:stone", num_spawn_by = 1,
	rotation = "random"
})
minetest.register_decoration({
   sidelen = 80,
	name = "chemistry:metal_volcano2",
	deco_type = "schematic",
	place_on = "chemistry:stone",
   y_max = -11000,
   y_min = -31000,
	flags = "all_floors, place_center_x, place_center_z",
	fill_ratio = 0.00003,
	biomes = {"strong_stone_layer"},
	schematic = chemistry.metal_volcano2,
	spawn_by = "chemistry:stone", num_spawn_by = 1,
	rotation = "random"
})
minetest.register_decoration({
   sidelen = 80,
	name = "chemistry:metal_volcano3",
	deco_type = "schematic",
	place_on = "chemistry:stone",
   y_max = -11000,
   y_min = -31000,
	flags = "all_floors, place_center_x, place_center_z",
	fill_ratio = 0.00003,
	biomes = {"strong_stone_layer"},
	schematic = chemistry.metal_volcano3,
	spawn_by = "chemistry:stone", num_spawn_by = 1,
	rotation = "random"
})

minetest.register_decoration({
	name = "chemistry:ionized_tree",
	deco_type = "schematic",
	place_on = {"chemistry:dirt_with_uranyl"},
	sidelen = 16,
	noise_params = {
		offset = 0.024,
		scale = 0.015,
		spread = {x = 250, y = 250, z = 250},
		seed = 2,
		octaves = 3,
		persist = 0.66
	},
	biomes = {"ionized_forest"},
	y_max = 31000,
	y_min = 1,
	schematic = chemistry.ionized_tree,
	flags = "place_center_x, place_center_z",
	rotation = "random",
})

minetest.register_decoration({
	name = "chemistry:anthracite_tree",
	deco_type = "schematic",
	place_on = {"chemistry:stone"},
	sidelen = 80,
	fill_ratio = 0.00003,
	biomes = {"strong_stone_layer"},
	y_max = -11000,
	y_min = -31000,
	schematic = chemistry.anthracite_tree,
	flags = "all_floors, place_center_x, place_center_z",
	rotation = "random",
	place_offset_y=1
})

minetest.register_decoration({
	sidelen = 16,
	 name = "chemistry:stone_spike1",
	 deco_type = "schematic",
	 place_on = "chemistry:stone",
	y_max = -11000,
	y_min = -31000,
	 flags = "all_floors, place_center_x, place_center_z",
	 fill_ratio = 0.0003,
	 biomes = {"strong_stone_layer"},
	 schematic = chemistry.stone_spike1,
	 rotation = "random"
 })
 