[SPIGOT-6765] World Generation API that runs after all terrain is generated Created: 18/Oct/21 Updated: 15/Nov/22 Resolved: 15/Nov/22 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | New Feature | Priority: | Minor |
Reporter: | Mersphydena | Assignee: | Marvin Rieple |
Resolution: | Fixed | Votes: | 0 |
Labels: | API |
Version: | This server is running CraftBukkit version 3262-Spigot-dc75aca-f0f801e (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) |
Guidelines Read: | Yes |
Description |
According to the javadocs this is the order
and these are the settings that you're able to override
From my testing, if you set a chunk to air in the last generate method, there's still structures and decorations that generate inside the chunk. I don't want to just override the settings (ex. shouldGenerateStructures() ) as I still want structures, just not in that chunk. Would it be possible to add a method that runs after everything is generated? The alternative is setting the chunk to air in ChunkLoadEvent, which is annoying and laggy. |
Comments |
Comment by Marvin Rieple [ 12/Nov/22 ] |
Made a PR which adds coordinates to the should methods: craftbukkit#1116 |
Comment by Mersphydena [ 19/Oct/21 ] |
Yea definitely, I think adding x & z coords to those methods would help! I was under the impression BlockPopulator was for small things and not just setting the entire chunk to air? |
Comment by Marvin Rieple [ 18/Oct/21 ] |
BlockPopulator are called as the last step. I assuming you want to generated only specific chunks, in this case it might be an option to create "shouldGenerate..." methods which take the coordinates of the chunk. To allow for a more controlled way when minecraft generation should kick in. |