Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- minetest.register_abm({
- nodenames = { options.grow_plant },
- interval = options.interval,
- chance = options.grow_chance,
- catch_up = false,
- action = function(pos, node, active_object_count, active_object_count_wider)
- local p_top = {x=pos.x, y=pos.y+1, z=pos.z}
- local p_bot = {x=pos.x, y=pos.y-1, z=pos.z}
- local n_top = minetest.get_node(p_top)
- local n_bot = minetest.get_node(p_bot)
- if nbot and string.find(n_bot.name,"flower_pot") then
- minetest.log("action","moretrees: "..dump(options.grow_plant).." cannot grow because it's placed on a flower pot!")
- return
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement