Page 1 of 1

Removing unknown entities

PostPosted: Sat Feb 14, 2015 09:24
by Marshall_maz
Hi everyone , I am trying to clean up my world from a previous mobs mod that I removed.

I managed to remove the unknown nodes with this script as a mod that someone here gave me a while ago:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local old_nodes = {"mobs:rat"}

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,
})


It removed nodes like eggs for example. But it doesn't work for entities like mobs:rat

How must I change the script to remove the unknown entities please.

Thank you

Re: Removing unknown entities

PostPosted: Sat Feb 14, 2015 09:55
by Marshall_maz
Found this: viewtopic.php?id=2777

and going to try that

Re: Removing unknown entities

PostPosted: Sat Feb 14, 2015 20:58
by shadowzone
Try /clearobjects

Re: Removing unknown entities

PostPosted: Sun Feb 15, 2015 06:20
by Marshall_maz
shadowzone wrote:Try /clearobjects


I did , but that crashes the server.

The above mentioned link worked perfectly.