FTBTeam / FTB-Mods-Issues

Any mod issues, be it FTB Teams, Quests or any other of our mods can be reported here!
21 stars 1 forks source link

Prune Unclaimed Chunks #258

Open Thiana opened 7 years ago

Thiana commented 7 years ago

Any chance you could add the ability to prune unclaimed chunks outside a fixed radius from spawn? That would allow unlimited player exploration but also allow trimming when the save gets too large. Thanks

LatvianModder commented 7 years ago

So like a world border, but just for chunk claiming?

Thiana commented 7 years ago

That would work well in conjunction with my request, but I'm requesting a command to delete region files that have no claimed chunks in them. Basically I want to allow infinite exploration with the ability to periodically prune the size of the world on disk. An additional bonus of this is that it would allow the server players to periodically download a world save which isn't multiple gigabytes.

danielhickman commented 6 years ago

This seems like a great feature given a number of people upvoting comments on my post on /r/FeedTheBeast where I said this:

I am dying for this. Pruning should be done on claimed chunks since you can ruin your world's villages and trees by pruning in different locations each time or if you miss someone's base by accident.

Allowing for pruning would be an amazing server maintenance and advanced single player feature. I wanted to remove from old regions to slim my save file and generate new structures, plants, and ores. It's also a good way to gid rid of ugly, old bases for players that left the server whitelist or unsightly creeper holes and half-chopped trees.

Some options that could improve on this would be radii from claimed areas and radii from spawn. In terms of what a warning should look like, the player should know it will delete chunks and the borders between new and old terrain might have trees that are cut in half or new generator settings and that they should back up (if forge doesn't let you do that in the mod itself).

TheQKnight commented 6 years ago

Any news on if/when we would get this? It's been close to 7 months since this recommendation and I was starting to get my hopes up, but should we not expect this to be coming, or are you working on it? Thanks :)

Entoarox commented 6 years ago

I would also greatly like this feature myself, right now I have to do any pruning manually and just hope I dont delete anyone's important stuff....

Having the ability to clearly go "If you want your stuff safe, put a claim on the chunk" would really make things a lot easier for me and for my players! 🙏

Crowfooted commented 6 years ago

This would be such a nice feature. Been searching far and wide for a mod that can do this so that I can fulfill my dream of having an interesting non-procedural server world, but there's nothing out there that does anything like it.

generrosity commented 6 years ago

Just spitballing a possible alpha implimentation... Being able to mark a chunk as deletableb when all four (edit:32) chunks in a region file are marked and unloaded, do a scheduled delete underlaying file (as region file lock is removed at this stage) and unmark chunks.

LatvianModder commented 6 years ago

All four chunks? There are 32 x 32 chunks stored in one region file

generrosity commented 6 years ago

Oops, yes, you are quite right. Dunno how I got my math so wrong. Makes it hard to tag chunks fast (unless there was a zap-region command), but far easier to implimenting than actual chunk deletion

Crowfooted commented 6 years ago

How much harder is it to delete individual unclaimed chunks within a region file, as opposed to entire region files that have no claimed chunks in them? The former would allow areas directly around claimed chunks, and around server spawns etc, to regenerate terrain and ores, to combat depletion of resources over time on populated servers.

generrosity commented 6 years ago

Deleting a region file is one line of code "file.delete()". Both the former and later have all the same benefits, btw.

Deleting a chunk is using code from MCEdit which I don't know if exists (as source code?) anywhere else? It might be writing a custom file writer, reprocessing the file, figuring if this works in the main game thread or not.

I'd use this to trim my server map of random elytra flight explorations (my only need for McEdit other than regenerating chunks). I would challenge why you'd want to only regenerating chunks so close to claimed chunks... Youd end up with users with unclaimed chunks within their base for personal mining 🤔 dumb suggestion, but regen that close to claimed chunks might not be necessary

Crowfooted commented 6 years ago

They do have the same benefits on a chunk level of course but since region files contain large sections of chunks, the effect would be different to the player.

A server with a moderate population may have bases spread out - just one unclaimed chunk in a region would prevent that entire region from being refreshed if you're deleting on a region level, so you'd end up with quite large areas around the spawn not getting regenerated. This is not a problem for people simply wanting to trim their world files on disk, but for people wanting to refresh the local terrain or resources it's less useful.

Edit: To elaborate since I realise I didn't really add any new info (haven't had coffee yet): the purpose for which I'm visualising it is that I enjoy interesting, detailed, non-procedural worlds. These are smaller, and have more deliberately-placed places and things to find, hand-crafted biome layouts, etc. They are more interesting to explore, but they suffer from resource depletion and general issues of terrain getting ugly over time. This is partially solved by encouraging players to use renewable lategame oregen, etc, but eventually new joining players using traditional strip mines will have trouble. Regenerating unclaimed chunks every so often, either automatically or via admin command, would work to solve this perfectly.

Niche purpose, I know, but it's rare to find a niche that isn't covered in Minecraft mods these days.

generrosity commented 6 years ago

Again, just spitballing that a first release using regions would get out the door faster than reimplementing MCEdit 😜 we all know the reasons "why"

Crowfooted commented 6 years ago

Well, you challenged why, so I explained! :grin:

I agree on that front. Furthermore, I'd also be very happy if FTBUtilities could output a raw text file listing the chunks that are claimed in a world, so that I can do the pruning myself if needed every so often, or so that somebody can produce a third party tool that can read the file and do the hard work.

generrosity commented 6 years ago

😣Oops. Sorry anyone who subscribed 😜. I'm used to spawn being just buildings, and "hiking out 5km away" is a region file distance away. I'm setting up for my server for 15km Dynmap radius, then a "wild zone" inside the world border for regular pruning, about 5/10km wide; BoP++.

Having a "/FTBU prune dump" would be useful as you say (nbtexplorer has a nbtutil CLI it could generate?). As would "prune load" for my regular trim, and "prune start" to actually run it. And "prune add" (assuming 1 prune chunk + no claim chunks = region prune)... Sorry got my ideas hat on now...

DuelMonster commented 6 years ago

I'd also like to see this implemented.

I've recently added an extra mod to my server and we are having to explore new areas that are almost 10,000 blocks from spawn in order to find the new resources generated by the mod.

I'm not sure how to go about pruning files without using MCEdit, so this feature would be a huge benifit to us.

LatvianModder commented 6 years ago

Actually, I was gonna work on a better chunk managment GUI. It would show all claimed and all loaded chunks in world, similar to Opis mod, and would let you unclaim/unload them. So maybe I can throw in pruning there

Crowfooted commented 6 years ago

You're awesome.

TheQKnight commented 5 years ago

I saw that in an update changelog it said that he moved claimed chunks to a new folder. Does this allow me to prune the unclaimed chunks or am I just misinterpreting it?

MichaelHillcox commented 2 years ago

55

ArchieBeepBoop commented 1 year ago

@LatvianModder @MichaelHillcox Any chance this feature is still in the works? It would be incredibly useful when it comes to large, long-running servers that get new features added such as new structures, new ores and more as time goes on.

I saw that there was previously a PR that could implement it but it seems the author abandoned it shortly afterwards.

manmaed commented 1 year ago

@desht read above ^^^

desht commented 1 year ago

I'm looking at the feasibility of integrating the Prune Addon mod (not supported beyond 1.16.5) into FTB Chunks itself, for more recent versions.