Remove chunks that haven't been visited in a month

I propose a plugin where chunks that haven’t been loaded by anything should be deleted after being un-visited after a month. This would help regulate the world size, especially for larger servers with random teleporting enabled.

1 Like

If you want to regulate your world size, wouldn’t using a world border and a Mining world (which you’d reset often) be better? Deleting chunks could really screw up your world gen, or delete stuff which players who haven’t been online for that month has made.

I don’t see how it could screw up the world gen if it’s using the same seed to generate them, and either way I could tell players they need to login every month to keep their crap, which isn’t such a bad deal is it?

Just seems like it could end up being very problematic in many ways. Also generating new chunks uses more resources, and drops TPS over already loaded chunks.

Minecraft updates change how chunks read that seed, you could end up with cliffs into a random ocean etc post an update

1 Like

I’ve deleted chunks in my servers before with no issues whatsoever, they just regenerate with the same seed. I don’t see what the problem is really.

Ok so say you have hypothetical minecraft version 1.15.10, your server has chunks generated. Now say in 1.16.0 they add a new biome, now the way your server interprets that seed has changed entirely. Aside from outlier chunks (from rtp) it would make patch work of your map with different biomes as a result of that new interpretation of your servers seed.

The only way this potentially works is to have a stagnate version of minecraft and hope that any terrain modification done by plugins/mods stays the same.

The code for regeneration is fairly straightforward, at least in forge / vanilla. You just run the chunk generation again for that specific chunk x, z coordinate, send to client and a couple of lines to ensure it saves to disk.

Either way, deleted by the plugin or not, the world is gonna be patchwork. I don’t see how this plugin causes any problems that weren’t already there in the first place.

This is not really reliable, who control the world size without a worldborder nowdays? If the chunks weren’t visited for some time, they obviously won’t be loaded, meaning that they won’t affect the server performance (which is what you should be worried, instead world size). This could also break many plugins that store locations (such as claiming plugins, world-interaction plugins, etc) making them retrieve a non-generated yet chunk.

This would bring more problems than would solve.

World size is a problem when you’re on limited SSD space and take backups for safety.

At this point, I feel like all of the problems presented aren’t really problems in my mind with proper claiming integration, so I suppose I’ll just have to do it myself then since apparently my idea is super flawed and going to break everything and corrupt the world I guess.

I’ll be sure to post it if I can translate my Bukkit knowledge into Sponge, just for the others that might need it.

1 Like

Good luck with that.

Pretty much 85% of bukkit/spigot servers and half of the sponge users. People need to stop acting like others have to know or have to use everything every knowledgeable person does. Doesn’t work like that.