Make tree trunks grow through leaves of their kind

This commit is contained in:
ShadowNinja 2014-08-27 19:25:42 -04:00
parent bb3bb6fa47
commit 47834a8d89

View file

@ -57,7 +57,7 @@ local function add_trunk_and_leaves(data, a, pos, tree_cid, leaves_cid,
-- Trunk -- Trunk
for y_dist = 0, height - 1 do for y_dist = 0, height - 1 do
local vi = a:index(x, y + y_dist, z) local vi = a:index(x, y + y_dist, z)
if y_dist == 0 or data[vi] == c_air then if y_dist == 0 or data[vi] == c_air or data[vi] == leaves_cid then
data[vi] = tree_cid data[vi] = tree_cid
end end
end end