-
-
Save Jordach/efcaa2dbc8b3bbe25241 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
minetest.register_abm({ | |
nodenames = {"mapgen:oak_sapling"}, | |
interval = 2, | |
chance = 3, | |
action = function(pos) | |
pos.y = pos.y - 1 | |
if not minetest.registered_nodes[node].groups.soil then | |
return | |
end | |
if minetest.get_node(pos) == minetest.registered_nodes[node].groups.soil then | |
minetest.env:remove_node(pos) | |
pos.x = pos.x - 2 | |
pos.z = pos.z - 2 | |
minetest.place_schematic(pos, minetest.get_modpath("mapgen").."/schematics/mapgen_oak_tree.mts", "random", {{"base:leaves", "mapgen:oak_leaves"}, {"base:tree", "mapgen:oak_log_tree"}, {"base:dirt", "mapgen:dirt"}}, false) | |
end | |
end, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment