Skip to content

Commit

Permalink
Reduce Meneglin biome spawning rate and make it configurable, Closes #24
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Apr 26, 2016
1 parent a79ef96 commit da25ee8
Showing 1 changed file with 43 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.BiomeManager;
import org.cyclops.cyclopscore.config.ConfigurableProperty;
import org.cyclops.cyclopscore.config.ConfigurableTypeCategory;
import org.cyclops.cyclopscore.config.extendedconfig.BiomeConfig;
import org.cyclops.integrateddynamics.IntegratedDynamics;
import org.cyclops.integrateddynamics.Reference;
Expand All @@ -18,6 +20,30 @@ public class BiomeMeneglinConfig extends BiomeConfig {
*/
public static BiomeMeneglinConfig _instance;

/**
* The weight of spawning in a cool biome type.
*/
@ConfigurableProperty(category = ConfigurableTypeCategory.BIOME, comment = "The weight of spawning in a cool biome type.")
public static int spawnWeightCool = 4;

/**
* The weight of spawning in a forest biome type.
*/
@ConfigurableProperty(category = ConfigurableTypeCategory.BIOME, comment = "The weight of spawning in a forest biome type.")
public static int spawnWeightForest = 6;

/**
* The weight of spawning in a magical biome type.
*/
@ConfigurableProperty(category = ConfigurableTypeCategory.BIOME, comment = "The weight of spawning in a magical biome type.")
public static int spawnWeightMagical = 10;

/**
* The weight of spawning in a lush biome type.
*/
@ConfigurableProperty(category = ConfigurableTypeCategory.BIOME, comment = "The weight of spawning in a lush biome type.")
public static int spawnWeightLush = 8;

/**
* Make a new instance.
*/
Expand All @@ -33,12 +59,27 @@ public BiomeMeneglinConfig() {

@Override
public void registerBiomeDictionary() {
BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeManager.BiomeEntry(getBiome(), 10));
if (spawnWeightCool > 0) {
BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeManager.BiomeEntry(getBiome(), spawnWeightCool));
}
if (spawnWeightForest > 0) {
BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeManager.BiomeEntry(getBiome(), spawnWeightForest));
}
if (spawnWeightMagical > 0) {
BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeManager.BiomeEntry(getBiome(), spawnWeightMagical));
}
if (spawnWeightLush > 0) {
BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeManager.BiomeEntry(getBiome(), spawnWeightLush));
}
BiomeManager.addSpawnBiome(getBiome());
BiomeManager.addStrongholdBiome(getBiome());
BiomeManager.addVillageBiome(getBiome(), true);
BiomeDictionary.registerBiomeType(getBiome(),
BiomeDictionary.Type.FOREST, BiomeDictionary.Type.MAGICAL, BiomeDictionary.Type.LUSH);
BiomeDictionary.Type.COLD,
BiomeDictionary.Type.FOREST,
BiomeDictionary.Type.MAGICAL,
BiomeDictionary.Type.LUSH
);
}

}

0 comments on commit da25ee8

Please sign in to comment.