spawn_example.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[ Spawn Template, defaults to values shown if line not provided
  2. mobs:spawn({
  3. name = "",
  4. - Name of mob, must be provided e.g. "mymod:my_mob"
  5. nodes = {"group:soil, "group:stone"},
  6. - Nodes to spawn on top of.
  7. neighbors = {"air"},
  8. - Nodes to spawn beside.
  9. min_light = 0,
  10. - Minimum light level.
  11. max_light = 15,
  12. - Maximum light level, 15 is sunlight only.
  13. interval = 30,
  14. - Spawn interval in seconds.
  15. chance = 5000,
  16. - Spawn chance, 1 in every 5000 nodes.
  17. active_object_count = 1,
  18. - Active mobs of this type in area.
  19. min_height = -31000,
  20. - Minimum height level.
  21. max_height = 31000,
  22. - Maximum height level.
  23. day_toggle = nil,
  24. - Daytime toggle, true to spawn during day, false for night, nil for both
  25. on_spawn = nil,
  26. - On spawn function to run when mob spawns in world
  27. on_map_load = nil,
  28. - On map load, when true mob only spawns in newly generated map areas
  29. })
  30. ]]--
  31. -- Horse
  32. mobs:spawn({
  33. name = "mob_horse:horse",
  34. nodes = {"default:dirt_with_grass", "ethereal:dry_dirt"},
  35. min_light = 14,
  36. interval = 60,
  37. chance = 16000,
  38. min_height = 10,
  39. max_height = 31000,
  40. day_toggle = true
  41. })