Vanessa's plantlife modpack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.1KB

  1. -----------------------------------------------------------------------------------------------
  2. -- Grasses - More Tall Grass 0.0.2
  3. -----------------------------------------------------------------------------------------------
  4. -- by Mossmanikin
  5. -- License (everything): WTFPL
  6. -- Contains code from: biome_lib
  7. -- Looked at code from: default
  8. -----------------------------------------------------------------------------------------------
  9. abstract_dryplants.grow_grass = function(pos)
  10. local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
  11. local grass_size = math.random(1,5)
  12. if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
  13. or minetest.get_node(right_here).name == "default:junglegrass" then
  14. minetest.set_node(right_here, {name="default:grass_"..grass_size})
  15. end
  16. end
  17. biome_lib:register_generate_plant({
  18. surface = {
  19. "default:dirt_with_grass",
  20. "stoneage:grass_with_silex",
  21. "sumpf:peat",
  22. "sumpf:sumpf"
  23. },
  24. max_count = TALL_GRASS_PER_MAPBLOCK,
  25. rarity = 101 - TALL_GRASS_RARITY,
  26. min_elevation = 1, -- above sea level
  27. plantlife_limit = -0.9,
  28. },
  29. abstract_dryplants.grow_grass
  30. )