This is a very simple mod that deletes unkown blocks and removes unkown entities. Just insert there names in the tables in the first two lines and they will be removed when a player is close to them.
Depends:
nothing
License:
Sourcecode: WTFPL
Download:
http://ompldr.org/vZjM5MA/clean.zip Broken (R.I.P. omploader)
Anyway, here is the init.lua:
- Code: Select all
local old_nodes = {"mod:a", "mod:b"}
local old_entities = {}
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.env: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