mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-27 17:43:53 +01:00
Fix some crashes, but it's still not functioning as expected
This commit is contained in:
parent
0b285fa681
commit
a6fc9712b4
@ -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
|
||||
|
||||
|
@ -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")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user