Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Delete all TNT #14

Open
Huns opened this issue Jul 9, 2012 · 7 comments
Open

Suggestion: Delete all TNT #14

Huns opened this issue Jul 9, 2012 · 7 comments

Comments

@Huns
Copy link

Huns commented Jul 9, 2012

I used to use pymclevel/mce.py to clean TNT off maps where people have set off too much of it. Unfortunately, the Anvil level format change brought a memory leak to MCE, making it run out of memory on any map that's been around for more than a few months.

TNT is the number one thing I see, by far, that causes Minecraft servers to crash over and over. The way MC is designed is really dumb - it does nothing to protect itself from running out of memory if too many TNTs go off. There is a plugin called NoLagg that can buffer explosions, but it's powerless to stop the chain reaction once it's started (i.e. you can't turn it on for a map that has an existing TNT explosion problem.)

If there is some way a flag could be added to the region fixer that would replace all TNT with air on an entire map, it would be a huge help. In order to work, it would have to remove TNTs in both the countdown and exploding phases.

@Fenixin
Copy link
Owner

Fenixin commented Jul 9, 2012

Region-Fixer can already do this. In a Minecraft chunk there primarily blocks and entities. The things that take CPU and can make the server hang are entities, because the sever has to move them. Because primed TNTs are entities you can delete them all using the option --delete-entities and --entity-limit. This will delete ALL the entities, but if you look what entities are (no tile entities) you will see that is not such a problem. So for example you can use:

python region-fixer.py --de --el 100 /path/to/world

(this will delete all the entities in chunks with more than 100 entities)

I know the biggest problem with region-fixer is the lack of docs or help. I have some stuff written and I'll try to add it to the wiki today. Also, feel free to add you tutorial/contribution to the wiki.

@Fenixin
Copy link
Owner

Fenixin commented Jul 9, 2012

Also, please, tell me if you have any problems fixing your world.

@ZizzyZizzy
Copy link

TNT is a block until it is ignited; only then is it an entity. Region fixer does not have an option to delete all TNT BLOCKS.

The problem is once some asshat has started the process, it's near impossible to get the world running again. Stopping the server and deleting all the excess entities works the first time, but when you join the server again all the unexploded TNT will continue to go off, consuming all available memory until it crashes. Until that point it may or may not have saved the world data (usually not), which means there are no more entities to clean.

Even a replacement option would be very handy in these cases. Replace all TNT with dirt, for example.

@fennectech
Copy link

Set --el to 0 and it will delete ALL entities in the world

@Fenixin
Copy link
Owner

Fenixin commented May 28, 2017

@ZizzyZizzy, Sorry for the late answer. I think replacing blocks is covered by other softwares (editors and the like), at least it was really well covered when I last checked this. Even in a CLI environment.

Anyway, as I say in my last comments, life happens, right now my priorities are in other place and I'm no going to implement new stuff in Region-Fixer.

@fennectech
Copy link

They are not talking about the block they are talking about the entity "primedtnt" wich is already been set off and counts as an entity the moment you load the chunks the lag will crush the server What he wants is a way to delete all entities with the id of 20 (primedtnt) If you delete all primedtnt the explosion will be halted and you can go clean up the TNT

@fennectech
Copy link

@ZizzyZizzy If you delete all the entities on the server the explosion will be halted then you can clean up the TNT with worldedit (the el=0 thing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants