diff --git a/mapgen.lua b/mapgen.lua index 4a212b4..58a3cd4 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -764,13 +764,6 @@ mg_villages.change_village_height = function( village, new_height ) end --- those functions from the mg mod do not have their own namespace -if( minetest.get_modpath( 'mg' )) then - mg_villages.add_savannatree = add_savannatree; - mg_villages.add_pinetree = add_pinetree; -end - - -- places trees and plants at empty spaces mg_villages.village_area_fill_with_plants = function( village_area, villages, minp, maxp, data, param2_data, a, cid, trees_to_grow_via_voxelmanip ) -- do not place any plants if we are working on the mapchunk above diff --git a/trees.lua b/trees.lua index d94d9cf..263befe 100644 --- a/trees.lua +++ b/trees.lua @@ -2,6 +2,13 @@ -- schematics placed in villages and in the flattened/partly -- flattened area around the village +-- those functions from the mg mod do not have their own namespace +-- (and this is too little to warrant a trees_mg.lua) +if( minetest.get_modpath( 'mg' )) then + mg_villages.add_savannatree = add_savannatree + mg_villages.add_pinetree = add_pinetree +end + -- figure out which tree to grow in RealTest -- (this is also accessed in mapgen.lua) mg_villages.sapling_to_tree_realtest = {}