Skip to content

Commit

Permalink
fix 10320 (#10346)
Browse files Browse the repository at this point in the history
Make sure citizens don't spawn with 1 statsc
  • Loading branch information
Raycoms authored Oct 27, 2024
1 parent c2aea08 commit e4f1aeb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/com/minecolonies/core/colony/CitizenData.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.minecolonies.core.colony;

import com.minecolonies.api.IMinecoloniesAPI;
import com.minecolonies.api.MinecoloniesAPIProxy;
import com.minecolonies.api.colony.CitizenNameFile;
import com.minecolonies.api.colony.ICitizenData;
Expand Down Expand Up @@ -497,8 +498,12 @@ public void initForNewCivilian()
textureId = random.nextInt(255);

saturation = MAX_SATURATION;
final int levelCap = (int) colony.getOverallHappiness();

int levelCap = (int) colony.getOverallHappiness() * 2;
if (colony.getCitizenManager().getCitizens().size() < IMinecoloniesAPI.getInstance().getConfig().getServer().initialCitizenAmount.get())
{
levelCap = Math.max(5, levelCap);
}
citizenSkillHandler.init(levelCap);

markDirty(0);
Expand Down

0 comments on commit e4f1aeb

Please sign in to comment.