We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ded9ea8 commit 7066735Copy full SHA for 7066735
worldedit/common.lua
@@ -47,10 +47,15 @@ end
47
48
function worldedit.keep_loaded(pos1, pos2)
49
-- Create a vmanip and read the area from map, this
50
- -- causes all MapBlocks to be loaded into memory.
+ -- causes all MapBlocks to be loaded into memory synchronously.
51
-- This doesn't actually *keep* them loaded, unlike the name implies.
52
- local manip = minetest.get_voxel_manip()
53
- manip:read_from_map(pos1, pos2)
+ if minetest.load_area then
+ -- same effect but without unnecessary data copying
54
+ minetest.load_area(pos1, pos2)
55
+ else
56
+ local manip = minetest.get_voxel_manip()
57
+ manip:read_from_map(pos1, pos2)
58
+ end
59
end
60
61
0 commit comments