kpoppel
2013-05-06 2239a4447b43fe5beb034ba185288d948daa311b
technic/rubber.lua
@@ -88,14 +88,12 @@
   end
})
if technic.config:getBool("enable_rubber_tree_generation") then
minetest.register_on_generated(function(minp, maxp, blockseed)
   if math.random(1, 100) > 5 then
      return
   end
   local tmp = {x=(maxp.x-minp.x)/2+minp.x, y=(maxp.y-minp.y)/2+minp.y, z=(maxp.z-minp.z)/2+minp.z}
   local pos = minetest.env:find_node_near(tmp, maxp.x-minp.x, {"default:dirt_with_grass"})
   if pos ~= nil then
         rubber_tree={
      local rubber_tree={
         axiom="FFFFA",
         rules_a="[&FFBFA]////[&BFFFA]////[&FBFFA]",
         rules_b="[&FFA]////[&FFA]////[&FFA]",
@@ -108,9 +106,13 @@
         fruit_tree=false,
         fruit=""
         }
      local tmp = {x=(maxp.x-minp.x)/2+minp.x, y=(maxp.y-minp.y)/2+minp.y, z=(maxp.z-minp.z)/2+minp.z}
      local pos = minetest.env:find_node_near(tmp, maxp.x-minp.x, {"default:dirt_with_grass"})
      if pos ~= nil then
         minetest.env:spawn_tree({x=pos.x, y=pos.y+1, z=pos.z},rubber_tree)
   end
end)
end
-- ========= FUEL =========