-- This mod is derived from Rnd's "rnd_trees" mod.
-- It adds a little API and some changes in the generation algorithm
-- Author: Astrobe
-- Licence: Same as Minetest.

local mfpace= 307

--[[
minetest.register_craft
{
	output="a_trees:sapling",
	recipe=
	{
		{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
		{"default:mese_crystal_fragment", "default:emergent_jungle_sapling", "default:mese_crystal_fragment"},
		{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
	}
}

minetest.register_craft
{
	output="a_trees:sapling",
	recipe=
	{
		{"default:large_cactus_seedling", "default:large_cactus_seedling", "default:large_cactus_seedling"},
		{"default:large_cactus_seedling", "default:mese_crystal", "default:large_cactus_seedling"},
		{"default:large_cactus_seedling", "default:large_cactus_seedling", "default:large_cactus_seedling"},
	}
}
minetest.register_craft
{
	output="a_trees:sapling",
	recipe=
	{
		{"flowers:mushroom_red","flowers:mushroom_red","flowers:mushroom_red",},
		{"flowers:mushroom_red","default:large_cactus_seedling","flowers:mushroom_red",},
		{"flowers:mushroom_red","flowers:mushroom_red","flowers:mushroom_red",},
	}
}
--]]


a_trees.register {fruit="default:apple", fruity=50, pace=mfpace}

a_trees.register
{
	trunk="default:basalt",
	leaves="default:basalt_cobble",
	fruit="default:lava_source",
	fruity=50,
	size=5,
	height=1,
	width=6,
	pace=mfpace
}


a_trees.register
{
	trunk="default:palm_tree",
	leaves="default:palm_leaves",
	branchy=10,
	height=5,
	width=5,
	slanty=8,
	pace=mfpace
}

a_trees.register
{
	trunk="default:stone",
	fruit="mobs:cobweb",
	leaves="default:stone_with_tin",
	size=5,
	height=2,
	width=5,
	pace=mfpace
}

a_trees.register
{
	trunk="default:stone",
	leaves="default:mossycobble",
	fruit="default:stone_with_coal",
	fruity=50,
	pace=mfpace
}

a_trees.register
{
	trunk="default:stone",
	leaves="default:mossycobble",
	fruit="default:stone_with_tin",
	fruity=50,
	pace=mfpace
}

a_trees.register
{
	trunk="default:aspen_tree",
	leaves="default:aspen_leaves",
	branchy=10,
	height=5,
	width=5,
	slanty=8,
	pace=mfpace
}

a_trees.register
{
	trunk="default:pine_tree",
	leaves="default:pine_needles",
	branchy=1,
	height=5,
	width=4,
	pace=mfpace
}

a_trees.register
{
	trunk="default:jungletree",
	leaves="default:jungleleaves",
	branchy=1,
	size=50,
	height=15,
	width=4,
	pace=mfpace
}

a_trees.register
{
	trunk="default:acacia_tree",
	leaves="default:acacia_leaves",
	branchy=1,
	height=2,
	width=10,
	pace=mfpace
}

a_trees.register
{
	trunk="default:desert_stone",
	leaves="default:sandstone",
	fruit="default:sandstone_with_tin",
	branchy=3,
	size=15,
	height=5,
	width=10,
	pace=mfpace
}

a_trees.register
{
	trunk="default:sandstone",
	leaves="default:limestone",
	fruit="default:river_water_source",
	size=5,
	height=1,
	width=6,
	pace=mfpace
}

a_trees.register
{
	trunk="default:cactus",
	leaves="air",
	branchy=3,
	size=15,
	height=5,
	width=10,
	pace=mfpace
}

a_trees.register
{
	trunk="default:pine_bush_stem",
	leaves="default:blueberry_bush_leaves",
	fruit="default:blueberry_bush_leaves_with_berries",
	fruity=25,
	size=5,
	height=2,
	width=5,
	pace=mfpace
}

a_trees.register
{
	trunk="abyss:rack",
	leaves="abyss:cobble",
	fruit="abyss:glowstone",
	fruity=50,
	pace=mfpace
}


a_trees.register
{
	trunk="default:pine_tree",
	leaves="mf_decor:slate_cobble",
	fruit="mf_decor:slate",
	size=5,
	height=1,
	width=6,
	pace=mfpace
}

a_trees.register
{
	trunk="default:limestone",
	leaves="default:coral_brown",
	fruit="default:coral_orange",
	size=5,
	height=1,
	width=6,
	pace=mfpace
}

