1
0
mirror of https://github.com/Uberi/Minetest-WorldEdit.git synced 2024-12-25 02:00:39 +01:00

Metadata fix for serialization.

This commit is contained in:
Anthony Zhang 2013-03-27 18:07:52 -04:00
parent 65c218c3e2
commit 0317deb101

View File

@ -47,6 +47,14 @@ worldedit.serialize = function(pos1, pos2) --wip: check for ItemStacks and wheth
if node.name ~= "air" and node.name ~= "ignore" then
count = count + 1
local meta = env:get_meta(pos):to_table()
--convert metadata itemstacks to itemstrings
for name, inventory in pairs(meta.inventory) do
for index, stack in ipairs(inventory) do
inventory[index] = stack:to_string()
end
end
result[count] = {
x = pos.x - pos1.x,
y = pos.y - pos1.y,