Skip to content

Instantly share code, notes, and snippets.

@IceDragon200
Created July 28, 2020 02:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IceDragon200/f5c4e364ea507d30360bbb8e5380c817 to your computer and use it in GitHub Desktop.
Save IceDragon200/f5c4e364ea507d30360bbb8e5380c817 to your computer and use it in GitHub Desktop.
local function dump_nodes()
-- Export all node names to a text file for review
print("Exporting Nodes")
local i = 0
local result = {}
for name, _def in pairs(minetest.registered_nodes) do
i = i + 1
result[i] = name
end
minetest.safe_file_write(minetest.get_worldpath() .. "/exported_nodes.txt", table.concat(result, "\n"))
print("Exported Nodes count=" .. i)
end
minetest.register_on_mods_loaded(function ()
dump_nodes()
end)
name = node_dump
description = Dumps all registered nodes to a text file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment