Skip to content

Commit

Permalink
make subterrane test for buildability for giant mushroom stems
Browse files Browse the repository at this point in the history
  • Loading branch information
FaceDeer committed Jul 15, 2022
1 parent 331d08b commit 2e523b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion features.lua
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ function subterrane.giant_mushroom(vi, area, data, stem_material, cap_material,
for j = -2, stem_height do -- going down to -2 to ensure the stem is flush with the ground
local vi = area:index(x, y+j, z)
if j >= 0 or area:containsi(vi) then -- since -2 puts us below the bounds we've already tested, add a contains check here.
data[vi] = stem_material
if mapgen_helper.buildable_to(data[vi]) then data[vi] = stem_material end
if cap_radius > 3 then
local ai = area:index(x, y+j, z+1)
if mapgen_helper.buildable_to(data[ai]) or data[ai] == gill_material then data[ai] = stem_material end
Expand Down

0 comments on commit 2e523b1

Please sign in to comment.