mirror of
https://codeberg.org/tenplus1/bonemeal.git
synced 2025-07-22 18:10:21 +02:00
Compare commits
3 Commits
1299f39126
...
f3ad4abff1
Author | SHA1 | Date | |
---|---|---|---|
f3ad4abff1 | |||
c621448df3 | |||
5949d15726 |
14
init.lua
14
init.lua
@ -265,11 +265,17 @@ local function check_soil(pos, nodename, strength)
|
||||
pos2.y = pos2.y + 1
|
||||
|
||||
if math.random(1, 5) == 5 then
|
||||
-- place random decoration (rare)
|
||||
nod = decor[math.random(1, #decor)] or ""
|
||||
if decor and #decor > 0 then
|
||||
-- place random decoration (rare)
|
||||
local dnum = #decor or 1
|
||||
nod = decor[math.random(1, dnum)] or ""
|
||||
end
|
||||
else
|
||||
-- place random grass (common)
|
||||
nod = #grass > 0 and grass[math.random(1, #grass)] or ""
|
||||
if grass and #grass > 0 then
|
||||
-- place random grass (common)
|
||||
local dgra = #grass or 1
|
||||
nod = #grass > 0 and grass[math.random(1, dgra)] or ""
|
||||
end
|
||||
end
|
||||
|
||||
if nod and nod ~= "" then
|
||||
|
Reference in New Issue
Block a user