Despawn

elettrico
Member
 
Posts: 22
Joined: Thu Jul 20, 2017 20:00

Despawn

by elettrico » Thu Aug 24, 2017 14:48

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
 

User avatar
v-rob
Member
 
Posts: 379
Joined: Thu Mar 24, 2016 03:19

Re: Despawn

by v-rob » Thu Aug 24, 2017 16:23

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.
 

elettrico
Member
 
Posts: 22
Joined: Thu Jul 20, 2017 20:00

Re: Despawn

by elettrico » Thu Aug 24, 2017 18:06

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!
 

User avatar
sorcerykid
Member
 
Posts: 666
Joined: Fri Aug 26, 2016 15:36
Location: Illinois, USA
In-game: Nemo

Re: Despawn

by sorcerykid » Fri Oct 27, 2017 21:34

One possible workaround is to redefine the on_activate( ) method of the unwanted entity.

Code: Select all
minetest.register_entity( "example:bad_entity", {
        on_activate = function( self )
       self.object:remove( )
   end,
} )


Admittedly, this doesn't perform a database-wide purge. However, it's guaranteed to remove the entity whenever the mapblock is reloaded.
 

User avatar
christoferlevich
Member
 
Posts: 297
Joined: Thu Dec 01, 2016 23:44
Location: Athol, Massachusetts
GitHub: ChristoferL

Re: Despawn

by christoferlevich » Thu Nov 30, 2017 11:27

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...
 


Return to Bugs and Problems



Who is online

Users browsing this forum: No registered users and 2 guests