diff --git a/worldeditadditions/lib/forest.lua b/worldeditadditions/lib/forest.lua index 7d5fbaf..f7055e9 100644 --- a/worldeditadditions/lib/forest.lua +++ b/worldeditadditions/lib/forest.lua @@ -24,7 +24,7 @@ function worldeditadditions.forest(pos1, pos2, sapling_weights) for x = pos2.x, pos1.x, -1 do for y = pos2.y, pos1.y, -1 do local i = area:index(x, y, z) - if not groups_cache[data[i]] then + if not group_cache[data[i]] then group_cache[data[i]] = worldeditadditions.is_sapling(data[i]) end @@ -38,7 +38,7 @@ function worldeditadditions.forest(pos1, pos2, sapling_weights) ) local new_id_at_pos = minetest.get_content_id(minetest.get_node({ z = z, y = y, x = x }).name) - if not groups_cache[new_id_at_pos] then + if not group_cache[new_id_at_pos] then group_cache[new_id_at_pos] = worldeditadditions.is_sapling(new_id_at_pos) end if not group_cache[new_id_at_pos] then @@ -64,7 +64,7 @@ function worldeditadditions.forest(pos1, pos2, sapling_weights) for x = pos2.x, pos1.x, -1 do for y = pos2.y, pos1.y, -1 do local i = area:index(x, y, z) - if not groups_cache[data[i]] then + if not group_cache[data[i]] then group_cache[data[i]] = worldeditadditions.is_sapling(data[i]) end diff --git a/worldeditadditions_commands/init.lua b/worldeditadditions_commands/init.lua index 1c08469..1ce100b 100644 --- a/worldeditadditions_commands/init.lua +++ b/worldeditadditions_commands/init.lua @@ -32,9 +32,10 @@ dofile(we_c.modpath.."/commands/maze.lua") dofile(we_c.modpath.."/commands/replacemix.lua") dofile(we_c.modpath.."/commands/convolve.lua") dofile(we_c.modpath.."/commands/erode.lua") +dofile(we_c.modpath.."/commands/forest.lua") dofile(we_c.modpath.."/commands/count.lua") -dofile(we_c.modpath.."/commands/forestaliases.lua") +dofile(we_c.modpath.."/commands/saplingaliases.lua") dofile(we_c.modpath.."/commands/subdivide.lua")