From c6779f0f61827d23708e4201fa2c4bf4326eb5d8 Mon Sep 17 00:00:00 2001 From: kuroppoi <68156848+kuroppoi@users.noreply.github.com> Date: Sat, 17 Feb 2024 22:10:59 +0100 Subject: [PATCH] Place spawn buildings closer to the top in `fill` terrain types --- .../gameserver/zone/gen/tasks/StructureGeneratorTask.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gameserver/src/main/java/brainwine/gameserver/zone/gen/tasks/StructureGeneratorTask.java b/gameserver/src/main/java/brainwine/gameserver/zone/gen/tasks/StructureGeneratorTask.java index f484ffe..c4aa59c 100644 --- a/gameserver/src/main/java/brainwine/gameserver/zone/gen/tasks/StructureGeneratorTask.java +++ b/gameserver/src/main/java/brainwine/gameserver/zone/gen/tasks/StructureGeneratorTask.java @@ -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);