Advertisement
Guest User

Untitled

a guest
Mar 19th, 2022
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. -- Makes pollution spawn around certain blocks.png
  2.  
  3. function pollute(node, freuqency)
  4. minetest.register_abm({
  5. label = "Pollution spawning around" .. node,
  6. nodenames = "air",
  7. neighbours = node,
  8. interval = frequency,
  9. chance = 0.95,
  10. action = function(pos, node, active_object_count, active_object_count_wider)
  11. --while minetest.get_node("air") ~= true then
  12. -- local pos = {x = pos.x, y = pos.y + 1, z = pos.z}
  13. --end
  14. local pos = {x = pos.x, y = pos.y + 1, z = pos.z}
  15. minetest.set_node(pos, {name = "air_pollution:pollution_1"})
  16. end ,
  17. })
  18. end
  19.  
  20. pollute("default:furnace_active", 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement