wieszak wrote:Some oddities (0.4.dev):
- underwater torches - i think maybe there should be glass+torch = some kind of lamp, which can be used underwater, but this is lets say just funny.
- underwater samplings - i don't mind putting it underwater, but they grows there ;) and grows only as wood without leaves:
- and something bizzare: two cactuses gone wild:
such fanciness is probably too much.. i know this is ideal fuel for cooking but... maybe some volume check ? stop growing after reaching some predefined value ?
-- Cactus growing
minetest.register_abm({
nodenames = { "default:cactus" },
interval = 7200,
chance = 25,
action = function(pos, node, active_object_count, active_object_count_wider)
-- Grow with a chance (choosing which side to grow)
local search_distance = 10
local cactus_found = 0
for p_x=(pos.x-search_distance), (pos.x+search_distance) do
for p_y=(pos.y-search_distance), (pos.y+search_distance) do
for p_z=(pos.z-search_distance), (pos.z+search_distance) do
local search_n = minetest.env:get_node({x=p_x, y=p_y, z=p_z})
if search_n.name == "default:cactus" then
cactus_found = cactus_found + 1
end
end
end
end
if cactus_found < 15 then
for i = -1, 1 do
for j = 0, 1 do
for k = -1, 1 do
if(math.abs(i) + math.abs(j) + math.abs(k) == 1) then
if (math.random(1, 30) == 1) then
local new_pos = {
x = pos.x + i,
y = pos.y + j,
z = pos.z + k
}
if (minetest.env:get_node(new_pos).name == "air") then
minetest.env:add_node(new_pos, {name = "default:cactus"})
print ('[nature] A cactus has grown at (' .. new_pos.x .. ',' .. new_pos.y .. ',' .. new_pos.z .. ')')
end
end
end
end
end
end
end
end
})
Death Dealer wrote:Ya had the same cactus infestationXD mountains of cacti. Don't try burning it, it crashed my game almost every time: /
Users browsing this forum: No registered users and 11 guests