9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-23 00:49:31 +00:00

update default config value

This commit is contained in:
hayanesuru
2025-06-04 01:10:00 +09:00
parent 100d8bb1e6
commit e32cdae1bf
3 changed files with 9 additions and 7 deletions

View File

@@ -21,8 +21,11 @@ public class ThrottleNaturalSpawnMob extends ConfigModules {
spawnChance = new int[categories.length];
for (int i = 0; i < categories.length; i++) {
String category = getBasePath() + "." + categories[i].getSerializedName();
failedAttempts[i] = config.getLong(category + ".failed-attempts", -1);
spawnChance[i] = (int) Math.round(config.getDouble(category + ".spawn-chance", 100.0) * 10.24);
long attempts = config.getLong(category + ".min-failed-attempts", 8);
double chance = config.getDouble(category + ".spawn-chance", 25.0);
failedAttempts[i] = Math.max(-1, attempts);
spawnChance[i] = Math.clamp(0, (int) Math.round(chance * 10.24), 1024);
}
}
}