Copy link
@paramat

paramat May 3, 2017

@asl97 your comment was:

Only with local sulfur_buf = {} does it reuse the table:

sulfur_buf: 	table: 0x4077e8d8
data: 	table: 0x4077e8d8
sulfur_buf: 	table: 0x4077e8d8
data: 	table: 0x4077e8d8

So i understood this as meaning that this works:

local sulfur_buf = {}
local sulfur_noise= nil

 minetest.register_on_generated(function(minp, maxp, seed)
 	local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
 	local a = VoxelArea:new{
 		MinEdge = {x = emin.x, y = emin.y, z = emin.z},
 		MaxEdge = {x = emax.x, y = emax.y, z = emax.z},
 	}
	local data = vm:get_data(sulfur_buf)

And this has local data = vm:get_data(sulfur_buf)
I'm asking if this line needs to be
sulfur_buf = vm:get_data(sulfur_buf)
Surely it needs to be to reuse that lua table?