spawn_example.lua 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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. -- Bee
  32. mobs:spawn({
  33. name = "mobs_animal:bee",
  34. nodes = {"group:flower"},
  35. min_light = 14,
  36. interval = 60,
  37. chance = 7000,
  38. min_height = 3,
  39. max_height = 200,
  40. day_toggle = true,
  41. })
  42. -- Bunny
  43. mobs:spawn({
  44. name = "mobs_animal:bunny",
  45. nodes = {"default:dirt_with_grass"},
  46. neighbors = {"group:grass"},
  47. min_light = 14,
  48. interval = 60,
  49. chance = 8000,
  50. min_height = 5,
  51. max_height = 200,
  52. day_toggle = true,
  53. })
  54. -- Chicken
  55. mobs:spawn({
  56. name = "mobs_animal:chicken",
  57. nodes = {"default:dirt_with_grass"},
  58. neighbors = {"group:grass"},
  59. min_light = 14,
  60. interval = 60,
  61. chance = 8000,
  62. min_height = 5,
  63. max_height = 200,
  64. day_toggle = true,
  65. })
  66. -- Cow
  67. mobs:spawn({
  68. name = "mobs_animal:cow",
  69. nodes = {"default:dirt_with_grass", "ethereal:green_dirt"},
  70. neighbors = {"group:grass"},
  71. min_light = 14,
  72. interval = 60,
  73. chance = 8000,
  74. min_height = 5,
  75. max_height = 200,
  76. day_toggle = true,
  77. })
  78. -- Kitten
  79. mobs:spawn({
  80. name = "mobs_animal:kitten",
  81. nodes = {"default:dirt_with_grass"},
  82. neighbors = {"group:grass"},
  83. min_light = 14,
  84. interval = 60,
  85. chance = 10000,
  86. min_height = 5,
  87. max_height = 50,
  88. day_toggle = true,
  89. })
  90. -- Panda
  91. mobs:spawn({
  92. name = "mobs_animal:panda",
  93. nodes = {"ethereal:bamboo_dirt"},
  94. neighbors = {"group:grass"},
  95. min_light = 14,
  96. interval = 60,
  97. chance = 8000,
  98. min_height = 10,
  99. max_height = 80,
  100. day_toggle = true,
  101. })
  102. -- Penguin
  103. mobs:spawn({
  104. name = "mobs_animal:penguin",
  105. nodes = {"default:snowblock"},
  106. min_light = 14,
  107. interval = 60,
  108. chance = 20000,
  109. min_height = 0,
  110. max_height = 200,
  111. day_toggle = true,
  112. })
  113. -- Rat
  114. mobs:spawn({
  115. name = "mobs_animal:rat",
  116. nodes = {"default:stone"},
  117. min_light = 3,
  118. max_light = 9,
  119. interval = 60,
  120. chance = 8000,
  121. max_height = 0,
  122. })
  123. -- Sheep
  124. mobs:spawn({
  125. name = "mobs_animal:sheep_white",
  126. nodes = {"default:dirt_with_grass", "ethereal:green_dirt"},
  127. neighbors = {"group:grass"},
  128. min_light = 14,
  129. interval = 60,
  130. chance = 8000,
  131. min_height = 0,
  132. max_height = 200,
  133. day_toggle = true,
  134. })
  135. -- Warthog
  136. mobs:spawn({
  137. name = "mobs_animal:pumba",
  138. nodes = {"default:dirt_with_dry_grass", "default:dry_dirt_with_dry_grass"},
  139. neighbors = {"group:dry_grass"},
  140. min_light = 14,
  141. interval = 60,
  142. chance = 8000,
  143. min_height = 0,
  144. max_height = 200,
  145. day_toggle = true,
  146. })