Changed spawn rate of rubber tree
This commit is contained in:
parent
1ca13cb635
commit
7302e3514f
1 changed files with 17 additions and 2 deletions
|
@ -91,13 +91,28 @@ minetest.register_abm({
|
|||
nodenames = {"moretrees:rubber_tree_sapling"},
|
||||
label = "Worldgen: grow rubber tree sapling",
|
||||
interval = 60,
|
||||
chance = 20,
|
||||
chance = 1, --20
|
||||
action = function(pos, node)
|
||||
minetest.remove_node(pos)
|
||||
minetest.spawn_tree(pos, technic.rubber_tree_model)
|
||||
end
|
||||
})
|
||||
|
||||
--[[minetest.register_decoration({
|
||||
name = "moretrees:rubber_tree",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_rainforest_litter"},
|
||||
sidelen = 80,
|
||||
fill_ratio = 0.001,
|
||||
biomes = {"rainforest"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("default") .. "/schematics/jungle_tree.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
]]--
|
||||
|
||||
if technic.config:get_bool("enable_rubber_tree_generation") then
|
||||
minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
if math.random(1, 100) > 5 then
|
||||
|
@ -108,7 +123,7 @@ if technic.config:get_bool("enable_rubber_tree_generation") then
|
|||
y = (maxp.y - minp.y) / 2 + minp.y,
|
||||
z = (maxp.z - minp.z) / 2 + minp.z}
|
||||
local pos = minetest.find_node_near(tmp, maxp.x - minp.x,
|
||||
{has_mcl and "mcl_core:dirt_with_grass" or "default:dirt_with_grass"})
|
||||
{"default:dirt_with_rainforest_litter" or "livingjungle:jungleground"})
|
||||
if pos ~= nil then
|
||||
minetest.spawn_tree({x=pos.x, y=pos.y+1, z=pos.z}, technic.rubber_tree_model)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue