2020-11-21 18:29:37 +00:00
|
|
|
-- CC0/Unlicense Emilia 2020
|
2020-11-04 23:23:31 +00:00
|
|
|
|
|
|
|
local dirt = {
|
|
|
|
"mcl_core:dirt",
|
2020-11-21 18:29:37 +00:00
|
|
|
"mcl_core:dirt_with_grass",
|
|
|
|
"mcl_core:dirt_with_grass_snow",
|
|
|
|
"mcl_core:podzol"
|
2020-11-04 23:23:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
local saplings = {
|
|
|
|
"mcl_core:sapling",
|
|
|
|
"mcl_core:darksapling",
|
|
|
|
"mcl_core:junglesapling",
|
|
|
|
"mcl_core:sprucesapling",
|
|
|
|
"mcl_core:birchsapling",
|
|
|
|
"mcl_core:acaciasapling"
|
|
|
|
}
|
|
|
|
|
2020-11-21 18:29:37 +00:00
|
|
|
scaffold.register_template_scaffold("SapScaffold", "scaffold_saplings", function(below)
|
2020-11-21 06:04:49 +00:00
|
|
|
local lp = vector.round(minetest.localplayer:get_pos())
|
2020-11-04 23:23:31 +00:00
|
|
|
|
2020-11-21 18:29:37 +00:00
|
|
|
if scaffold.place_if_needed(dirt, below) then
|
|
|
|
scaffold.place_if_needed(saplings, lp)
|
2020-11-04 23:23:31 +00:00
|
|
|
end
|
2020-11-21 18:29:37 +00:00
|
|
|
end)
|