forked from mtcontrib/bonemeal
added nil fallback
This commit is contained in:
parent
1299f39126
commit
5949d15726
2
init.lua
2
init.lua
@ -266,7 +266,7 @@ local function check_soil(pos, nodename, strength)
|
||||
|
||||
if math.random(1, 5) == 5 then
|
||||
-- place random decoration (rare)
|
||||
nod = decor[math.random(1, #decor)] or ""
|
||||
nod = decor[math.random(1, (#decor or 1))] or ""
|
||||
else
|
||||
-- place random grass (common)
|
||||
nod = #grass > 0 and grass[math.random(1, #grass)] or ""
|
||||
|
Loading…
Reference in New Issue
Block a user