[SPIGOT-7951] Add generateStructures(...) to ChunkGenerator API Created: 10/Nov/24  Updated: 25/Dec/24

Status: Open
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: FreeSoccerHDX Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: ChunkGenerator, Structures

Version: 1.21.3
Guidelines Read: Yes

 Description   

There is already a "shouldGenerateStructures" but no generateStructures like the same way

shouldGenerateSurface and generateSurface
shouldGenerateBedrock and generateBedrock

....

If there is no specific reason it could be a new feature to the ChunkGenerator API



 Comments   
Comment by FreeSoccerHDX [ 15/Nov/24 ]

Blockpopulators are part of the biome-decoration process and the structure generation is called. It doesnt feel completed when some methods are missing just because there is something old already. The missing function(s) can be used for directly generate code in the ChunkGenerator and for smaller things it should be preffered to add things directly there i guess

i dont know when what part of the generation is called. the only thing that is documented is:
1. generateNoise(WorldInfo, Random, int, int, ChunkGenerator.ChunkData)
2. generateSurface(WorldInfo, Random, int, int, ChunkGenerator.ChunkData)
3. generateBedrock(WorldInfo, Random, int, int, ChunkGenerator.ChunkData)
4. generateCaves(WorldInfo, Random, int, int, ChunkGenerator.ChunkData)

but generating Decoration or Structures is not part of them and maybe should get added to the list (if possible) to clarify the API usage a bit

Comment by Marvin Rieple [ 15/Nov/24 ]

I initially didn't add this method, when writing the newer chunk generation api, because, if I remember correctly, it does not give any more freedom.

Since you more or less would access the same data as when using the BlockPopulator.

To make this function useful there should also be a way to set / remove / modify the structure bounding boxes.

Generated at Sat Dec 13 15:26:06 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.