schems.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. local path = minetest.get_modpath("epic_trees") .. "/schematics/"
  2. local dpath = minetest.get_modpath("default") .. "/schematics/"
  3. dofile(path .. "banana_tree.lua")
  4. dofile(path .. "orange_tree.lua")
  5. local add_schem = function(place_on, fill_ratio, biomes, y_min, y_max, schematic, flags, replacements, spawn_by, num_spawn_by, rotation)
  6. -- if not 1 then biome disabled, don't add
  7. if flags ~= 1 then return end
  8. minetest.register_decoration({
  9. deco_type = "schematic",
  10. place_on = place_on,
  11. sidelen = 80,
  12. fill_ratio = fill_ratio,
  13. biomes = biomes,
  14. y_min = y_min,
  15. y_max = y_max,
  16. schematic = schematic,
  17. flags = "place_center_x, place_center_z",
  18. replacements = replacements,
  19. spawn_by = spawn_by,
  20. num_spawn_by = num_spawn_by,
  21. rotation = rotation,
  22. })
  23. end
  24. add_schem({"default:sand", "default:dirt_with_grass"}, 0.003, {"grassland", "grassland_dunes"}, 1, 100,
  25. epic_trees.bananatree, 1)
  26. add_schem({"default:sand", "default:dirt_with_grass"}, 0.003, {"grassland", "grassland_dunes"}, 1, 100,
  27. epic_trees.orangetree, 1)