DevOnTheRocks / SkyClaims

SkyClaims is an Island plugin that integrates with GriefDefender for SpongeAPI.
GNU General Public License v3.0
19 stars 24 forks source link

[SUGGESTION] Pre-generated islands #131

Open dimon7147 opened 4 years ago

dimon7147 commented 4 years ago

When generating islands, especially large ones, the server freezes seriously. I would like to suggest one of the ways to solve this problem: Pre-generated islands.

How I imagine it: 1. The administrator runs the command /is reserve [amount] [schematic] that generates islands with the given schematic type. 2. When a player creates an island by /is create, the plugin checks whether there are pre-generated islands, if there are, it issues it to the player, if not, it generates it as usual.

This will avoid "lag spikes" when creating new islands.

Also, when re-creating an island, the player should be given a pre-generated, and the old island should be marked for deletion and deleted either by the administrator's command, or under a certain condition (for example, when there are fewer N players on the server)

Mohron commented 4 years ago

The underlying issue here is with Sponge not pasting schematics in a performant way (WorldEdit suffers from the same problem). Unfortunately, the chances of that being improved are pretty low.

The use of large schematics is not very common from what I've heard.

If possible, you can try to combine the world gen and schematics together like is done for the Stoneblock schematic as it is a lot more performant than pasting an overly large schematic.

Anyways the proposed solution would require significant changes to even be possible. It's not something that will even be considered until then next Sponge-MC version. If you would like to share details on your use-case, I could possibly propose an alternative that wouldn't require a massive refactor to support. Feel free to join Discord to discuss further.