Implemented admin commands for pruning world data files
Resolves #16 (possibly?)
Implemented admin commands for pruning region and poi files which do not have any chunks claimed by ftb-chunks.
Commands
prune region_files_with_no_claimed_chunks
Prunes all REGION files of a world-level/dimension which do not contain any chunks claimed by ftb-chunks. Suntax: /ftbchunks admin prune region_files_with_no_claimed_chunks [dimension <dimension>] [doNotBackup <true | false>]
Parameters
- dimension
The world level/dimension to prune the data from. default: overworld
- do_not_backup
If set to true, pruned files will not be backed up. default: false Use with extreme caution! It will permanently delete files.
prune poi_files_with_no_claimed_chunks
Prunes all POI files of a world-level/dimension which do not contain any chunks claimed by ftb-chunks. Suntax: /ftbchunks admin prune poi_files_with_no_claimed_chunks [dimension <dimension>] [doNotBackup <true | false>]
Parameters
- dimension
The world level/dimension to prune the data from. default; overworld
- do_not_backup
If set to true, pruned files will not be backed up. default: false Use with extreme caution! It will permanently delete files.
Note:
I needed the feature for my custom modpack server. I decided to make it proper and create a pull request. If you think that it does not belong in the mod and should be its own separate thing, please let me know. I will be happy to make it an add-on.
It is done for now on my end, unless I need to resolve conflicts?
Hay @muqsit-0010 we appreciate the hard work. FTB Teams, FTB Gui Lib and a few other mods are currently undergoing heavy amounts of rewrites and shifting around. From what I know, LatvianModder plans to implement something like this but on the teams side of the system. I'll leave this PR open but I'm not sure if it'll get superseded by something else.
I'll try and keep this PR posted on what happens.
@MichaelHillcox Thank you for the response, in that case, considering the following
- If this or a similar approach is an acceptable implementation,
- Whenever it will be decided that which feature is going to be in which repository,
- And someone can guide me to the correct place for the implementation.
I will gladly move the implementation there and do another PR.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
The concept is good, but given the age of this PR (2 years) it might be easier to simply manually implement an equivalent solution ourselves?
Seeing as the CLI isn't agreed to and chunks has changes so much over the past few months, I'm going to close this. Please open new PR if you wish to contribute this again against the latest code version. Otherwise, @desht if you like these concepts and have time any time soon. Feel free to add :+1:
@desht Sorry to resurrect this thread, but are you still considering adding a prune option to FTB Chunks? Been looking for a way to prune unclaimed chunks in a 1.18.2 server, and keep finding dead threads talking about it possibly being added.
It's still something we want to do, but at the moment it's really a matter of priorities. Can't give you any timescales, sorry.