Example usage for net.minecraftforge.common BiomeManager addBiome

List of usage examples for net.minecraftforge.common BiomeManager addBiome

Introduction

In this page you can find the example usage for net.minecraftforge.common BiomeManager addBiome.

Prototype

public static void addBiome(BiomeType type, BiomeEntry entry) 

Source Link

Usage

From source file:com.shinoow.abyssalcraft.AbyssalCraft.java

License:Apache License

private static void registerBiomeWithTypes(BiomeGenBase biome, int weight, BiomeType btype, Type... types) {
    BiomeDictionary.registerBiomeType(biome, types);
    BiomeManager.addBiome(btype, new BiomeEntry(biome, weight));
}

From source file:extrabiomes.lib.BiomeSettings.java

License:Creative Commons License

public void postLoad() {
    if (!isVanilla() && biome.isPresent()) {
        final ExtrabiomeGenBase egb = (ExtrabiomeGenBase) biome.get();
        BiomeDictionary.registerBiomeType(egb, egb.getBiomeTypeFlags());
        LogHelper.fine("registering " + this.name() + " with dictionary");

        // register ourselves with the biome manager
        BiomeManager.BiomeEntry entry = new BiomeManager.BiomeEntry(egb, weight);
        if (egb.temperature > 0.5f) {
            if (egb.isHighHumidity()) {
                BiomeManager.addBiome(BiomeType.WARM, entry);
            } else {
                BiomeManager.addBiome(BiomeType.DESERT, entry);
            }//from w  w w  .j a va2 s  .co m
        } else {
            if (egb.getEnableSnow()) {
                BiomeManager.addBiome(BiomeType.ICY, entry);
            } else {
                BiomeManager.addBiome(BiomeType.COOL, entry);
            }
        }

    } else {
        LogHelper.fine("NOT registering " + this.name() + " with dictionary, biome = " + biome);
    }
}