mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 01:04:12 +00:00
Fix #480 Increase hive spawn rate 25%, add config option for spawn rate
This commit is contained in:
1 parent
636201ce5a
commit
56dfae034d
2 files changed
+10
-1
No files matched your search
@@ -73,7 +73,7 @@ public class HiveDecorator {
|
||||
}
|
||||
|
||||
public boolean genHive(World world, Random rand, int chunkX, int chunkZ, Hive hive) {
|
||||
if (hive.genChance() < rand.nextFloat() * 128.0f) {
|
||||
if (hive.genChance() * Config.getBeehivesRate() < rand.nextFloat() * 100.0f) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ public class Config {
|
||||
public static boolean generateCopperOre = true;
|
||||
public static boolean generateTinOre = true;
|
||||
public static boolean generateBeehives = true;
|
||||
private static float generateBeehivesRate = 1.0f;
|
||||
public static boolean generateBeehivesDebug = false;
|
||||
public static boolean enableVillager = true;
|
||||
|
||||
@@ -104,6 +105,10 @@ public class Config {
|
||||
return craftingBronzeEnabled;
|
||||
}
|
||||
|
||||
public static float getBeehivesRate() {
|
||||
return generateBeehivesRate;
|
||||
}
|
||||
|
||||
public static void load() {
|
||||
|
||||
setDebugMode();
|
||||
@@ -156,6 +161,10 @@ public class Config {
|
||||
genBeehives.comment = "set to false to force forestry to skip generating beehives in the world";
|
||||
generateBeehives = Boolean.parseBoolean(genBeehives.value);
|
||||
|
||||
Property genBeehivesRate = config.get("world.generate.beehives.rate", CATEGORY_COMMON, generateBeehivesRate);
|
||||
genBeehivesRate.comment = "set how many beehives spawn. Default is 1.0, double is 2.0, half is 0.5 etc.";
|
||||
generateBeehivesRate = Float.parseFloat(genBeehivesRate.value);
|
||||
|
||||
Property genDebugBeehives = config.get("world.generate.beehives.debug", CATEGORY_DEBUG, false);
|
||||
genDebugBeehives.comment = "Set to true to force Forestry to try to generate a beehive at every possible location.";
|
||||
generateBeehivesDebug = Boolean.parseBoolean(genDebugBeehives.value);
|
||||
|
||||
Reference in new issue
Block a user