Skip to content

Instantly share code, notes, and snippets.

@davisonio
Created June 27, 2014 19:26
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 davisonio/54ca8c6b0a3b82a56987 to your computer and use it in GitHub Desktop.
Save davisonio/54ca8c6b0a3b82a56987 to your computer and use it in GitHub Desktop.
local old_nodes = {"mod:block1", "mod:block2", "mod:block3"}
local old_entities = {"mod:item1", "mod:item2", "mod:item3"}
for _,node_name in ipairs(old_nodes) do
minetest.register_node(":"..node_name, {
groups = {old=1},
})
end
minetest.register_abm({
nodenames = {"group:old"},
interval = 1,
chance = 1,
action = function(pos, node)
minetest.remove_node(pos)
end,
})
for _,entity_name in ipairs(old_entities) do
minetest.register_entity(":"..entity_name, {
on_activate = function(self, staticdata)
self.object:remove()
end,
})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment