And fixed it
- Code: Select all
local function hacky_swap_node(pos,name,param2)
local node = minetest.env:get_node(pos)
local meta = minetest.env:get_meta(pos)
if node.name == name then
return
end
node.name = name
local meta0 = meta:to_table()
minetest.env:set_node(pos,{name=name,param2=param2})
^rotate added
meta = minetest.env:get_meta(pos)
meta:from_table(meta0)
end