Place spawn buildings closer to the top in fill terrain types

This commit is contained in:
kuroppoi 2024-02-17 22:10:59 +01:00
parent ac1069c3a9
commit c6779f0f61

View file

@ -152,7 +152,8 @@ public class StructureGeneratorTask implements GeneratorTask {
Prefab spawnBuilding = spawnBuildings.next(ctx.getRandom());
if(filled) {
int y = ctx.getHeight() / 8 + ctx.nextInt(Math.max(1, ctx.nextInt(ctx.getHeight() / 8)));
int min = ctx.getHeight() / 32;
int y = min + ctx.nextInt(Math.max(1, ctx.nextInt(min)));
ctx.placePrefab(spawnBuilding, x, y);
} else {
ctx.placePrefabSurface(spawnBuilding, x);