Add original code by PilzAdam:

@ forum post updated: June 08, 2013
master
Jordan Irwin 2017-05-18 15:06:02 -07:00
commit ff382bba88
5 changed files with 63 additions and 0 deletions

13
LICENSE.txt Normal file
View File

@ -0,0 +1,13 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

18
README.md Normal file
View File

@ -0,0 +1,18 @@
## Clean mod for [Minetest][]
---
### **Description:**
Fork of [PilzAdam's ***clean*** mod][f.pilzadam] for Minetest.
---
### **Licensing:**
[WTFPL](LICENSE.txt)
[Minetest]: http://www.minetest.net/
[f.pilzadam]: https://forum.minetest.net/viewtopic.php?t=2777

1
description.txt Normal file
View File

@ -0,0 +1 @@
A very simple mod that deletes unknown blocks and removes unknown entities.

28
init.lua Normal file
View File

@ -0,0 +1,28 @@
-- clean by PilzAdam
-- LICENSE: WTFPL
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

3
mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = clean
author = PilzAdam
license = WTFPL