Skip to content

Instantly share code, notes, and snippets.

@Jordach Jordach/gist:efcaa2dbc8b3bbe25241 Secret
Last active Aug 29, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.