Hi, don't know if it's the correct forum to post to, move if needed.
I post it here because I think it's a bug not to have a command for despawing mobs.
Is there a way to despawn all mobs or despawn all mobs spawned by one mod?
I war trying the scifi mod in a world (server), now I've removed it but all the robots appears as "unknown" and keep wandering. How can I tell minetest to remove all mobs unknown, or from "scifi" mod, or alternatively ALL mobs?
Thank
Despawn
- v-rob
- Developer
- Posts: 971
- Joined: Thu Mar 24, 2016 03:19
- GitHub: v-rob
- IRC: v-rob
- Location: Right behind you.
Re: Despawn
I know that the command /clearobjects clears all entities, but this would also get rid of minecarts and words on signs if you have signs_lib and it would remove a few other things as well. If you have many entities on you're server, then you could have a timeout happen. Think carefully before doing this.
BTW, you should probably test mods you aren't sure you want in a singleplayer test world before putting them in a server. A server is hard to fix, but a test world can be deleted.
BTW, you should probably test mods you aren't sure you want in a singleplayer test world before putting them in a server. A server is hard to fix, but a test world can be deleted.
Re: Despawn
Yes I know about clearobject, and what you say is true. So, if there's no way to delete all entities from one mod I think I have to live with it. It's a pity.
And yes, it is true I should have done my tests locally: in fact, I've done it. But in an "empty" world I didn't notice robots could destroy things, and that is not mentioned in the mod documentation. When I tried it in my "real" world I've start to notice broken houses, etc, and later realized that's the work of sci-fi mobs!
And yes, it is true I should have done my tests locally: in fact, I've done it. But in an "empty" world I didn't notice robots could destroy things, and that is not mentioned in the mod documentation. When I tried it in my "real" world I've start to notice broken houses, etc, and later realized that's the work of sci-fi mobs!
- sorcerykid
- Member
- Posts: 1847
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: Despawn
One possible workaround is to redefine the on_activate( ) method of the unwanted entity.
Admittedly, this doesn't perform a database-wide purge. However, it's guaranteed to remove the entity whenever the mapblock is reloaded.
Code: Select all
minetest.register_entity( "example:bad_entity", {
on_activate = function( self )
self.object:remove( )
end,
} )
- christoferlevich
- Member
- Posts: 325
- Joined: Thu Dec 01, 2016 23:44
- GitHub: ChristoferL
- Location: Athol, Massachusetts
Re: Despawn
I am kind of glad I am not alone. I was going crazy because my signs would hold and then out of no where - I'd loose the text rendering on the sign, though the text was still 'in the sign;. Clearobjects.... yikes... thanks for confirming.
everything can be a learning experience...
Who is online
Users browsing this forum: No registered users and 9 guests