15 Add mineral waters under
This commit is contained in:
parent
917df9d304
commit
9d89f91e4f
|
@ -224,6 +224,22 @@ x_farming.x_bonemeal:register_tree_defs({
|
||||||
|
|
||||||
Everness.grow_palm_tree(pos)
|
Everness.grow_palm_tree(pos)
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- sapling name
|
||||||
|
name = 'everness:lava_tree_sapling',
|
||||||
|
-- 1 out of `chance`, e.g. 2 = 50% chance
|
||||||
|
chance = 4,
|
||||||
|
-- grow tree from sapling
|
||||||
|
grow_tree = function(pos)
|
||||||
|
if not x_farming.x_bonemeal.is_on_soil(pos) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
Everness.grow_lava_tree(pos)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
28
trees.lua
28
trees.lua
|
@ -105,12 +105,28 @@ function Everness.grow_palm_tree(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Everness.grow_lava_tree(pos)
|
function Everness.grow_lava_tree(pos)
|
||||||
local path = minetest.get_modpath('everness') .. '/schematics/everness_lava_tree.mts'
|
local schem_everness_lava_tree = minetest.read_schematic(minetest.get_modpath('everness') .. '/schematics/everness_lava_tree.mts', {})
|
||||||
local lava_tree_size = { x = 7, y = 13, z = 7 }
|
local lava_nodes = minetest.find_nodes_in_area_under_air(
|
||||||
local lava_tree_size_x = math.floor(lava_tree_size.x / 2)
|
vector.subtract(pos, 1),
|
||||||
local lava_tree_size_z = math.floor(lava_tree_size.z / 2)
|
vector.add(pos, 1),
|
||||||
minetest.place_schematic({ x = pos.x - lava_tree_size_x, y = pos.y, z = pos.z - lava_tree_size_z },
|
{ 'group:lava' }
|
||||||
path, '0', nil, false)
|
)
|
||||||
|
local replacements
|
||||||
|
|
||||||
|
if #lava_nodes > 0 then
|
||||||
|
replacements = {
|
||||||
|
['everness:lava_tree'] = 'everness:lava_tree_with_lava',
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.place_schematic(
|
||||||
|
pos,
|
||||||
|
schem_everness_lava_tree,
|
||||||
|
'random',
|
||||||
|
replacements,
|
||||||
|
false,
|
||||||
|
'place_center_x, place_center_z'
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Everness.grow_sapling(pos, groups_under)
|
function Everness.grow_sapling(pos, groups_under)
|
||||||
|
|
Ŝarĝante…
Reference in New Issue