Correct growth height
parent
16798eeed2
commit
9090aba92d
|
@ -4,7 +4,7 @@
|
|||
|
||||
This mod adds a simple fast-growing bamboo plant to Minetest.
|
||||
|
||||
- It grows up to ~24 blocks tall, or as low as 4 blocks tall
|
||||
- It grows up to 25 blocks tall, or as low as 4 blocks tall
|
||||
- Every 45 seconds it has a 1 in 4 chance of of growing
|
||||
- It requires an air node above it in order to grow
|
||||
- Breaking a lower node in the plant causes all the upper ones to break too
|
||||
|
|
2
init.lua
2
init.lua
|
@ -30,7 +30,7 @@ minetest.register_node("bamboo:bamboo", {
|
|||
-- Randomly set param2 to vary the eventual height it grows to, but only if it hasn't been set already
|
||||
local node = minetest.get_node(pos)
|
||||
if node.param2 == 0 then
|
||||
node.param2 = math.random(0, 20)
|
||||
node.param2 = math.random(0, 21)
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue